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

/* ===========================
   RESET & VARIABLES
   =========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99,102,241,0.25);
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --rose: #f43f5e;

    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(99,102,241,0.2);
    --sidebar-text: rgba(255,255,255,0.55);
    --sidebar-text-active: #fff;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-w: 270px;

    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-inset: #f8fafc;
    --bg-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s var(--ease);
}

[data-theme="dark"] {
    --bg-body: #0b1120;
    --bg-card: #1e293b;
    --bg-inset: #0f172a;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --sidebar-bg: #020617;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }

/* ===========================
   LAYOUT
   =========================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    padding: 1.5rem 1.3rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    white-space: nowrap;
}

.sidebar-brand-text small {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--sidebar-text);
    letter-spacing: 0.04em;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.nav-group-label {
    padding: 0.8rem 1.3rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.3rem;
    width: 100%;
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    text-align: left;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.nav-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }

.nav-btn.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.nav-btn.active::before { opacity: 1; }

.nav-btn i {
    width: 20px;
    text-align: center;
    font-size: 0.92rem;
    opacity: 0.7;
}

.nav-btn.active i { opacity: 1; color: var(--primary-light); }

.nav-btn .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.3rem;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-footer .nav-btn { padding: 0.6rem 0; }
.sidebar-footer .nav-btn.danger { color: var(--rose); }
.sidebar-footer .nav-btn.danger:hover { color: #fff; background: rgba(244,63,94,0.15); }

/* ===========================
   MAIN AREA
   =========================== */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin var(--transition);
}

/* Top Bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    transition: background var(--transition);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
}

.topbar-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
}

.topbar-title span { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; margin-left: 0.5rem; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.btn-topbar {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all var(--transition);
    position: relative;
}

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

.btn-topbar .notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.admin-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
}

/* Content Wrapper */
.content-wrapper {
    padding: 1.5rem 2rem 3rem;
}

/* ===========================
   LOGIN PAGE
   =========================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-bg);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    top: -20%; right: -10%;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
    bottom: -15%; left: -5%;
}

.login-box {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    max-width: 440px;
    width: 90%;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
    animation: loginIn 0.5s ease;
}

@keyframes loginIn { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-box-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.login-box-header h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.login-box-header p { color: var(--text-muted); font-size: 0.9rem; }

.form-field {
    margin-bottom: 1.2rem;
}

.form-field label {
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-input-wrap {
    position: relative;
}

.form-input-wrap i {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-family: var(--font-body);
    background: var(--bg-inset);
    color: var(--text-primary);
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.form-input::placeholder { color: var(--text-muted); }

.form-error {
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); }

/* ===========================
   STAT CARDS
   =========================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-card-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-card-icon.blue { background: rgba(99,102,241,0.1); color: var(--primary); }
.stat-card-icon.cyan { background: rgba(6,182,212,0.1); color: var(--accent); }
.stat-card-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-card-icon.rose { background: rgba(244,63,94,0.1); color: var(--rose); }
.stat-card-icon.amber { background: rgba(245,158,11,0.1); color: var(--warning); }

.stat-card-body {}
.stat-card-value { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 900; line-height: 1.2; }
.stat-card-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

/* ===========================
   SECTION / PANEL CARD
   =========================== */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.panel:hover { box-shadow: var(--shadow-sm); }

.panel-header {
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
}

.panel-header p { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.1rem; }

.panel-body {
    padding: 1.5rem;
}

/* ===========================
   FORM STYLES (Admin forms)
   =========================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.form-grid .full { grid-column: 1 / -1; }

.form-field-admin label {
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-field-admin input,
.form-field-admin textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--bg-inset);
    color: var(--text-primary);
    transition: all var(--transition);
}

.form-field-admin input:focus,
.form-field-admin textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-card);
}

.form-field-admin textarea { resize: vertical; min-height: 80px; }

.form-msg {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    min-height: 1.5em;
}

.form-msg.success { color: var(--success); }
.form-msg.error { color: var(--danger); }

/* Requirements Grid */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    background: var(--bg-inset);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    border: 1px solid var(--border-light);
}

.req-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.req-item label i { color: var(--primary); }

.req-item input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition);
}

.req-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-glow); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.78rem; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 0.5rem 1rem;
}

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

.btn-danger { background: var(--danger); color: #fff; padding: 0.5rem 1rem; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; padding: 0.5rem 1rem; }
.btn-success:hover { background: #059669; }

.btn-ghost {
    background: var(--bg-inset);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
}

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

/* ===========================
   MATCH CARDS
   =========================== */
.match-card {
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    margin-bottom: 1rem;
    transition: all var(--transition);
}

.match-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.match-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.match-card-top h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
}

.match-card-top p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }

.match-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
}

.ms-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    transition: all var(--transition);
}

.ms-item:hover { border-color: var(--primary-light); }

.ms-item-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.ms-item-head .badge-status {
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-active { background: rgba(99,102,241,0.1); color: var(--primary); }
.badge-unlocked { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-inactive { background: rgba(148,163,184,0.15); color: var(--text-muted); }

.ms-progress { margin-bottom: 0.5rem; }
.ms-progress-text { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.ms-progress-text strong { color: var(--primary); }

.ms-bar { height: 5px; background: var(--border); border-radius: 50px; overflow: hidden; }
.ms-bar-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.4s ease; }

.ms-controls {
    display: flex;
    gap: 0.4rem;
}

.ms-controls .btn-ghost { padding: 0.3rem 0.6rem; font-size: 0.72rem; }

/* Timer styles */
.ms-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ms-timer.running { background: rgba(245,158,11,0.1); color: var(--warning); }
.ms-timer.expired { background: rgba(239,68,68,0.1); color: var(--danger); animation: timerPulse 1.5s infinite; }
.ms-timer.waiting { background: rgba(148,163,184,0.1); color: var(--text-muted); }
.ms-timer.completed { background: rgba(16,185,129,0.1); color: var(--success); }

@keyframes timerPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.ms-timer-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
}

.ms-dl-edit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ms-dl-edit input {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 0.78rem;
    font-family: var(--font-body);
    font-weight: 700;
    background: var(--bg-card);
    color: var(--text-primary);
    text-align: center;
}

/* ===========================
   DATA LIST (Men / Women)
   =========================== */
.data-list {
    display: grid;
    gap: 0.8rem;
}

.data-row {
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

.data-row:hover { border-color: var(--primary); transform: translateX(3px); }

.data-row-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.data-row-body { flex: 1; }
.data-row-body h4 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; }
.data-row-body p { font-size: 0.78rem; color: var(--text-muted); }

.data-row-actions { display: flex; gap: 0.4rem; }

/* ===========================
   ADMIN GROUP (Matches by Admin)
   =========================== */
.admin-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--bg-card);
}

.admin-group-header {
    padding: 1rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background var(--transition);
    user-select: none;
}

.admin-group-header:hover { background: var(--bg-hover); }

.admin-group-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-group-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.admin-group-info h4 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; }
.admin-group-info p { font-size: 0.75rem; color: var(--text-muted); }

.admin-group-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-group-count {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

.admin-group-chevron {
    color: var(--text-muted);
    transition: transform var(--transition);
}

.admin-group.open .admin-group-chevron { transform: rotate(180deg); }

.admin-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.admin-group-body-inner {
    padding: 0 1.3rem 1.3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.8rem;
}

.agm-card {
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all var(--transition);
}

.agm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--primary-light); }

.agm-photo {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    flex-shrink: 0;
}

.agm-info { flex: 1; min-width: 0; }
.agm-info h5 { font-family: var(--font-heading); font-size: 0.88rem; font-weight: 700; }
.agm-info p { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.agm-code {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.68rem;
    font-family: monospace;
    color: var(--text-muted);
}

/* ===========================
   CHAT (Admin)
   =========================== */
.chat-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 500px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
}

.chat-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--bg-inset);
}

.chat-list-item {
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.chat-list-item:hover, .chat-list-item.active { background: var(--bg-card); }

.chat-list-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.chat-list-info { flex: 1; min-width: 0; }
.chat-list-info h5 { font-size: 0.85rem; font-weight: 700; }
.chat-list-info p { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-list-unread {
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}

.chat-main {
    display: flex;
    flex-direction: column;
}

.chat-main-header {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-main-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-msg-admin {
    max-width: 75%;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-msg-admin.from-client {
    align-self: flex-start;
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 3px;
}

.chat-msg-admin.from-admin {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-msg-time { font-size: 0.62rem; opacity: 0.6; margin-top: 0.2rem; }

.chat-main-input {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.5rem;
}

.chat-main-input input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    background: var(--bg-inset);
    color: var(--text-primary);
}

.chat-main-input input:focus { outline: none; border-color: var(--primary); }

.chat-main-input button {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.chat-main-input button:hover { background: var(--primary-dark); }

/* ===========================
   ACTIVITY / SUBSCRIBERS
   =========================== */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-body { flex: 1; }
.activity-body strong { font-weight: 700; }
.activity-time { font-size: 0.72rem; color: var(--text-muted); }

.sub-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
}

.sub-row:last-child { border-bottom: none; }
.sub-row .sub-email { font-weight: 600; font-size: 0.88rem; flex: 1; }
.sub-row .sub-date { font-size: 0.75rem; color: var(--text-muted); }

/* ===========================
   EMPTY STATE
   =========================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; opacity: 0.2; margin-bottom: 0.8rem; }
.empty-state p { font-size: 0.92rem; }

/* ===========================
   GIFT EDITOR MODAL
   =========================== */
.ge-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.ge-modal.open { display: flex; }

.ge-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
}

.ge-dialog {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: geIn 0.3s ease;
}

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

.ge-dialog-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ge-dialog-header h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.ge-dialog-body {
    padding: 1rem 1.5rem;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ge-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.ge-icon { font-size: 1.4rem; }

.ge-info { flex: 1; }
.ge-info strong { display: block; font-size: 0.88rem; }
.ge-info span { font-size: 0.72rem; color: var(--text-muted); }

.ge-add-section {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.ge-add-section h4 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
}

.ge-add-section h4 i { color: var(--primary); }

.ge-select, .ge-input {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    background: var(--bg-inset);
    color: var(--text-primary);
}

.ge-select:focus, .ge-input:focus {
    outline: none;
    border-color: var(--primary);
}

.ge-select { flex: 1; }

.ge-dialog-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ===========================
   HIDDEN UTILITY
   =========================== */
.hidden { display: none !important; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .topbar-hamburger { display: block; }
    .chat-panel { grid-template-columns: 1fr; }
    .chat-list { max-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
    .content-wrapper { padding: 1rem; }
    .topbar { padding: 0.7rem 1rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .match-services { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .req-grid { grid-template-columns: 1fr; }
}
