/* ===================================================
   BALGÖÇ Üye Yönetim Sistemi v9.6.0 - Premium SaaS UI
   v9.6.0 Tasarım Altyapısı Entegre Edildi
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────── */
:root {
    /* Core palette */
    --primary: #7C3AED;
    --primary-2: #6D28D9;
    --accent: #06B6D4;
    --danger: #F43F5E;
    --success: #10B981;
    --warn: #F59E0B;
    
    /* Premium Additions */
    --primary-glow: rgba(124, 58, 237, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Backgrounds */
    --bg: #0F172A;
    --bg-2: #1E293B;
    --bg-glass: rgba(15, 23, 42, 0.7);
    --bg-card: rgba(30, 41, 59, 0.85);

    /* Text */
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    /* Borders */
    --border: rgba(148, 163, 184, 0.12);
    --border-h: rgba(124, 58, 237, 0.4);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
    --grad-warm: linear-gradient(135deg, #F43F5E 0%, #F59E0B 100%);
    --grad-cool: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
    --grad-bg-body: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 80% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.35);

    /* Nav specific */
    --nav-bg: rgba(30, 41, 59, 0.6);
    --nav-mobile-bg: rgba(15, 23, 42, 0.95);
    --nav-hover: rgba(255, 255, 255, 0.08);
    --nav-border: rgba(255, 255, 255, 0.06);

    /* Transitions */
    --t-fast: 0.15s ease;
    --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radii */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Geometry */
    --header-h: 72px;
}

/* ─── Light Theme Overrides ─────────────────────── */
[data-theme="light"] {
    --bg: #F8FAFC;
    --bg-2: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 1);
    --text: #0F172A;
    --text-muted: #475569;
    --text-dim: #64748B;
    --border: rgba(15, 23, 42, 0.08);
    --grad-bg-body: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
    --shadow-md: 0 8px 32px rgba(15, 23, 42, 0.08);

    /* Nav light mode */
    --nav-bg: rgba(255, 255, 255, 0.65);
    --nav-mobile-bg: rgba(255, 255, 255, 0.95);
    --nav-hover: rgba(124, 58, 237, 0.08);
    --nav-border: rgba(15, 23, 42, 0.08);
}

/* ─── Reset & Base ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: var(--grad-bg-body);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ─── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ─── Header & Nav ───────────────────────────────── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    overflow: hidden;
}

.logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}

.logo-icon {
    width: 38px; height: 38px;
    background: var(--grad-primary);
    border-radius: 12px;
    display: grid; place-items: center; color: white;
}

.nav, .nav-desktop {
    display: flex;
    gap: 0.25rem;
    background: var(--nav-bg);
    padding: 0.35rem;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    margin-right: 1.5rem;
}

.nav-link {
    padding: 0.45rem 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--r-full);
    transition: var(--t-base);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover { color: var(--text); background: var(--nav-hover); }
.nav-link.active { background: var(--grad-primary); color: white; box-shadow: var(--shadow-glow); }

.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* ─── User Profile ───────────────────────────────── */
.user-zone { display: flex; align-items: center; gap: 1rem; }
.user-avatar {
    width: 40px; height: 40px;
    background: var(--grad-primary);
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; color: white; border: 2px solid var(--border);
}

/* ─── Layout Shells ──────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--t-base);
}

.sidebar-brand {
    padding-bottom: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--r-md);
    transition: var(--t-base);
}

.sidebar-link:hover { background: rgba(124, 58, 237, 0.08); color: var(--text); }
.sidebar-link.active { background: var(--grad-primary); color: white; box-shadow: var(--shadow-glow); }

.admin-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.hamburger-btn {
    display: none;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    place-items: center;
    transition: var(--t-base);
    padding: 0;
}

.hamburger-btn:hover { border-color: var(--primary); color: var(--primary); }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
}

@media (max-width: 1024px) {
    .sidebar-overlay.active { display: block; }
    .mobile-close-btn { display: grid !important; position: absolute; top: 1.5rem; right: 1rem; }
}

/* Base Main Area */
main {
    padding: 1rem 2rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* For member area (Top Nav) */
.member-shell main {
    padding-top: var(--header-h);
}

@media (max-width: 992px) {
    main { padding: calc(var(--header-h) + 1.5rem) 1.25rem 100px !important; }
}

/* ─── Dashboard v9.0 Widgets ─────────────────────── */
.dashboard-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 1.5rem; 
    margin: 0 -0.75rem;
}

[class*="col-"] {
    padding: 0 0.75rem;
    flex: 1 1 auto;
}

.col-12 { width: 100%; }
.col-8 { width: 66.666%; }
.col-7 { width: 58.333%; }
.col-6 { width: 50%; }
.col-5 { width: 41.666%; }
.col-4 { width: 33.333%; }

@media (max-width: 768px) {
    .dashboard-grid { gap: 1rem; margin: 0; }
    .col-8, .col-7, .col-6, .col-5, .col-4 { width: 100%; flex: 1 1 100%; }
}

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.75rem;
    transition: var(--t-base);
    position: relative; overflow: hidden;
}

.metric-card:hover { border-color: var(--border-h); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.metric-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.metric-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.85rem; font-weight: 800; color: var(--text); margin-bottom: 0.25rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 2rem;
    transition: var(--t-base);
    box-shadow: var(--shadow-sm);
}

.card:hover { border-color: var(--border-h); }

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.5rem;
}

.card.table-card { padding: 1.5rem 0; }
.card.table-card .card-header { padding: 0 1.5rem 1rem; }

/* ─── Forms & Buttons ────────────────────────────── */
input, select, textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1.1rem;
    border-radius: 10px;
    outline: none;
    transition: var(--t-base);
    font-size: 0.875rem;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
    background: rgba(124, 58, 237, 0.04);
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: var(--r-full);
    font-weight: 700; font-size: 0.875rem;
    cursor: pointer; border: none; transition: var(--t-base);
    display: inline-flex; align-items: center; gap: 0.6rem;
}

.btn-primary { background: var(--grad-primary); color: white; }
.btn-primary:hover { transform: scale(1.03); box-shadow: var(--shadow-glow); }

/* ─── Bottom Nav (Mobile) ────────────────────────── */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    z-index: 1001; justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    color: var(--text-dim); text-decoration: none; font-size: 0.75rem; font-weight: 600;
    transition: var(--t-base);
}
.bottom-nav-item i {
    font-size: 1.4rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-item:hover { color: var(--text-muted); }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active i { transform: translateY(-3px) scale(1.1); color: var(--primary); text-shadow: 0 4px 12px rgba(124, 58, 237, 0.4); }

/* ─── Premium List Items ─────────────────────────── */
.premium-list-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.25rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem; transition: var(--t-base);
}
.premium-list-item:hover { border-color: var(--border-h); background: rgba(124, 58, 237, 0.05); transform: translateX(8px); }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .nav { display: none; }
    .bottom-nav { display: flex; }
    .header { padding: 0 1rem; }
    
    .sidebar { transform: translateX(-110%); width: 280px; padding: 1.5rem; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
    .sidebar.active { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,0.5); }
    .admin-content { 
        margin-left: 0 !important; 
        margin-top: 0 !important; 
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 0 !important;
    }
    main { 
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 1rem !important; /* Ensure content is tight but not cut */
        margin: 0 !important;
    }
    .hamburger-btn { display: grid; }
    .mobile-logo-compact { display: flex !important; }
    .top-bar { padding: 0 0.75rem; }
    .top-bar-left { gap: 0.5rem !important; }
    
    .profile-header-premium { flex-direction: column; text-align: center; gap: 1.5rem; padding: 2rem; }
}

@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
    .mobile-only { display: block !important; }
    
    .dashboard-grid { margin: 0; }
    .compact-metric { flex-direction: column; text-align: center; gap: 0.75rem; padding: 1.25rem; }

    /* --- Global Mobile Overrides for inline styles & layouts --- */
    .metrics-row { flex-wrap: wrap !important; }
    .dashboard-v5-grid { grid-template-columns: 1fr !important; display: flex !important; flex-direction: column !important; }
    .edit-row { grid-template-columns: 1fr !important; display: flex !important; flex-direction: column !important; gap: 1rem !important; }
    
    /* Override hardcoded inline grids globally on mobile */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Profile Bilgilerim Stacking */
    .profile-info-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .info-item { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
    .info-item label { margin-bottom: 0.25rem; text-align: center; width: 100%; }
    .info-item .info-value { text-align: center; width: 100%; word-break: break-word; }
}

@media (max-width: 640px) {
    .metrics-grid { grid-template-columns: 1fr; }
    main { padding: calc(var(--header-h) + 1rem) 1rem 6rem; }
}

/* ─── Utility Classes ────────────────────────────── */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-warn { color: var(--warn) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 2rem !important; }

.gradient-text {
    font-weight: 800;
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--glass-shine); 
    pointer-events: none;
    opacity: 0.5;
}

/* ─── Components ─────────────────────────────────── */
.badge {
    padding: 0.35rem 0.8rem;
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.badge-primary { background: rgba(124, 58, 237, 0.15); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: var(--danger); }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-title { font-size: 1.1rem; font-weight: 700; }
.section-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.chart-container { position: relative; height: 300px; width: 100%; }

/* ─── Login Page Specifics ──────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background-image: var(--grad-bg-body);
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-glass);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
    border-radius: 24px;
    animation: loginFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.login-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card .form-group { width: 100%; margin-bottom: 1.25rem; }
.login-card input { width: 100% !important; height: 48px; border-radius: 12px; }
.login-card .btn { width: 100% !important; height: 48px; justify-content: center; border-radius: 12px; }

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-wrapper {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.login-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.3));
}

.login-brand {
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Select & Option Contrast Fix ──────────────── */
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--t-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Fix for white-on-white text in browser-rendered option menus */
option {
    background-color: #1e293b !important; /* Fixed dark background */
    color: #f1f5f9 !important; /* Fixed light text */
    padding: 10px;
}

[data-theme="light"] option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* ─── Member Dashboard Redesign ──────────────────── */
.member-hero {
    background: var(--bg-glass);
    padding: 1.5rem 2.5rem;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.hero-greeting { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 600px; }

.hero-meta {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem 2rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    text-align: right;
}

.meta-label { display: block; font-size: 0.75rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.25rem; }
.meta-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); font-family: 'Plus Jakarta Sans', sans-serif; }

/* ─── Quick Actions ──────────────────────────────── */
.quick-actions-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--bg-glass);
    padding: 1.25rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--t-base);
}

.action-card:hover { border-color: var(--primary); transform: translateY(-3px); background: rgba(124, 58, 237, 0.05); }

.ac-icon {
    width: 42px; height: 42px;
    background: var(--bg-2);
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.1rem;
    color: var(--primary);
    border: 1px solid var(--border);
}

.ac-text { font-size: 0.85rem; font-weight: 700; color: var(--text); }

.metrics-row {
    display: flex;
    flex-wrap: nowrap; /* Force single row on desktop */
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.compact-metric {
    flex: 1;
    background: var(--bg-glass);
    padding: 1.5rem 1.75rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--t-base);
}

.compact-metric:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.cm-icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    display: grid; place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cm-body { display: flex; flex-direction: column; gap: 4px; }
.cm-label { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.cm-value { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.cm-badge { position: absolute; top: 1rem; right: 1rem; font-size: 0.65rem; padding: 0.2rem 0.6rem; border-radius: 6px; font-weight: 800; }

/* ─── Carousel Styles ────────────────────────────── */
.carousel-container {
    position: relative;
    overflow: hidden;
    height: 220px; /* Fixed height for consistency */
}

.announcement-item {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(10px);
}

.announcement-item.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--t-fast);
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--primary);
}

.announcement-feed { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.announcement-item {
    padding: 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: var(--t-base);
}
.announcement-item:hover { border-color: var(--primary); transform: translateX(5px); background: rgba(124, 58, 237, 0.05); }
.announcement-item.featured { border-left: 4px solid var(--primary); background: rgba(124, 58, 237, 0.03); }

.ai-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.ai-cat-icon {
    width: 32px; height: 32px;
    background: var(--bg-2);
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 0.85rem;
    color: var(--primary);
}
.featured .ai-cat-icon { background: white; color: var(--primary); }

.animate-typewriter .ai-title {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: typing 2.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--primary); } }

.ai-date { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }
.ai-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.ai-text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* Wallet Card Style */
.wallet-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-theme="light"] .wallet-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05) !important;
}

.wallet-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
}

[data-theme="light"] .wallet-card::before {
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 60%) !important;
}

.wallet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; position: relative; }
.wallet-brand { font-size: 0.9rem; font-weight: 900; letter-spacing: 1px; }
.wallet-chip { width: 45px; height: 35px; background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%); border-radius: 6px; border: 1px solid rgba(0,0,0,0.1); }

.wallet-body { display: flex; align-items: center; gap: 1.5rem; position: relative; margin-bottom: 1.5rem; }
.qr-container { background: white; padding: 0.75rem; border-radius: 12px; }
.qr-container img { display: block; mix-blend-mode: multiply; }

[data-theme="light"] .qr-container {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    background: #ffffff !important;
}

.wallet-info { flex: 1; }
.wi-label { font-size: 0.65rem; font-weight: 800; color: rgba(255,255,255,0.6); margin-bottom: 0.25rem; transition: color 0.3s ease; }
[data-theme="light"] .wi-label { color: rgba(15, 23, 42, 0.6) !important; }

.wi-name { font-size: 1rem; font-weight: 800; margin-bottom: 0.1rem; }
.wi-no { font-family: 'Courier New', monospace; font-size: 0.9rem; opacity: 0.8; }
[data-theme="light"] .wi-no { color: rgba(15, 23, 42, 0.7) !important; opacity: 1 !important; }

.wallet-footer { font-size: 0.7rem; color: rgba(255,255,255,0.6); text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; transition: all 0.3s ease; font-weight: 600; }
[data-theme="light"] .wallet-footer { border-top-color: rgba(0,0,0,0.1) !important; color: rgba(15, 23, 42, 0.6) !important; }

@media (max-width: 992px) {
    .metrics-row { flex-wrap: wrap; } /* Allow wrapping but not full column immediately if space permits */
    .metrics-row > * { flex: 1 1 calc(50% - 1rem); } /* 2x2 on tablets */
    .quick-actions-row { grid-template-columns: repeat(2, 1fr); }
    .hero-meta { display: none; }
    .member-hero { padding: 2rem; flex-direction: column; text-align: center; }
    .hero-subtitle { margin: 0 auto; }
}

@media (max-width: 480px) {
    .quick-actions-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .quick-actions-row { grid-template-columns: 1fr; }
}

.action-card-metric {
    flex: 1;
    background: var(--bg-card) !important;
    padding: 1.5rem !important;
    border-radius: var(--r-lg) !important;
    border: 1px solid var(--border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
    text-decoration: none !important;
    transition: var(--t-base) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    color: var(--text) !important;
}

.action-card-metric:hover { border-color: var(--primary) !important; transform: translateY(-3px) !important; box-shadow: var(--shadow-md) !important; background: rgba(124, 58, 237, 0.05) !important; }

.action-card-metric .ac-icon {
    width: 54px; height: 54px;
    background: var(--bg-2);
    border-radius: 16px;
    display: grid; place-items: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.action-card-metric .ac-text { font-size: 1rem; font-weight: 800; color: inherit; }

/* ─── Profile & Professional ─────────────────────── */
.profile-header-premium {
    background: var(--bg-glass);
    padding: 3rem;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.php-avatar {
    width: 120px;
    height: 120px;
    background: var(--grad-primary);
    border-radius: 35px;
    display: grid; place-items: center;
    font-size: 3rem; font-weight: 800; color: white;
    box-shadow: var(--shadow-glow);
    border: 5px solid var(--bg-2);
}

.php-meta { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.5rem; letter-spacing: 1px; }
.php-pills { display: flex; gap: 1rem; margin-top: 1rem; }
.php-pill { background: rgba(255,255,255,0.03); padding: 0.5rem 1.25rem; border-radius: 10px; border: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.php-pill b { color: var(--text); margin-left: 0.25rem; }

.form-group-clean { margin-bottom: 0.75rem; }
.form-group-clean label { 
    display: block; 
    font-size: 0.65rem; 
    font-weight: 800; 
    color: var(--text-dim); 
    margin-bottom: 0.25rem; 
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}
.form-group-clean input, .form-group-clean select, .form-group-clean textarea {
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    color: var(--text);
    width: 100%;
    font-size: 0.85rem;
    transition: var(--t-base);
}
.form-group-clean input:focus, .form-group-clean select:focus, .form-group-clean textarea:focus { 
    border-color: var(--primary); 
    background: rgba(124, 58, 237, 0.04); 
    box-shadow: 0 0 0 1px var(--primary);
    outline: none;
}

.portal-notice {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 1.25rem;
    border-radius: 15px;
    display: flex;
    gap: 1rem;
}
.portal-notice input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.portal-notice label { font-size: 0.8rem; color: var(--accent); cursor: pointer; line-height: 1.4; }

/* Existing Animations and Overlays */

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeUp 0.6s ease forwards; }

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }

/* ─── Ultra Premium SaaS V11.0 Extensions ──────────────── */
:root {
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.05) 100%);
    --saas-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--glass-border);
}

.bg-mesh {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; background: var(--bg);
}

.blob {
    position: absolute; width: 500px; height: 500px;
    background: var(--primary); filter: blur(120px);
    border-radius: 50%; opacity: 0.15;
    animation: blobBounce 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.blob-2 { background: var(--accent); width: 400px; height: 400px; left: 60%; top: 40%; animation-delay: -5s; }
.blob-3 { background: var(--danger); width: 300px; height: 300px; left: 10%; top: 70%; animation-delay: -10s; }

@keyframes blobBounce {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Enhanced Login Styles */
.premium-login-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(80px) saturate(180%);
    -webkit-backdrop-filter: blur(80px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--saas-shadow);
    padding: 3rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.premium-login-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--glass-shine); pointer-events: none;
}

.form-floating-saas {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.4rem 1rem;
    transition: var(--t-base);
    display: flex; align-items: center; gap: 0.75rem;
}

.form-floating-saas:focus-within {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.form-floating-saas input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1rem 0 !important;
    font-size: 1rem; width: 100%; color: var(--text);
}

.form-floating-saas i { font-size: 1.25rem; color: var(--text-dim); transition: var(--t-base); }
.form-floating-saas:focus-within i { color: var(--primary); transform: scale(1.1); }

/* Animation Utils */
.fade-up { opacity: 0; transform: translateY(30px); animation: saasFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes saasFadeUp { to { opacity: 1; transform: translateY(0); } }

.password-eye-btn:hover { color: var(--primary); transform: scale(1.15); }

/* ─── Mobile Responsive Overrides ───────────────────── */
@media (max-width: 640px) {
    .premium-login-card {
        padding: 2rem 1.5rem !important;
        border-radius: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .login-header-saas {
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .lhs-icon { width: 48px !important; height: 48px !important; }
    .lhs-icon i { font-size: 1.5rem !important; }
    .lhs-title { font-size: 1rem !important; }
    .lhs-subtitle { font-size: 0.75rem !important; }
    
    /* Header Cleanup */
    .header { padding: 0 1rem !important; gap: 0.5rem !important; }
    .logo span { font-size: 0.9rem !important; }
    .user-zone { gap: 0.5rem !important; }
    .theme-toggle { margin-right: 0.25rem !important; }
    .user-avatar { width: 32px !important; height: 32px !important; font-size: 0.8rem !important; }
    .btn-logout { width: 32px !important; height: 32px !important; font-size: 0.8rem !important; }
}

/* ─── Dedicated QR Fullscreen Styles ────────────────── */
.qr-fullscreen-page {
    background: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
}

.qr-scan-box {
    background: white;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 0 100px rgba(124, 58, 237, 0.4);
    margin-bottom: 2rem;
    animation: qrPulse 2s infinite ease-in-out;
}

@keyframes qrPulse {
    0% { transform: scale(1); box-shadow: 0 0 50px rgba(124, 58, 237, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 100px rgba(124, 58, 237, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 50px rgba(124, 58, 237, 0.4); }
}

.qr-info-box { text-align: center; }
.qr-info-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: 1px; }
.qr-info-id { font-size: 1rem; color: #94A3B8; font-family: monospace; }

/* ─── Premium Header & Tabs (v11.3) ────────────────── */
.premium-header-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: grid; place-items: center;
    color: var(--text-muted);
    transition: var(--t-base);
    cursor: pointer;
    text-decoration: none;
}
.premium-header-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.premium-tab-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-glass);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}
.premium-tab-btn {
    flex: 1; padding: 1rem;
    border-radius: 12px; border: none;
    background: transparent; color: var(--text-muted);
    font-size: 0.9rem; font-weight: 700; cursor: pointer;
    transition: var(--t-base); display: flex; align-items: center; justify-content: center; gap: 10px;
}
.premium-tab-btn:hover:not(.active) { background: rgba(255,255,255,0.03); color: var(--text); }
.premium-tab-btn.active {
    background: var(--bg-card); color: var(--text);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid var(--border-h);
}
.premium-tab-btn.active i { color: var(--primary); }

/* ─── Screenshot-Specific Refinements ────────────────── */
/* ─── Premium Login Aesthetic V12.0 ────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
                #0F172A; /* Deep Space Background */
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: ''; position: absolute; top: -10%; left: -10%; width: 50%; height: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    filter: blur(80px); animation: float 20s infinite alternate;
}

@keyframes float { from { transform: translate(0,0); } to { transform: translate(10%, 10%); } }

.premium-login-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 3.5rem 3rem;
    border-radius: 40px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 10;
}

.label-saas {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #94A3B8; /* Muted Slate */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.85rem;
}

.form-floating-saas {
    background: #EEF2F6; /* Premium Light Background from image */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 0.2rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-floating-saas:focus-within {
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.form-floating-saas input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1.1rem 0 !important;
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B; /* Dark Text for Light Inputs */
    width: 100%;
}

.form-floating-saas input::placeholder { color: #94A3B8; font-weight: 500; }

.form-floating-saas i { font-size: 1.1rem; color: #64748B; transition: 0.3s; }
.form-floating-saas:focus-within i { color: var(--primary); }

.btn-premium-login {
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
    border-radius: 20px;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.35);
}

.btn-premium-login:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.45);
    filter: brightness(1.1);
}

.btn-premium-login:active { transform: scale(0.98); }

.password-eye-btn {
    background: none; border: none;
    color: #64748B; font-size: 1.1rem; padding: 10px; cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex; align-items: center; justify-content: center;
}

/* ─── Navigation Layouts ────────────────────────── */
.nav-desktop {
    display: flex;
    margin: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--nav-border);
    padding: 0.4rem;
    gap: 0.15rem;
    border-radius: var(--r-md);
}

.nav-mobile-bottom {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 9999;
    padding: 0 1rem;
    justify-content: space-around;
    align-items: center;
}

.mob-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    transition: var(--t-base);
}

.mob-nav-link i { font-size: 1.25rem; }
.mob-nav-link.active { color: var(--primary); }
.mob-nav-link.active i { transform: translateY(-2px); text-shadow: 0 0 10px var(--primary-glow); }
.mob-nav-link:active { transform: scale(0.9); }

/* ─── Mobile Action Bar (Sticky Bottom Actions) ─────── */
.mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 75px; /* Above bottom nav */
    left: 1rem;
    right: 1rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 18px;
    z-index: 9998;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: barSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes barSlideUp {
    from { transform: translateY(100%) opacity: 0; }
    to { transform: translateY(0) opacity: 1; }
}

@media (max-width: 992px) {
    .mobile-action-bar { display: flex; }
}

.mab-btn {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--t-base);
}

.mab-btn-primary { background: var(--grad-primary); color: white; box-shadow: 0 4px 15px var(--primary-glow); }
.mab-btn-secondary { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }

/* ─── Mobile Optimizations ─────────────────────── */
@media (max-width: 992px) {
    .nav-desktop { display: none; }
    .nav-mobile-bottom { display: flex; }
    .header [class*="hide-mobile"] { display: none !important; }
    main { padding-bottom: 80px !important; } /* Space for bottom nav */
}

@media (max-width: 640px) {
    .metrics-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
        overflow-x: hidden !important;
        flex-wrap: wrap !important;
    }

    .compact-metric {
        min-width: 0 !important;
        padding: 1.25rem 0.75rem !important;
        gap: 0.75rem !important;
        flex-direction: column !important;
        text-align: center !important;
        width: 100% !important;
        justify-content: center !important;
    }

    .cm-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.1rem !important;
        margin: 0 auto;
    }

    .cm-value {
        font-size: 0.95rem !important;
        line-height: 1.2;
    }

    .cm-label {
        font-size: 0.6rem !important;
        margin-bottom: 2px !important;
    }

    .logo img {
        height: 36px !important;
        width: auto !important;
    }

    .logo span {
        font-size: 1.1rem !important;
    }

    .member-hero {
        padding: 1.5rem 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .page-header h1 {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 420px) {
    .hide-small { display: none !important; }
}

/* ─── Admin Table to Card Transformation ─────────── */
@media (max-width: 768px) {
    .admin-table-mobile {
        border: none !important;
        background: transparent !important;
        margin-top: 1rem;
    }
    .admin-table-mobile tbody, .admin-table-mobile tr, .admin-table-mobile td {
        display: block !important;
        width: 100% !important;
    }
    .admin-table-mobile thead {
        display: none !important;
    }
    .admin-table-mobile tr {
        background: var(--bg-card) !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--r-lg) !important;
        padding: 1.25rem !important;
        margin-bottom: 1.25rem !important;
        box-shadow: var(--shadow-sm) !important;
        position: relative;
        overflow: hidden;
    }
    .admin-table-mobile td {
        text-align: right !important;
        padding: 1rem 0.5rem !important;
        position: relative;
        border-bottom: 1px solid var(--border) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        min-height: 3.5rem;
    }
    .admin-table-mobile td:last-child {
        border-bottom: none !important;
    }
    .admin-table-mobile td::before {
        content: attr(data-label);
        font-weight: 800;
        font-size: 0.7rem;
        color: var(--text-dim) !important;
        text-transform: uppercase;
        margin-right: auto;
        opacity: 0.8;
    }
}
