/* style.css - Iron Fitness Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f1c40f; /* Gym Yellow */
    --secondary: #e74c3c; /* Gym Red */
    --dark: #1e1e2d;
    --sidebar-dark: #13131f;
    --light: #f8f9fa;
    --card: #ffffff;
    --text-dark: #333;
    --text-muted: #888;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: #f4f6f9; color: var(--text-dark); display: flex; height: 100vh; overflow: hidden; }

/* --- SIDEBAR (Native App Drawer feel) --- */
.sidebar {
    width: 260px; background: var(--sidebar-dark); color: #fff;
    height: 100vh; position: fixed; top: 0; left: 0; z-index: 1000;
    display: flex; flex-direction: column; transition: var(--transition); overflow-y: auto;
}
.brand { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.brand h2 { color: var(--primary); font-size: 20px; letter-spacing: 2px; }
.brand h2 span { color: var(--secondary); }

.nav-links { flex: 1; padding: 15px 0; }
.nav-item { display: flex; align-items: center; padding: 12px 20px; color: #aaa; cursor: pointer; transition: var(--transition); text-decoration: none; gap: 15px;}
.nav-item:hover, .nav-item.active { background: rgba(241, 196, 15, 0.1); color: var(--primary); border-left: 3px solid var(--primary); }
.nav-item i { width: 20px; text-align: center; }
.nav-item .arrow { margin-left: auto; font-size: 12px; }

.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 12px; color: #aaa; }

/* --- MAIN CONTENT --- */
.main-content { flex: 1; margin-left: 260px; height: 100vh; overflow-y: auto; padding: 20px; transition: var(--transition); }

/* TOP HEADER */
.header { background: #fff; padding: 15px 25px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px;}
.search-bar { display: flex; align-items: center; background: #f1f3f5; border-radius: 30px; padding: 8px 15px; flex: 1; min-width: 200px; max-width: 400px;}
.search-bar input { border: none; background: transparent; outline: none; width: 100%; padding-left: 10px; font-size: 14px;}
.header-right { display: flex; align-items: center; gap: 20px; }
.date-badge { background: #f1f3f5; padding: 6px 12px; border-radius: 20px; font-size: 13px; color: #555; }
.profile-dropdown { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.profile-dropdown img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }

/* STATS CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; justify-content: space-between; transition: var(--transition); }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); }
.stat-info h3 { font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.stat-info p { font-size: 13px; color: var(--text-muted); }
.stat-info span { font-size: 11px; color: #27ae60; background: #eafaf1; padding: 2px 8px; border-radius: 10px; }
.stat-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }

/* GRID LAYOUTS */
.dashboard-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.dashboard-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; overflow: hidden; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-weight: 600; font-size: 16px; }
.card-header select, .card-header button { border: 1px solid #eee; background: #fff; padding: 5px 10px; border-radius: 8px; cursor: pointer; color: #555; font-size: 13px;}

/* CHARTS */
.chart-area { height: 200px; width: 100%; position: relative; }
.membership-chart-container { width: 100%; height: 180px; display: flex; justify-content: center; position: relative;}
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; margin-top: 10px;}
.legend span { display: flex; align-items: center; gap: 8px;}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* QUICK ACTIONS */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.quick-btn { background: #f8f9fa; padding: 15px; border-radius: 12px; text-align: center; cursor: pointer; transition: var(--transition); border: none; }
.quick-btn:hover { background: var(--primary); color: #fff; transform: scale(0.95); }
.quick-btn i { font-size: 24px; display: block; margin-bottom: 8px; color: #555; }
.quick-btn:hover i { color: #fff; }
.quick-btn span { font-size: 12px; font-weight: 500; }

/* TABLES */
.table-responsive { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #eee; }
th { color: var(--text-muted); font-weight: 500; }
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-active { background: #eafaf1; color: #27ae60; }
.status-expired { background: #fdedec; color: #e74c3c; }
.status-pending { background: #fef9e7; color: #f39c12; }
.action-dots { display: flex; gap: 10px; color: #aaa; cursor: pointer; }

/* CHECKINS LIST */
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f1f1; }
.list-item:last-child { border-bottom: none; }
.list-item img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }
.list-item-info { flex: 1; }
.list-item-info h4 { font-size: 14px; margin-bottom: 2px; }
.list-item-info p { font-size: 12px; color: var(--text-muted); }
.list-item-status { font-size: 11px; color: #27ae60; font-weight: 600; background: #eafaf1; padding: 2px 8px; border-radius: 10px; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .dashboard-grid-2 { grid-template-columns: 1fr; }
    .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 250px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 15px; height: 92vh; }
    .dashboard-grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .header { flex-direction: column; align-items: stretch; }
    .search-bar { max-width: 100%; }
    .header-right { justify-content: space-between; }
    .hamburger { display: block !important; position: fixed; top: 15px; left: 15px; z-index: 1100; background: #fff; border: none; padding: 8px; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow); }
}
.hamburger { display: none; font-size: 20px; }
/* --- SIDEBAR DROPDOWN STYLES --- */
.nav-dropdown {
    position: relative;
}
.nav-item.dropdown-toggle {
    cursor: pointer;
}
.nav-item.dropdown-toggle .arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}
.nav-item.dropdown-toggle.open .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}
.dropdown-menu.open {
    max-height: 300px; /* Adjust based on your items */
    opacity: 1;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 55px; /* Indent for submenu */
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}
.dropdown-item:hover, .dropdown-item.active {
    color: var(--primary);
    background: rgba(241, 196, 15, 0.05);
}