/**
 * ============================================
 * ARABICDOSTING MEMBER PANEL
 * ============================================
 * Theme: Elegant Dark & Gold
 * Compatible: Desktop & Mobile
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Gold Palette */
    --gold:          #C9A84C;
    --gold-light:    #E2C97E;
    --gold-bright:   #F5D98B;
    --gold-dark:     #9A7A2C;
    --gold-muted:    rgba(201, 168, 76, 0.12);
    --gold-border:   rgba(201, 168, 76, 0.3);

    /* Dark Palette */
    --bg-base:       #0A0A0B;
    --bg-surface:    #111114;
    --bg-card:       #16161A;
    --bg-elevated:   #1C1C22;
    --bg-hover:      #22222A;

    /* Text */
    --text-primary:  #F0EAD6;
    --text-muted:    rgba(240, 234, 214, 0.55);
    --text-faint:    rgba(240, 234, 214, 0.3);
    --white:         #FFFFFF;

    /* Status */
    --success:       #4CAF7C;
    --warning:       #E6A817;
    --danger:        #E05252;
    --info:          #5B9BD5;

    /* Layout */
    --sidebar-width:    265px;
    --topbar-height:    62px;

    /* Elevation */
    --shadow-sm:  0 2px 12px rgba(0,0,0,0.4);
    --shadow-md:  0 6px 24px rgba(0,0,0,0.5);
    --shadow-lg:  0 12px 48px rgba(0,0,0,0.6);
    --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.18);

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Keep old vars for compatibility */
    --primary: #C9A84C;
    --primary-dark: #9A7A2C;
    --primary-light: rgba(201,168,76,0.12);
    --secondary: rgba(240,234,214,0.55);
    --dark: #F0EAD6;
    --light: #1C1C22;
}

/* ============================================
   GLOBAL
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
}

a { text-decoration: none; transition: var(--transition); }

/* ============================================
   WRAPPER
   ============================================ */
.wrapper { display: flex; min-height: 100vh; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--gold-border);
    position: fixed;
    left: 0; top: 0;
    z-index: 1050;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    flex-shrink: 0;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-border) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 3px; }

.sidebar-header {
    padding: 20px 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--gold-border);
}

.sidebar-header h3 {
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.4px;
}

.sidebar-header i { color: var(--gold); }

.sidebar-user {
    padding: 20px 18px;
    text-align: center;
    border-bottom: 1px solid var(--gold-border);
    background: linear-gradient(180deg, rgba(201,168,76,0.04) 0%, transparent 100%);
}

.user-avatar {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 2px solid var(--gold-border);
    background: var(--gold-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i { font-size: 34px; color: var(--gold); }

.user-info h6 { color: var(--text-primary); margin-bottom: 6px; font-weight: 600; font-size: 0.93rem; }
.user-info .small { color: var(--text-muted) !important; font-size: 0.77rem; }

.sidebar-menu { padding: 12px 0 8px; }
.sidebar-menu .nav-item { margin: 1px 8px; }

.sidebar-menu .nav-link {
    color: var(--text-muted);
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 11px;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 400;
}

.sidebar-menu .nav-link:hover {
    background: var(--gold-muted);
    color: var(--gold-light);
}

.sidebar-menu .nav-link.active {
    background: linear-gradient(135deg, rgba(201,168,76,0.18) 0%, rgba(201,168,76,0.06) 100%);
    color: var(--gold-light);
    font-weight: 500;
    border-left: 2px solid var(--gold);
    padding-left: 11px;
}

.sidebar-menu .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.88rem;
    flex-shrink: 0;
    color: rgba(201,168,76,0.5);
    transition: var(--transition);
}

.sidebar-menu .nav-link:hover i,
.sidebar-menu .nav-link.active i { color: var(--gold); }

.sidebar-menu .nav-link.text-danger { color: rgba(224,82,82,0.65) !important; }
.sidebar-menu .nav-link.text-danger:hover { background: rgba(224,82,82,0.08); color: #E05252 !important; }
.sidebar-menu .nav-link.text-danger i { color: rgba(224,82,82,0.65) !important; }

.sidebar-menu .mt-3 { border-top: 1px solid var(--gold-border); padding-top: 10px; }

/* ============================================
   CONTENT
   ============================================ */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    background: var(--bg-base);
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1039;
}

.topbar #sidebarToggle {
    font-size: 1rem;
    color: var(--text-muted);
    border: 1px solid var(--gold-border);
    background: var(--bg-elevated);
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.topbar #sidebarToggle:hover {
    background: var(--gold-muted);
    color: var(--gold);
    border-color: var(--gold);
}

.topbar-right .btn-link {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
}

.topbar-right .btn-link:hover { color: var(--gold-light); }

.topbar-right .dropdown-menu {
    border: 1px solid var(--gold-border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 8px;
}

.topbar-right .dropdown-item {
    color: var(--text-muted);
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.topbar-right .dropdown-item:hover { background: var(--gold-muted); color: var(--gold-light); }
.topbar-right .dropdown-item.text-danger { color: rgba(224,82,82,0.7) !important; }
.topbar-right .dropdown-item.text-danger:hover { background: rgba(224,82,82,0.1); color: #E05252 !important; }
.topbar-right .dropdown-divider { border-color: var(--gold-border); margin: 4px 0; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content { flex: 1; padding: 28px; }

.page-header { margin-bottom: 26px; }

.page-header h4 {
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-surface);
    padding: 14px 28px;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.82rem;
    border-top: 1px solid var(--gold-border);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(201,168,76,0.45);
}

.card-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--gold-border);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.card-body { padding: 22px; }

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #1A1508 0%, #0E0C05 100%);
    border: 1px solid var(--gold-border);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-card h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--gold-light);
}

.welcome-card p, .welcome-card .text-white-50 { color: var(--text-muted) !important; }

.welcome-icon { font-size: 80px; opacity: 0.1; color: var(--gold); }

/* Info Card */
.info-card .info-icon {
    width: 50px; height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Stat Card */
.stat-card {
    padding: 22px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    border: 1px solid var(--gold-border);
    background: var(--bg-card);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    background: var(--gold-muted);
    border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-right: 16px;
    color: var(--gold);
    flex-shrink: 0;
}

.stat-card .stat-info h3 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
}

.stat-card .stat-info p { margin: 0; color: var(--text-muted); font-size: 0.82rem; }

/* Profile Card */
.profile-card .profile-avatar {
    width: 120px; height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid var(--gold-border);
    background: var(--gold-muted);
    display: flex; align-items: center; justify-content: center;
}

.profile-card .profile-avatar i { font-size: 80px; color: var(--gold); }

.profile-info .info-item {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(201,168,76,0.1);
    color: var(--text-primary);
}

.profile-info .info-item:last-child { border-bottom: none; }
.profile-info .info-item i { width: 30px; font-size: 1rem; color: var(--gold); }

/* ============================================
   SOFT BACKGROUNDS
   ============================================ */
.bg-primary-soft { background: rgba(201,168,76,0.1); color: var(--gold-light); }
.bg-success-soft { background: rgba(76,175,124,0.1); color: var(--success); }
.bg-warning-soft { background: rgba(230,168,23,0.1); color: var(--warning); }
.bg-danger-soft  { background: rgba(224,82,82,0.1) !important; color: var(--danger); }
.bg-info-soft    { background: rgba(91,155,213,0.1); color: var(--info); }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-body {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.03) 0%, transparent 50%),
        var(--bg-base);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper { width: 100%; max-width: 430px; }

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(201,168,76,0.05);
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
}

.auth-header { text-align: center; margin-bottom: 32px; }

.auth-logo {
    width: 82px; height: 82px;
    background: var(--gold-muted);
    border: 2px solid var(--gold-border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}

.auth-logo i { font-size: 36px; color: var(--gold); }
.auth-logo.otp-logo { background: rgba(76,175,124,0.08); border-color: rgba(76,175,124,0.3); }
.auth-logo.otp-logo i { color: var(--success); }

.auth-header h4 {
    color: var(--gold-light);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1.35rem;
}

.auth-header p { color: var(--text-muted); margin: 0; font-size: 0.875rem; }

.auth-form .form-label { font-weight: 500; color: var(--text-primary); font-size: 0.875rem; margin-bottom: 6px; }

.auth-form .form-control {
    background: var(--bg-elevated);
    border: 1px solid rgba(201,168,76,0.22);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.auth-form .form-control::placeholder { color: var(--text-faint); }

.auth-form .form-control:focus {
    background: var(--bg-elevated);
    border-color: var(--gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.auth-form .input-group-text {
    background: var(--bg-elevated);
    border: 1px solid rgba(201,168,76,0.22);
    border-right: none;
    color: var(--gold);
}

.auth-form .input-group .form-control { border-left: none; }
.auth-form .input-group:focus-within .input-group-text { border-color: var(--gold); }

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gold-border);
    color: var(--text-faint);
    font-size: 0.82rem;
}

.otp-input {
    font-size: 2rem;
    letter-spacing: 10px;
    font-weight: 700;
    color: var(--gold-light);
    background: var(--bg-elevated);
    border-color: rgba(201,168,76,0.22);
    text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 60%, var(--gold-light) 100%);
    border: none;
    color: #0A0A0B;
    font-weight: 600;
    box-shadow: 0 3px 14px rgba(201,168,76,0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 60%, var(--gold-bright) 100%);
    color: #0A0A0B;
    box-shadow: 0 5px 20px rgba(201,168,76,0.42);
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--gold-border);
    color: var(--text-muted);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--gold); color: var(--gold-light); }

.btn-outline-secondary {
    border: 1px solid rgba(201,168,76,0.25);
    color: var(--text-muted);
    background: transparent;
}
.btn-outline-secondary:hover { background: var(--gold-muted); border-color: var(--gold); color: var(--gold-light); }

.btn-success { background: linear-gradient(135deg, #2D7A4F, var(--success)); border: none; color: #fff; }
.btn-success:hover { background: linear-gradient(135deg, var(--success), #6FD6A0); color: #fff; }

.btn-danger { background: linear-gradient(135deg, #A03030, var(--danger)); border: none; color: #fff; }
.btn-danger:hover { background: linear-gradient(135deg, var(--danger), #F07070); color: #fff; }

.btn-info { background: linear-gradient(135deg, #3A6FA0, var(--info)); border: none; color: #fff; }
.btn-info:hover { background: linear-gradient(135deg, var(--info), #82BEF0); color: #fff; }

.btn-warning { background: linear-gradient(135deg, #A07010, var(--warning)); border: none; color: #fff; }
.btn-warning:hover { background: linear-gradient(135deg, var(--warning), #FFD060); color: #0A0A0B; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ============================================
   FORMS (global)
   ============================================ */
.form-control,
.form-select {
    background: var(--bg-elevated);
    border: 1px solid rgba(201,168,76,0.2);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-control::placeholder { color: var(--text-faint); }

.form-control:focus,
.form-select:focus {
    background: var(--bg-elevated);
    border-color: var(--gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-select option { background: var(--bg-elevated); color: var(--text-primary); }
.form-label { color: var(--text-primary); font-weight: 500; font-size: 0.875rem; }

.input-group-text {
    background: var(--bg-elevated);
    border: 1px solid rgba(201,168,76,0.2);
    color: var(--gold);
    font-size: 0.875rem;
}

.form-text { color: var(--text-faint); font-size: 0.8rem; }

/* ============================================
   TABLES
   ============================================ */
.table { margin-bottom: 0; color: var(--text-primary); }

.table thead th {
    font-weight: 600;
    color: var(--gold-light);
    border-bottom: 2px solid var(--gold-border);
    background: var(--bg-elevated);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 16px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(201,168,76,0.07);
    transition: var(--transition);
}

.table tbody tr:hover { background: rgba(201,168,76,0.04); }

.table td {
    vertical-align: middle;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.875rem;
    border-color: rgba(201,168,76,0.07);
}

.table-bordered { border-color: var(--gold-border); }
.table-bordered td, .table-bordered th { border-color: rgba(201,168,76,0.12) !important; }

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 5px 12px;
    font-weight: 500;
    border-radius: 50px;
    font-size: 0.77rem;
}

.bg-primary { background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important; color: #0A0A0B !important; }
.bg-success { background: rgba(76,175,124,0.18) !important; color: var(--success) !important; border: 1px solid rgba(76,175,124,0.28); }
.bg-warning { background: rgba(230,168,23,0.18) !important; color: var(--warning) !important; border: 1px solid rgba(230,168,23,0.28); }
.bg-danger  { background: rgba(224,82,82,0.18) !important; color: var(--danger) !important; border: 1px solid rgba(224,82,82,0.28); }
.bg-info    { background: rgba(91,155,213,0.18) !important; color: var(--info) !important; border: 1px solid rgba(91,155,213,0.28); }
.bg-secondary { background: rgba(255,255,255,0.07) !important; color: var(--text-muted) !important; border: 1px solid rgba(255,255,255,0.1); }

/* ============================================
   ALERTS
   ============================================ */
.alert { border-radius: var(--radius-md); border: none; font-size: 0.875rem; padding: 14px 18px; }
.alert-success { background: rgba(76,175,124,0.1); color: var(--success); border: 1px solid rgba(76,175,124,0.22); }
.alert-warning { background: rgba(230,168,23,0.1); color: var(--warning); border: 1px solid rgba(230,168,23,0.22); }
.alert-danger  { background: rgba(224,82,82,0.1); color: var(--danger); border: 1px solid rgba(224,82,82,0.22); }
.alert-info    { background: rgba(91,155,213,0.1); color: var(--info); border: 1px solid rgba(91,155,213,0.22); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link { background: var(--bg-elevated); border-color: var(--gold-border); color: var(--text-muted); font-size: 0.875rem; transition: var(--transition); }
.pagination .page-link:hover { background: var(--gold-muted); border-color: var(--gold); color: var(--gold-light); }
.pagination .page-item.active .page-link { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); border-color: var(--gold); color: #0A0A0B; font-weight: 600; }
.pagination .page-item.disabled .page-link { background: var(--bg-surface); border-color: rgba(201,168,76,0.1); color: var(--text-faint); }

/* ============================================
   MODAL
   ============================================ */
.modal-content { background: var(--bg-card); border: 1px solid var(--gold-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text-primary); }
.modal-header { border-bottom: 1px solid var(--gold-border); padding: 18px 24px; }
.modal-title { color: var(--gold-light); font-family: 'Playfair Display', serif; font-weight: 600; }
.modal-footer { border-top: 1px solid var(--gold-border); }
.btn-close { filter: invert(1) sepia(1) saturate(2) hue-rotate(10deg); opacity: 0.6; }
.btn-close:hover { opacity: 1; }

/* ============================================
   QR CODE
   ============================================ */
.qr-display { display: inline-block; padding: 15px; background: var(--white); border: 2px solid var(--gold-border); border-radius: var(--radius-md); }
.qr-image { max-width: 200px; width: 100%; height: auto; display: block; }
@media (max-width: 767.98px) { .qr-image { max-width: 160px; } }

/* ============================================
   SUBMENU
   ============================================ */
.submenu-list {
    padding-left: 0;
    background: rgba(0,0,0,0.15);
    border-left: 2px solid rgba(201,168,76,0.12);
    margin-left: 10px;
    border-radius: 0 0 6px 6px;
}

.submenu-list .nav-link { padding-left: 2.2rem !important; font-size: 0.84rem; color: var(--text-faint) !important; }
.submenu-list .nav-link:hover { color: var(--gold-light) !important; }
.submenu-list .nav-link.active { color: var(--gold-light) !important; }

.submenu-arrow { font-size: 0.72rem; transition: transform 0.3s ease; color: var(--text-faint); }
.has-submenu[aria-expanded="true"] .submenu-arrow { transform: rotate(180deg); }

/* ============================================
   SCROLLBAR (Global)
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================
   UTILITIES
   ============================================ */
.fw-semibold { font-weight: 600; }
.opacity-75 { opacity: 0.75; }

.text-gold       { color: var(--gold) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.text-muted      { color: var(--text-muted) !important; }
.text-white-50   { color: var(--text-muted) !important; }
.text-dark       { color: var(--text-primary) !important; }
.text-body       { color: var(--text-primary) !important; }
.text-white      { color: var(--text-primary) !important; }

.bg-white  { background: var(--bg-card) !important; }
.bg-light  { background: var(--bg-elevated) !important; }

.border        { border-color: var(--gold-border) !important; }
.border-bottom { border-bottom-color: rgba(201,168,76,0.1) !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); margin-left: 0; }
    .sidebar.active { transform: translateX(0); }
    .content { margin-left: 0; width: 100%; }
    .overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.7);
        z-index: 1038;
        transition: opacity 0.3s ease;
    }
    .overlay.active { display: block; }
}

@media (max-width: 767.98px) {
    .auth-card { padding: 32px 22px; }
    .main-content { padding: 16px; }
    .welcome-card h3 { font-size: 1.2rem; }
    .stat-card { margin-bottom: 12px; }
    .stat-card .stat-info h3 { font-size: 1.4rem; }
    .page-header h4 { font-size: 1.15rem; }
    .card-header h5 { font-size: 0.93rem; }
    .table th, .table td { white-space: nowrap; font-size: 0.82rem; padding: 8px 10px; }
    .info-card .card-body { padding: 12px 14px; }
    .info-card .info-icon { width: 40px; height: 40px; font-size: 0.95rem; }
    .profile-card .profile-avatar { width: 90px; height: 90px; }
    .profile-card .profile-avatar i { font-size: 64px; }
    .footer { font-size: 0.78rem; padding: 10px 15px; }
}

/* ============================================
   BOOTSTRAP TABLE VAR OVERRIDE (dark theme fix)
   ============================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(201,168,76,0.04);
    --bs-table-hover-bg: rgba(201,168,76,0.06);
    --bs-table-border-color: rgba(201,168,76,0.1);
    --bs-table-color: var(--text-primary);
    --bs-table-striped-color: var(--text-primary);
    --bs-table-hover-color: var(--text-primary);
}

.table-borderless {
    --bs-table-bg: transparent;
    --bs-table-border-color: transparent;
}

/* Card inner white bg fix */
.card,
.card .card-body,
.card .card-header,
.card .card-footer {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* ============================================
   INFO CARD VALUE TEXT FIX
   ============================================ */

/* Nominal / angka utama di info card */
.info-card .card-body p.fw-semibold,
.info-card .card-body .fw-semibold {
    color: var(--text-primary) !important;
}

/* "Tersedia", "Pending" label kecil */
.info-card .card-body small,
.info-card .card-body .small {
    color: var(--text-muted) !important;
}

/* Label judul kartu (Level, PIN Reward, dll) */
.info-card .card-body h6.small.text-muted {
    color: var(--text-muted) !important;
    font-size: 0.78rem !important;
}

/* fs-5 override Bootstrap */
.fs-5 { color: var(--text-primary) !important; }

/* Bonus Sponsor - nominal merah (Rp 240.000) sudah oke,
   tapi "Pending" terlalu gelap */
.info-card .card-body .text-muted {
    color: var(--text-muted) !important;
}

/* Pastikan semua p di dalam card-body terbaca */
.card-body p {
    color: var(--text-primary);
}

/* h6 label kecil global */
.card-body h6 {
    color: var(--text-primary);
}

/* ============================================
   REDEEM PAGE FIXES
   ============================================ */

/* Alur Pencairan Bonus card - replace biru muda */
.alert-alur {
    background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(201,168,76,0.02) 100%);
    border: 1px solid var(--gold-border);
    border-left: 4px solid var(--gold) !important;
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.alert-alur .fw-bold { color: var(--gold-light); }
.alert-alur .text-info { color: var(--gold) !important; }
.alert-alur .text-muted { color: var(--text-muted) !important; }
.alert-alur small { color: var(--text-muted) !important; }

/* Preview point alert (inline di form) */
.alert-preview {
    background: rgba(201,168,76,0.06);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Badge "Dijadwalkan" - warning text kontras */
.badge.bg-warning {
    background: rgba(201,168,76,0.2) !important;
    color: var(--gold-light) !important;
    border: 1px solid rgba(201,168,76,0.4);
    font-weight: 500;
}

/* Step badges di alur pencairan */
.badge.rounded-pill.bg-secondary {
    background: rgba(255,255,255,0.08) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255,255,255,0.12);
}

.badge.rounded-pill.bg-warning {
    background: rgba(201,168,76,0.18) !important;
    color: var(--gold-light) !important;
    border: 1px solid rgba(201,168,76,0.35);
}

.badge.rounded-pill.bg-success {
    background: rgba(76,175,124,0.18) !important;
    color: var(--success) !important;
    border: 1px solid rgba(76,175,124,0.35);
}

/* Nilai nominal di tabel redeem */
.text-gold-light { color: var(--gold-light) !important; }
.text-gold       { color: var(--gold) !important; }

/* alert-info sisa yang belum ke-replace */
.alert-info {
    background: rgba(201,168,76,0.06) !important;
    border-color: var(--gold-border) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   TABLE HEADER/FOOTER DARK FIX
   ============================================ */

/* Override Bootstrap table-light */
.table-light,
thead.table-light th,
tfoot.table-light td,
tfoot.table-light th,
.table > thead,
.table > tfoot {
    --bs-table-bg: var(--bg-elevated) !important;
    background-color: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border-color: var(--gold-border) !important;
}

.table-dark-header th {
    background-color: var(--bg-elevated) !important;
    color: var(--gold-light) !important;
    border-color: var(--gold-border) !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* tfoot "Total didapat" row */
.table > tfoot > tr > td {
    background-color: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border-top: 2px solid var(--gold-border) !important;
}

/* ============================================
   DISABLED / READONLY FIELD DARK FIX
   ============================================ */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: #111114 !important;
    color: rgba(240,234,214,0.4) !important;
    border-color: rgba(201,168,76,0.12) !important;
    cursor: not-allowed;
    opacity: 1;
}

/* Pastikan placeholder & text tetap terbaca */
.form-control:disabled::placeholder,
.form-control[readonly]::placeholder {
    color: rgba(240,234,214,0.2) !important;
}

/* ============================================
   PKG CARD DARK OVERRIDE (register & transfer)
   ============================================ */
.pkg-card {
    background: #16161A !important;
    border: 2px solid rgba(201,168,76,0.25) !important;
    color: #F0EAD6 !important;
}
.pkg-card:hover:not(.pkg-disabled) {
    background: #1C1C22 !important;
    border-color: #C9A84C !important;
    box-shadow: 0 8px 24px rgba(201,168,76,0.2) !important;
    transform: translateY(-3px);
}
.pkg-card.pkg-selected {
    background: linear-gradient(135deg, #1A1508, #16140A) !important;
    border-color: #C9A84C !important;
    box-shadow: 0 6px 24px rgba(201,168,76,0.28) !important;
}
.pkg-card.pkg-disabled {
    background: #111114 !important;
    opacity: .35;
}
.pkg-card .pkg-name { color: #F0EAD6 !important; }
.pkg-card .pkg-pin  { color: #E2C97E !important; }
.pkg-card .pkg-pin-label { color: rgba(240,234,214,0.5) !important; }
.pkg-card .pkg-price { color: rgba(201,168,76,0.7) !important; }
.pkg-card .pkg-kode {
    background: linear-gradient(135deg, #9A7A2C, #C9A84C) !important;
    color: #0A0A0B !important;
}

/* pkg-opt (transfer PIN) */
.pkg-opt {
    background: #16161A !important;
    border-color: rgba(201,168,76,0.25) !important;
    color: #F0EAD6 !important;
}
.pkg-opt .small.fw-bold { color: #E2C97E !important; }
.pkg-opt div[style*="color:#555"],
.pkg-opt div[style*="color: #555"] {
    color: rgba(240,234,214,0.6) !important;
}

/* form-card body dark */
.form-card {
    background: #16161A !important;
    border-color: rgba(201,168,76,0.28) !important;
}
.form-card-body {
    background: #16161A !important;
}

/* ============================================
   ALERT SECONDARY DARK FIX
   ============================================ */
.alert-secondary {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(201,168,76,0.2) !important;
    color: var(--text-muted) !important;
}

.alert-secondary .text-muted {
    color: var(--text-muted) !important;
}
