/* =====================================================================
   TENNIS RAYA — Club Tracker
   Tema: Premium Sport Luxury (Navy Blue & Champagne Gold)
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ==================== TOKENS ==================== */
:root {
    --navy: #1A2A44;
    --navy-dark: #0f172a;
    --navy-light: #2a3d5e;
    --navy-soft: #EAF0F7;
    --gold: #D4AF37;
    --gold-light: #E8C872;
    --gold-soft: #FBF5E4;
    --green: #15A66E;
    --green-soft: #E7F7EF;
    --red: #DC4B4B;
    --red-soft: #FDECEC;
    --amber: #E5930B;
    --amber-soft: #FEF3DC;
    --info-soft: #E4EEFB;
    --info-dark: #2A5EA8;
    --border-soft: #D5DDE9;
    --border-color: #E5EAF1;
    --border-dashed: #C3CFDF;
    --bg-body: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-muted: #F8FAFC;
    --text-main: #1A2A44;
    --text-soft: #475569;
    --text-muted: #6B7A90;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 3px rgba(26, 42, 68, .04);
    --shadow-sm: 0 4px 12px rgba(26, 42, 68, .06);
    --shadow-md: 0 10px 30px rgba(26, 42, 68, .10);
    --shadow-lg: 0 24px 60px rgba(26, 42, 68, .22);
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --primary: var(--navy);
    --primary-color: var(--navy);
    --secondary: var(--green);
    --accent: var(--gold);
    --danger: var(--red);
    --purple-color: #7C5CE0;
    --color-navy: var(--navy);
    --color-pastel-blue: var(--navy-soft);
    --border-radius: var(--radius-md);
}

/* ==================== RESET ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--text-main); background: var(--bg-body); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
code { font-family: 'SFMono-Regular', Consolas, monospace; background: var(--navy-soft); color: var(--navy); padding: 2px 6px; border-radius: 5px; font-size: 12px; }
button:focus-visible, a:focus-visible, .nav-btn:focus-visible, .subnav-btn:focus-visible, .close:focus-visible, .dropdown-item:focus-visible, .radio-option:focus-within, .role-checkbox:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== PAGE SWITCH ==================== */
.page { display: none !important; }
.page.active { display: flex !important; min-height: 100vh; width: 100%; }

/* ==================== LOGIN ==================== */
#loginPage.active { align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, rgba(26, 42, 68, 0.9) 0%, rgba(42, 61, 94, 0.95) 100%), url('image/carles-rabada-7m45QhjKSKo-unsplash.jpg'); background-size: cover; background-position: center; background-attachment: fixed; background-repeat: no-repeat; }
.login-card { width: 100%; max-width: 440px; background: var(--bg-card); border-radius: 24px; padding: 44px 40px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); border-top: 5px solid var(--gold); max-height: calc(100vh - 48px); overflow-y: auto; }
.logo { text-align: center; margin-bottom: 30px; }
.logo-img { width: 90px; height: 90px; object-fit: contain; border-radius: 50%; margin-bottom: 16px; box-shadow: 0 0 0 6px var(--gold-soft), var(--shadow-md); }
.logo h1 { font-family: var(--font-display); font-size: 36px; font-weight: 900; color: var(--navy); letter-spacing: -1px; line-height: 1.1; }
.logo p { color: var(--text-muted); font-size: 12px; margin-top: 6px; letter-spacing: 2px; font-family: var(--font-body); text-transform: uppercase; font-weight: 700; }
.input-group { position: relative; margin-bottom: 16px; width: 100%; }
.input-group > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 15px; z-index: 2; pointer-events: none; }
.input-group input, .input-group select { width: 100%; padding: 14px 14px 14px 46px; border: 1.5px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-muted); font-weight: 500; transition: .2s; appearance: none; }
.input-group input:focus, .input-group select:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 4px rgba(26,42,68,.08); }
.btn-login { width: 100%; padding: 15px; border: none; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .5px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .2s; box-shadow: 0 8px 20px rgba(26,42,68,.3); }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(26,42,68,.4); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--navy); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { color: var(--gold); text-decoration: underline; }
.password-criteria { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: var(--bg-muted); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; margin: 6px 0 10px; }
.criteria-item { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; transition: .2s; font-weight: 600; }
.criteria-item i { font-size: 10px; }
.criteria-item.valid { color: var(--green); font-weight: 700; }

/* ==================== DASHBOARD LAYOUT ==================== */
#dashboardPage.active { flex-direction: row; align-items: stretch; }

/* SIDEBAR UTAMA */
.sidebar {
    width: 260px; position: fixed; left: 0; top: 0; height: 100vh; z-index: 1000;
    display: flex; flex-direction: column;
    background: #1A2A44;
    color: #fff; transition: transform .3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

/* SIDEBAR HEADER (Dengan Gambar) */
.sidebar-brand {
    display: flex; align-items: center; gap: 12px; padding: 24px 22px;
    font-family: var(--font-display); font-size: 24px; font-weight: 800; color: #fff;
    letter-spacing: -0.5px; line-height: 1.1; border-bottom: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(26, 42, 68, 0.9) 100%), url('image/carles-rabada-7m45QhjKSKo-unsplash.jpg');
    background-size: cover; background-position: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); position: relative; z-index: 2;
}
.sidebar-brand .nav-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; background: #fff; padding: 2px; box-shadow: 0 0 15px rgba(255,255,255,0.3), 0 4px 10px rgba(0,0,0,0.3); position: relative; z-index: 2; }
.sidebar-brand span { position: relative; z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* MENU SIDEBAR */
.sidebar-menu { flex: 1; padding: 18px 14px; overflow-y: auto; background: #1A2A44; }
.sidebar .nav-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 18px; margin-bottom: 6px; border: none; border-radius: 12px; background: transparent; text-align: left; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65); transition: .25s ease; position: relative; }
.sidebar .nav-btn i { width: 20px; text-align: center; font-size: 16px; color: rgba(255,255,255,.4); transition: .25s; }
.sidebar .nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(4px); }
.sidebar .nav-btn:hover i { color: var(--gold); }
.sidebar .nav-btn.active { background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%); color: #fff; font-weight: 700; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; }
.sidebar .nav-btn.active i { color: var(--gold); text-shadow: 0 0 8px rgba(212, 175, 55, 0.6); }
.sidebar-footer { padding: 16px; text-align: center; border-top: 1px solid rgba(255,255,255,.1); background: #1A2A44; }
.sidebar-footer p { color: rgba(255,255,255,.4) !important; font-size: 11px !important; letter-spacing: .5px; }

.main-content { margin-left: 260px; width: calc(100% - 260px); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }

/* HEADER */
.top-header { position: sticky; top: 0; z-index: 900; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(248, 249, 250, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(26, 42, 68, 0.05); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; font-size: 18px; color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-notif { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--border-color); color: var(--text-soft); display: flex; align-items: center; justify-content: center; transition: .2s; }
.nav-notif:hover { background: var(--navy-soft); color: var(--navy); }
.nav-notif i { font-size: 18px; }
.notif-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border: 2px solid #fff; display: none; align-items: center; justify-content: center; z-index: 1; }
.notif-badge.show { display: flex; }
.profile-dropdown-container { position: relative; }
.user-profile-top { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; background: #fff; border: 1px solid var(--border-color); border-radius: 40px; cursor: pointer; transition: .2s; }
.user-profile-top:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); }
.user-profile-top i.fa-user-circle { font-size: 32px; color: var(--navy); }
.user-profile-top span { font-size: 13px; font-weight: 700; color: var(--text-main); }
.user-profile-top .fa-chevron-down { font-size: 10px; color: var(--text-muted); }
.profile-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-md); overflow: hidden; z-index: 1100; padding: 8px; }
.profile-dropdown-menu.show { display: block; animation: pop .15s ease; }
.dropdown-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: .15s; }
.dropdown-item i { width: 16px; text-align: center; color: var(--text-muted); }
.dropdown-item:hover { background: var(--navy-soft); color: var(--navy); }
.dropdown-item.text-danger, .dropdown-item.text-danger i { color: var(--red); }
.dropdown-item.text-danger:hover { background: var(--red-soft); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* CONTENT */
.content-wrapper { flex: 1; padding: 32px; max-width: 1400px; width: 100%; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp .3s ease; }
.page-title, .header-section h2 { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; line-height: 1.2; }
.page-title { margin-bottom: 24px; }
.header-section { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.header-section h2 i { color: var(--gold); margin-right: 10px; font-size: 26px; }
.section-header { margin-bottom: 20px; }
.section-header h3 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.section-header h3 i { color: var(--gold); margin-right: 10px; font-size: 22px; }

/* ==================== CARDS ==================== */
.dashboard-section, .member-card, .tracking-form, .recent-plays, .leaderboard-container, .profile-container, .settings-card, .stat-card, .upcoming-card, .schedule-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: box-shadow .3s, transform .3s, border-color .3s; }
.member-card, .tracking-form, .recent-plays, .leaderboard-container, .profile-container, .settings-card { padding: 28px; margin-bottom: 28px; }
.dashboard-section { padding: 0; border: none; box-shadow: none; background: transparent; margin-bottom: 32px; }
.member-card:hover, .schedule-card:hover, .upcoming-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--gold-light); }
.stats-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 36px; }
.stat-card { display: flex; align-items: center; gap: 20px; padding: 24px; cursor: pointer; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--navy-soft); opacity: .5; pointer-events: none; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-icon { width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--navy-soft); color: var(--navy); }
.stat-content { position: relative; z-index: 1; }
.stat-number { font-size: 36px; font-weight: 900; line-height: 1; color: var(--text-main); font-family: var(--font-display); }
.stat-text { margin-top: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.stat-card[data-stat-key="members"] .stat-icon { background: var(--info-soft); color: var(--info-dark); }
.stat-card[data-stat-key="schedules"] .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-card[data-stat-key="upcoming"] .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat-card[data-stat-key="plays"] .stat-icon { background: var(--purple-soft); color: var(--purple); }
.announcement-banner { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; margin-bottom: 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 13px; border: 1px solid transparent; }
.announcement-banner i { margin-top: 3px; font-size: 16px; }
.banner-info { background: var(--info-soft); color: var(--info-dark); border-color: var(--info-dark); }
.banner-success { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.banner-warning { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.banner-promo { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }

/* ==================== BUTTONS ==================== */
.btn-primary, .btn-secondary, .btn-action, .btn-approve, .btn-reject, .btn-leave, .btn-join { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; font-weight: 700; letter-spacing: .3px; transition: .2s; white-space: nowrap; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(26,42,68,.2); }
.btn-primary:hover { background: var(--navy-light); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26,42,68,.3); }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--navy-soft); border-color: var(--border-soft); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { padding: 8px 14px !important; font-size: 11px !important; border-radius: 10px !important; }
.btn-action { padding: 10px 16px; font-size: 12px; border-radius: 10px; }
.btn-edit { background: var(--navy-soft); color: var(--navy); }
.btn-edit:hover { background: var(--navy); color: #fff; }
.btn-delete { background: var(--red-soft); color: var(--red); }
.btn-delete:hover { background: var(--red); color: #fff; }
.btn-reset-pass { background: var(--amber-soft); color: var(--amber); }
.btn-reset-pass:hover { background: var(--amber); color: #fff; }
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { background: #108A5B; }
.btn-reject { background: var(--red-soft); color: var(--red); }
.btn-reject:hover { background: var(--red); color: #fff; }
.btn-join:hover, .btn-leave:hover { filter: brightness(.9); }

/* ==================== FORMS ==================== */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label, .setting-item label { font-size: 12px; font-weight: 700; color: var(--text-soft); letter-spacing: .3px; }
.form-group input, .form-group select, .form-group textarea, .setting-item input, .filter-select, .search-bar input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border-color); border-radius: 12px; background: #fff; font-size: 14px; color: var(--text-main); transition: .2s; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .setting-item input:focus, .filter-select:focus, .search-bar input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(26,42,68,.08); }
.form-group input:disabled { background: var(--bg-muted); color: var(--text-muted); }
.form-group input[type="color"] { height: 46px; padding: 4px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.filter-select { width: auto; min-width: 160px; font-weight: 700; cursor: pointer; padding-right: 36px; }
.schedule-filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.search-bar { position: relative; width: 100%; max-width: 400px; margin-bottom: 24px; }
.search-bar i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); z-index: 2; }
.search-bar input { padding-left: 46px; border-radius: 40px; box-shadow: var(--shadow-xs); }

/* ==================== MEMBERS ==================== */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.member-card { margin-bottom: 0; display: flex; flex-direction: column; }
.member-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.member-avatar { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-light)); box-shadow: 0 0 0 4px var(--gold-soft); font-family: var(--font-display); }
.member-level { padding: 6px 14px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; background: var(--bg-muted); color: var(--text-muted); }
.level-beginner { background: var(--green-soft); color: var(--green); }
.level-intermediate { background: var(--amber-soft); color: var(--amber); }
.level-advanced { background: var(--navy-soft); color: var(--navy); }
.member-info { flex: 1; }
.member-info h3 { font-size: 20px; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.member-info p { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; font-weight: 500; }
.member-info p i { width: 16px; text-align: center; color: var(--gold); }
.member-stats { display: flex; margin: 18px 0; padding: 16px 0; border-radius: var(--radius-md); background: var(--bg-muted); border: 1px solid var(--border-color); }
.member-stats .stat-item { flex: 1; text-align: center; }
.member-stats .stat-item + .stat-item { border-left: 1px solid var(--border-color); }
.member-stats .stat-value { font-size: 26px; font-weight: 900; color: var(--navy); font-family: var(--font-display); }
.member-stats .stat-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.member-actions { display: flex; gap: 8px; }
.member-actions .btn-action { flex: 1; padding: 10px 6px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); background: #fff; border: 2px dashed var(--border-dashed); border-radius: var(--radius-lg); }
.empty-state i { font-size: 42px; color: #CBD5E1; margin-bottom: 14px; display: block; }

/* ==================== SCHEDULE ==================== */
.schedule-grid, .upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.schedule-card, .upcoming-card { padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.schedule-card::before, .upcoming-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.schedule-card.type-coaching::before { background: var(--purple); }
.schedule-card.type-mabar::before { background: var(--green); }
.schedule-card h3, .upcoming-card h3 { font-size: 20px; font-weight: 800; line-height: 1.35; color: var(--text-main); }
.schedule-badge { letter-spacing: .5px; }
.schedule-info { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.schedule-info-item { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.participant-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--bg-muted); border: 1px solid var(--border-color); border-radius: 20px; font-size: 11.5px; font-weight: 700; color: var(--text-soft); }
.schedule-actions { display: flex; gap: 10px; }
.my-join-status { align-items: center; }
.participant-input { display: flex; gap: 8px; }
.participant-input input { flex: 1; padding: 12px 16px; border: 1.5px solid var(--border-color); border-radius: 12px; }
.participant-input input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(26,42,68,.08); }
.suggestions { margin-top: 8px; background: #fff; border-radius: 12px; overflow: hidden; }
.suggestions:empty { display: none; }
.suggestions:not(:empty) { border: 1px solid var(--border-color); box-shadow: var(--shadow-md); }
.suggestion-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-size: 13px; transition: .15s; }
.suggestion-item + .suggestion-item { border-top: 1px solid var(--border-color); }
.suggestion-item:hover { background: var(--navy-soft); }
.suggestion-name { font-weight: 700; color: var(--text-main); }
.suggestion-name i { color: var(--gold); margin-right: 8px; }
.suggestion-id { font-family: monospace; font-size: 11.5px; color: var(--text-muted); }
.suggestion-item.new-member .suggestion-name { color: var(--green); }
.participants-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.participant-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-muted); border: 1px solid var(--border-color); border-radius: 12px; }
.participant-item.is-new { background: var(--green-soft); border-color: var(--border-green); }
.participant-info { display: flex; flex-direction: column; }
.participant-name { font-weight: 800; font-size: 14px; }
.participant-id { font-family: monospace; font-size: 11.5px; color: var(--text-muted); }
.new-badge { margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: var(--green); color: #fff; font-size: 9.5px; font-weight: 800; font-family: var(--font-body); }
.btn-remove { width: 30px; height: 30px; border: none; border-radius: 50%; background: var(--red-soft); color: var(--red); transition: .2s; }
.btn-remove:hover { background: var(--red); color: #fff; }
.points-info-box, .points-preview { display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin: 8px 0 20px; border-radius: var(--radius-md); background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-light); font-weight: 700; }
.points-info-box i { color: var(--gold); }
.max-participants-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 10px; background: var(--navy-soft); color: var(--navy); border-radius: 10px; font-size: 10.5px; font-weight: 800; }

/* ==================== RECENT ACTIVITY ==================== */
.recent-activities { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; align-items: center; gap: 16px; padding: 16px; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.play-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 10px; background: var(--bg-muted); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.play-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.play-details { flex: 1; }
.play-details h4 { font-size: 14px; font-weight: 800; }
.play-details p { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.play-points { font-weight: 900; color: var(--green); font-size: 16px; }

/* ==================== LEADERBOARD ==================== */
.leaderboard-container { padding: 16px; }
.leaderboard-item { display: flex; align-items: center; gap: 20px; padding: 18px 22px; margin-bottom: 10px; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: .2s; }
.leaderboard-item:last-child { margin-bottom: 0; }
.leaderboard-item:hover { background: var(--bg-muted); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.rank { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: var(--text-muted); background: var(--bg-muted); border: 1.5px solid var(--border-color); font-family: var(--font-display); }
.rank-1 { background: linear-gradient(135deg, #F6DC8B, #D4AF37); color: #5C430B; border-color: #D8B75E; box-shadow: 0 4px 12px rgba(212,175,55,.4); }
.rank-2 { background: linear-gradient(135deg, #EEF1F5, #B9C2CF); color: #3C4757; border-color: #C9D0DA; }
.rank-3 { background: linear-gradient(135deg, #F3D2B4, #C98B54); color: #5E3411; border-color: #D9A97B; }
.leaderboard-item:nth-child(1) { background: linear-gradient(90deg, var(--gold-soft), #fff 60%); border-color: var(--gold-light); }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-info h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 17px; font-weight: 800; color: var(--text-main); }
.leaderboard-info p { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.leaderboard-points { font-size: 30px; font-weight: 900; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.leaderboard-points span { font-size: 12px; font-weight: 700; margin-left: 4px; font-family: var(--font-body); }

/* ==================== ADJUSTMENT ==================== */
.tracking-section { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 28px; align-items: start; }
.tracking-form h3, .recent-plays h3 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 20px; letter-spacing: -0.3px; }
.adj-type-radio { display: flex; gap: 12px; }
.radio-option { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: #fff; border: 1.5px solid var(--border-color); border-radius: 12px; font-weight: 700; font-size: 13px; cursor: pointer; transition: .2s; }
.radio-option input { accent-color: var(--navy); width: 16px; height: 16px; }
.radio-option:has(input:checked), .radio-option.selected { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); }
.points-preview { margin: 4px 0 20px; }
#adjustmentHistory { display: flex; flex-direction: column; gap: 12px; }
.adj-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.adj-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.adj-icon.add { background: var(--green-soft); color: var(--green); }
.adj-icon.subtract { background: var(--red-soft); color: var(--red); }
.adj-content { flex: 1; min-width: 0; }
.adj-title { font-size: 15px; font-weight: 800; }
.adj-meta { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.adj-points { font-size: 22px; font-weight: 900; white-space: nowrap; font-family: var(--font-display); }
.adj-points.add { color: var(--green); }
.adj-points.subtract { color: var(--red); }

/* =========================================
   REWARD KATALOG (FLEKSIBEL & SEJAJAR)
   ========================================= */
#rewardsGrid, #masterRewardsList {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 12px !important; 
    width: 100% !important;
    align-items: stretch !important; 
}

@media (min-width: 768px) {
    #rewardsGrid, #masterRewardsList {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 24px !important;
    }
}

/* Kartu Utama */
.reward-card-new {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 16px !important; 
    border: 1px solid #f1f5f9 !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; 
    overflow: hidden !important;
    height: 100% !important; 
    position: relative !important;
}

/* Kunci Tinggi Gambar */
.reward-img-box {
    width: 100% !important;
    height: 130px !important; 
    min-height: 130px !important;
    max-height: 130px !important;
    background-color: #f8fafc !important; 
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.reward-img-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Area Info (Teks & Tombol) */
.reward-info-box {
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: #ffffff;
}

/* Kunci Judul (Selalu 2 Baris) */
.reward-name-new {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 38px !important; /* Kunci tinggi judul */
    min-height: 38px !important;
}

/* Harga & Stok */
.reward-meta-new {
    display: flex !important;
    flex-direction: column !important;
    margin-top: auto !important; /* Dorong harga & tombol ke bawah */
    margin-bottom: 12px !important;
}
.reward-price-new {
    font-size: 16px !important; 
    font-weight: 900 !important;
    color: #D4AF37 !important; 
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.reward-stock-new {
    font-size: 11px !important;
    color: #94a3b8 !important;
    margin-top: 2px !important;
}

/* =========================================
   TOMBOL MEMBER DI KARTU (REDEEM / PAY)
   ========================================= */
.btn-action-wrapper {
    display: flex !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 15px !important;
}

.btn-member-redeem {
    width: 100% !important;
    max-width: 150px !important; /* ✅ Membatasi lebar agar ramping */
    margin: 0 auto !important; /* ✅ Memaksa tombol ke tengah */
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important; 
    color: #ffffff !important; 
    border: none !important; 
    padding: 8px 12px !important; 
    border-radius: 50px !important; 
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important; 
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important; 
}

/* Ikon di dalam tombol */
.btn-member-redeem i { 
    color: #ffffff !important; 
    font-size: 16px !important; 
    opacity: 0.9 !important;
}

/* Efek Hover */
.btn-member-redeem:hover:not(:disabled) {
    transform: translateY(-2px) !important; 
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5) !important; 
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%) !important;
}

/* Tombol Disabled (Out of Stock) */
.btn-member-disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    max-width: 150px !important;
    margin: 0 auto !important;
}
.btn-member-disabled i { color: #94a3b8 !important; text-shadow: none !important; }
.btn-member-disabled:hover { transform: none !important; box-shadow: none !important; background: #f1f5f9 !important; }

/* Tombol Admin */
.btn-admin-edit, .btn-admin-delete {
    flex: 1;
    padding: 10px 4px;
    border-radius: 50px !important;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    background: #ffffff;
}
.btn-admin-edit { border: 1.5px solid #cbd5e1 !important; color: #1e293b; }
.btn-admin-edit:hover { background: #1e293b; color: #ffffff; border-color: #1e293b !important; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(30, 41, 59, 0.2); }
.btn-admin-delete { border: 1.5px solid #fca5a5 !important; color: #ef4444; }
.btn-admin-delete:hover { background: #ef4444; color: #ffffff; border-color: #ef4444 !important; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(239, 68, 68, 0.2); }

/* Tombol Modal (Redeem Now) */
.btn-modal-redeem {
    width: 100%;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important; 
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}
.btn-modal-redeem i { color: #ffffff !important; font-size: 15px !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; }
.btn-modal-redeem::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transform: skewX(-20deg); transition: 0.6s; }
.btn-modal-redeem:hover::before { left: 200%; }
.btn-modal-redeem:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5); background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%) !important; }
.btn-modal-redeem-disabled { background: #f1f5f9 !important; color: #94a3b8 !important; border: 1px solid #e2e8f0 !important; box-shadow: none !important; cursor: not-allowed; transform: none !important; }
.btn-modal-redeem-disabled i { color: #94a3b8 !important; text-shadow: none !important; }
.btn-modal-redeem-disabled::before { display: none; }
.btn-modal-redeem-disabled:hover { transform: none !important; box-shadow: none !important; background: #f1f5f9 !important; }

/* =========================================
   FIX UNTUK LAYAR HP (MOBILE)
   ========================================= */
@media (max-width: 480px) {
    #rewardsGrid, #masterRewardsList {
        gap: 10px !important;
    }
    .reward-info-box {
        padding: 10px 8px !important;
    }
    .btn-member-redeem {
        padding: 6px 8px !important;
        gap: 6px !important;
    }
    .btn-member-redeem i {
        font-size: 14px !important;
    }
    /* Penyesuaian teks di dalam tombol */
    .btn-member-redeem div span:first-child { font-size: 9px !important; }
    .btn-member-redeem div span:last-child { font-size: 13px !important; }

    .reward-name-new {
        font-size: 12px !important;
        height: 34px !important;
    }
    .reward-price-new {
        font-size: 14px !important;
    }
}

/* ==================== PROFILE ==================== */
.profile-container { padding: 36px 32px; }
.profile-recent h3 { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }

/* ==================== SETTINGS ==================== */
.settings-subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; padding: 8px; background: #fff; border: 1px solid var(--border-color); border-radius: 16px; width: 100%; overflow: visible; }
.subnav-btn { flex: 0 0 auto; padding: 10px 20px; border: none; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 700; color: var(--text-muted); transition: .2s; white-space: nowrap; }
.subnav-btn:hover { color: var(--navy); background: var(--navy-soft); }
.subnav-btn.active { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(26,42,68,.2); }
.settings-subtab-pane { display: none; }
.settings-subtab-pane.active { display: block; animation: fadeUp .25s ease; }
.settings-info { display: flex; gap: 10px; align-items: center; }
.settings-card-header { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border-color); }
.settings-card-header h3 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 20px; }
.setting-item { display: flex; flex-direction: column; gap: 8px; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.role-access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.role-checkbox { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; transition: .2s; background: #fff; border: 1.5px solid var(--border-color); border-radius: var(--radius-md); }
.role-checkbox:hover { border-color: var(--navy); }
.role-checkbox input { width: 20px; height: 20px; accent-color: var(--navy); }
.role-checkbox:has(input:checked), .role-checkbox.checked { border-color: var(--navy); background: var(--navy-soft); }
.role-checkbox-icon { width: 42px; height: 42px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.role-checkbox-text { display: flex; flex-direction: column; flex: 1; }
.role-checkbox-label { font-weight: 800; font-size: 14px; }
.role-checkbox-status { font-size: 10px; font-weight: 800; letter-spacing: .8px; color: var(--text-muted); }
.master-type-card { background: #fff; border: 1px solid var(--border-color); border-left: 5px solid var(--navy); border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-xs); }
.master-type-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.master-type-icon { width: 50px; height: 50px; border-radius: 14px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.master-type-info { flex: 1; min-width: 160px; }
.master-type-info h3 { font-size: 18px; font-weight: 800; }
.master-type-info p { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.master-type-badge { padding: 5px 12px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.master-type-badge.system { background: var(--info-soft); color: var(--info-dark); }
.master-type-badge.custom { background: var(--gold-soft); color: var(--gold); }
.master-type-actions { display: flex; gap: 8px; }
.master-subtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.master-subtype-item { padding: 14px 16px; background: var(--bg-muted); border: 1px solid var(--border-color); border-left: 3px solid var(--navy); border-radius: 10px; }
.master-subtype-item .name { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.master-subtype-item .points { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ==================== MODAL ==================== */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; overflow-y: auto; background: rgba(26, 42, 68, .6); backdrop-filter: blur(6px); }
.modal.active { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.modal-content { width: 100%; max-width: 540px; margin: auto; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .2s ease; overflow: hidden; }
.modal-large { max-width: 800px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 30px; border-bottom: 1px solid var(--border-color); background: #fff; }
.modal-header h3 { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.modal-header .close { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; transition: .2s; }
.modal-header .close:hover { background: var(--red-soft); color: var(--red); }
.modal-body { padding: 30px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 0 0; margin-top: 10px; }
form > .modal-footer { border-top: 1px solid var(--border-color); padding-top: 20px; }
.notif-item { display: flex; align-items: center; gap: 18px; padding: 18px; margin-bottom: 14px; background: var(--bg-muted); border: 1px solid var(--border-color); border-radius: var(--radius-md); flex-wrap: wrap; }
.notif-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--navy-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.notif-content { flex: 1; min-width: 200px; }
.notif-content h4 { font-size: 16px; font-weight: 800; }
.notif-content p { font-size: 13px; color: var(--text-soft); margin-top: 4px; }
.notif-content small { color: var(--text-muted); font-size: 11.5px; font-weight: 600; }
.notif-actions { display: flex; gap: 10px; }
.notif-empty { text-align: center; padding: 50px; color: var(--text-muted); }
.notif-empty i { font-size: 40px; color: #CBD5E1; display: block; margin-bottom: 12px; }
.import-dropzone { text-align: center; padding: 50px 20px; border: 2px dashed var(--border-dashed); border-radius: var(--radius-lg); background: var(--bg-muted); cursor: pointer; transition: .2s; }
.import-dropzone:hover, .import-dropzone.dragover { border-color: var(--navy); background: var(--navy-soft); }
.import-dropzone i { font-size: 48px; color: var(--gold); margin-bottom: 12px; }
.import-dropzone p { margin-bottom: 16px; color: var(--text-soft); font-weight: 700; }
.import-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.import-summary-card { text-align: center; padding: 16px 8px; border-radius: var(--radius-md); background: var(--bg-muted); border: 1px solid var(--border-color); }
.import-summary-card .num { display: block; font-size: 30px; font-weight: 900; font-family: var(--font-display); }
.import-summary-card .lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: .8px; }
.import-summary-card.new .num { color: var(--green); }
.import-summary-card.duplicate .num { color: var(--amber); }
.import-summary-card.error .num { color: var(--red); }
.import-preview-table { max-height: 350px; overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.import-preview-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.import-preview-table th { position: sticky; top: 0; background: var(--bg-muted); padding: 12px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); font-weight: 800; }
.import-preview-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-amber-soft); font-weight: 500; }
.status-badge { padding: 4px 12px; border-radius: 12px; font-size: 11px; font-weight: 800; }
.status-badge.ok { background: var(--green-soft); color: var(--green); }
.status-badge.duplicate { background: var(--amber-soft); color: var(--amber); }
.status-badge.error { background: var(--red-soft); color: var(--red); }
.import-result { text-align: center; padding: 34px 10px; }
.import-result i { font-size: 60px; color: var(--green); margin-bottom: 14px; }
.import-result h3 { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 8px; letter-spacing: -0.3px; }

/* ==================== FOOTER ==================== */
.app-footer { text-align: center; padding: 24px; color: var(--text-muted); font-size: 12.5px; border-top: 1px solid var(--border-color); margin-top: 28px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .top-header { padding: 0 20px; }
    .content-wrapper { padding: 24px 20px; }
    .tracking-section { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .content-wrapper { padding: 18px 16px; }
    .page-title, .header-section h2 { font-size: 26px; }
    .header-section { flex-direction: column; align-items: stretch; }
    .header-section > div, .header-section button { width: 100%; }
    .header-section button { justify-content: center; }
    .stats-overview { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stat-card { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
    .stat-icon { width: 50px; height: 50px; font-size: 20px; }
    .stat-number { font-size: 30px; }
    .members-grid, .schedule-grid, .upcoming-grid, .form-row, .form-row-3, .password-criteria { grid-template-columns: 1fr; }
    .user-profile-top span, .user-profile-top .fa-chevron-down { display: none; }
    .user-profile-top { padding: 4px; }
    .login-card { padding: 34px 24px; }
    .leaderboard-container { padding: 10px; }
    .leaderboard-item { gap: 14px; padding: 14px 12px; }
    .rank { width: 40px; height: 40px; font-size: 18px; }
    .leaderboard-info h4 { font-size: 15px; }
    .leaderboard-points { font-size: 26px; }
    .modal.active { padding: 10px; }
    .modal-header { padding: 18px 20px; }
    .modal-body { padding: 20px; }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer button { width: 100%; }
    .import-summary { grid-template-columns: 1fr 1fr; }
    .subnav-btn { flex: 1 1 auto; }
    .member-actions { flex-direction: column; }
    .member-actions .btn-action { width: 100%; }
    .notif-actions { width: 100%; }
    .notif-actions button { flex: 1; }
    .match-teams { flex-wrap: nowrap; gap: 5px; }
    .schedule-card .btn-secondary.btn-sm, .modal-body .btn-secondary.btn-sm { white-space: nowrap; }
}
@media (max-width: 420px) {
    .stats-overview { grid-template-columns: 1fr; }
    .stat-card { flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .member-card:hover, .schedule-card:hover, .upcoming-card:hover, .stat-card:hover, .btn-primary:hover, .btn-login:hover, .leaderboard-item:hover, .reward-card-new:hover, .reward-card-new:hover .reward-img-box img { transform: none !important; }
}

/* =====================================================================
   PROFILE STAT CARDS (Dashboard Member)
   ===================================================================== */
.profile-stat-card { background: #f8fafc; padding: 16px; border-radius: 12px; border: 2px solid #e2e8f0; text-align: center; cursor: pointer; transition: all 0.2s ease-in-out; user-select: none; position: relative; }
.profile-stat-card .stat-icon-click { font-size: 10px; margin-left: 4px; opacity: 0.6; }
.profile-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); }
.profile-stat-card:active { transform: translateY(1px); }
.profile-stat-card.card-points:hover { border-color: #3b82f6; }
.profile-stat-card.card-mabar:hover { border-color: #10b981; }
.profile-stat-card.card-coaching:hover { border-color: #8b5cf6; }
.profile-stat-card.card-points:active { background: #eff6ff; border-color: #3b82f6; }
.profile-stat-card.card-mabar:active { background: #ecfdf5; border-color: #10b981; }
.profile-stat-card.card-coaching:active { background: #f5f3ff; border-color: #8b5cf6; }

/* =====================================================================
   VALIDASI PASSWORD (MODAL FIRST LOGIN)
   ===================================================================== */
.criteria-item.valid { color: var(--green) !important; font-weight: 700; }
.criteria-item.valid i { color: var(--green) !important; font-size: 10px !important; }

/* =========================================
   REWARD TAB MENU (KATALOG / HISTORY / TNC)
   ========================================= */
.reward-tabs-container {
    display: flex !important;
    flex-wrap: nowrap !important; 
    background: #fff !important;
    padding: 6px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    margin-bottom: 24px !important;
    gap: 4px !important;
    width: 100% !important;
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
}
.reward-tabs-container::-webkit-scrollbar { display: none; }
.reward-tabs-container button {
    padding: 10px 20px !important;
    border-radius: 8px !important; 
    border: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important; 
    flex-shrink: 0 !important; 
}
.reward-tabs-container button:hover { background: #f1f5f9 !important; color: var(--navy) !important; }
#tabBtnKatalog.active-tab, #tabBtnRiwayat.active-tab, #tabBtnTnc.active-tab { background: var(--navy) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(26,42,68,0.2) !important; }

/* =====================================================================
   FIX Z-INDEX & KLIK UNTUK HEADER (HAMBURGER, NOTIF, PROFIL)
   ===================================================================== */
.top-header { position: sticky !important; top: 0 !important; z-index: 9999 !important; background: rgba(248, 249, 250, 0.95) !important; backdrop-filter: blur(12px) !important; }
.nav-toggle, .nav-notif, .user-profile-top { position: relative !important; z-index: 10000 !important; pointer-events: auto !important; cursor: pointer !important; }
.content-wrapper { position: relative; z-index: 1; }
.sidebar { z-index: 10001 !important; }

/* =========================================================
   PAKSA TOMBOL REWARD JADI SERAGAM & TIDAK TURUN BARIS
   ========================================================= */
.reward-info-box .btn-action-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 15px !important;
}

.reward-info-box .btn-member-redeem {
    width: 100% !important;
    max-width: 170px !important; /* ✅ Diperlebar sedikit agar nominal panjang muat */
    margin: 0 auto !important;
    padding: 6px 12px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important; 
    border-radius: 50px !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* Ikon Dompet */
.reward-info-box .btn-member-redeem i {
    color: #ffffff !important;
    font-size: 15px !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* Wadah Teks (Pay & Rp) */
.reward-info-box .btn-member-redeem div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    white-space: nowrap !important; /* ✅ MENCEGAH TEKS TURUN BARIS */
}

/* Teks "PAY" */
.reward-info-box .btn-member-redeem div span:first-child {
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Teks "Rp. XXX" */
.reward-info-box .btn-member-redeem div span:last-child {
    font-size: 13px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: 0.3px !important;
}

/* Efek Hover */
.reward-info-box .btn-member-redeem:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4) !important;
}

/* =========================================================
   FINAL FIX: MODAL & TOMBOL REWARD (MOBILE READY)
   ========================================================= */

/* 1. PAKSA TOMBOL REWARD SERAGAM */
.reward-info-box .btn-action-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 15px !important;
}

.reward-info-box .btn-member-redeem {
    width: 100% !important;
    max-width: 170px !important; 
    margin: 0 auto !important;
    padding: 6px 12px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important; 
    border-radius: 50px !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.reward-info-box .btn-member-redeem i {
    color: #ffffff !important;
    font-size: 15px !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.reward-info-box .btn-member-redeem div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    white-space: nowrap !important; 
}

.reward-info-box .btn-member-redeem div span:first-child {
    font-size: 9px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.reward-info-box .btn-member-redeem div span:last-child {
    font-size: 13px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: 0.3px !important;
}

.reward-info-box .btn-member-redeem:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4) !important;
}

/* 2. FIX MODAL DI MOBILE (Z-INDEX & SCROLL) */
@media (max-width: 992px) {
    /* Paksa modal berada di atas header & sidebar */
    .modal { 
        z-index: 999999 !important; 
        padding: 10px !important; /* Jarak aman di layar HP */
    }
    
    .modal-content { 
        max-height: 95vh !important; 
        display: flex !important;
        flex-direction: column !important;
        border-radius: 16px !important;
    }

    /* Kunci header modal agar tombol X tidak hilang saat di-scroll */
    .modal-header { 
        position: sticky !important; 
        top: 0 !important; 
        z-index: 1000000 !important; 
        background: #fff !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 15px 20px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    /* Perbesar dan perjelas tombol X */
    .modal-header .close { 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 28px !important;
        background: #fef2f2 !important; 
        color: #ef4444 !important; 
        border-radius: 50% !important;
        cursor: pointer !important;
        z-index: 1000001 !important;
    }

    /* ✅ Agar isi modal-body bisa di-scroll tanpa mendorong header */
    .modal-body {
        overflow-y: auto !important;
        flex: 1 !important;
    }

    /* ✅ FITUR BARU: Agar form di dalam modal (seperti Edit Profile) bisa di-scroll */
    .modal-content > form {
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        flex: 1 !important;
        max-height: 100% !important;
    }

    /* ✅ Dorong tombol action (Save/Cancel) agar selalu rapi di paling bawah */
    .modal-content > form > .modal-footer {
        margin-top: auto !important;
        padding-bottom: 10px !important;
    }
}

/* Memaksa modal statistik pemain berada di atas segalanya */
#playerStatsModal {
    z-index: 99999 !important;
}
#playerStatsModal .modal-content {
    position: relative;
    z-index: 100000 !important;
}

/* Perbaikan z-index: Navbar di bawah Sidebar, Modal paling atas */
.top-header {
    z-index: 900 !important; /* Navbar lebih rendah */
}
.sidebar {
    z-index: 9999 !important; /* Sidebar lebih tinggi dari Navbar */
}

/* ============ GOOGLE SIGN-IN FIX ============ */
/* Paksa iframe Google full-size dalam overlay agar seluruh area clickable */
#googleOverlay > div,
#googleOverlay iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

/* Pastikan overlay benar-benar on-top */
#googleOverlay {
    pointer-events: auto !important;
}

/* Fallback: jika Google belum render, custom button harus tetap clickable */
#customGoogleBtn {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* ============ GOOGLE BUTTON HOVER EFFECT ============ */
.btn-google-custom {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.btn-google-custom:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px) !important;
}

.btn-google-custom:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

/* Animasi ikon Google sedikit berputar saat dihover */
.btn-google-custom:hover img {
    transform: rotate(15deg) scale(1.1);
    transition: transform 0.3s ease;
}

/* =========================================
   SCHEDULE CARD NEW DESIGN (WITH IMAGE)
   ========================================= */
.schedule-card-image {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.schedule-card-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

/* Bagian Atas: Gambar */
.sc-image-wrapper {
    position: relative;
    height: 180px;
    width: 100%;
    overflow: hidden;
}

.sc-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.schedule-card-image:hover .sc-image-wrapper img {
    transform: scale(1.05); /* Efek zoom saat dihover */
}

/* Shading Gradient */
.sc-shading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

/* Badges Top (Type) */
.sc-top-badges {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 2;
}

.sc-type-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Teks Overlay (Judul & Status) */
.sc-text-overlay {
    position: absolute;
    bottom: 15px; left: 15px; right: 15px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-text-overlay h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    width: fit-content;
    backdrop-filter: blur(4px);
}

/* Bagian Bawah: Detail Putih */
.sc-bottom-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sc-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 8px;
}

.sc-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-info-item i {
    color: #94a3b8;
    font-size: 13px;
}