/* ==========================================================
   Web-to-App Admin Panel
   main.css — Design Tokens, Layout Shell, Sidebar, Header,
              Toasts, Badges, Utilities
   ========================================================== */

/* ----------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------- */
:root {
    /* Backgrounds */
    --bg-primary:      #08080C;
    --bg-secondary:    #111116;
    --bg-card:         #15151D;
    --bg-sidebar:      #0C0C12;
    --bg-sidebar-alt:  #15151D;
    --bg-header:       rgba(8, 8, 12, 0.85);

    /* Colors */
    --text-primary:    #FFFFFF;
    --text-secondary:  #CBD5E1;
    --text-muted:      #94A3B8;
    --text-inverse:    #000000;

    --color-success:   #10B981;
    --color-warning:   #F59E0B;
    --color-danger:    #EF4444;
    --color-info:      #3B82F6;
    --color-purple:    #8B5CF6;

    --accent:          #E91E8C;
    --accent-light:    rgba(233, 30, 140, 0.15);
    --accent-hover:    #D81B60;

    /* Borders */
    --border-color:    #2A2A35;
    --border-radius:   16px;
    --border-radius-sm:10px;
    --border-radius-lg:20px;
    --border-radius-xl:28px;
    --border-radius-full:9999px;

    /* Shadows */
    --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-card:     0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-dropdown: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-modal:    0 24px 80px rgba(0, 0, 0, 0.7);

    /* Spacing */
    --card-padding:    28px;
    --section-gap:     28px;
    --grid-gap:        24px;

    /* Sidebar */
    --sidebar-width:   260px;
    --sidebar-collapsed: 80px;

    /* Header */
    --header-height:   76px;

    /* Transitions */
    --transition:      0.25s ease;
    --transition-fast: 0.15s ease;
    --transition-slow: 0.4s ease;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs:  11px;
    --font-size-sm:  13px;
    --font-size-base:14px;
    --font-size-md:  15px;
    --font-size-lg:  18px;
    --font-size-xl:  22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.admin-body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-family); }
input, select, textarea { font-family: var(--font-family); }

/* ----------------------------------------------------------
   3. App Layout Shell
   ---------------------------------------------------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.main-wrapper.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

.page-content {
    flex: 1;
    padding: 28px var(--card-padding);
    margin-top: var(--header-height);
}

/* ----------------------------------------------------------
   4. Sidebar
   ---------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width var(--transition);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: var(--header-height);
    flex-shrink: 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), #7C3AED);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition), width var(--transition);
}

.sidebar.collapsed .brand-name { opacity: 0; width: 0; pointer-events: none; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

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

.sidebar-section-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    padding: 18px 20px 6px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-section-label { opacity: 0; height: 0; padding: 0; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 2px 10px;
    border-radius: var(--border-radius-sm);
    color: rgba(255,255,255,0.55);
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(233,30,140,0.25), rgba(124,58,237,0.25));
    color: #FFFFFF;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-item.active .sidebar-icon svg {
    stroke: var(--accent);
}

.sidebar-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: opacity var(--transition), width var(--transition);
}

.sidebar.collapsed .sidebar-label { opacity: 0; width: 0; pointer-events: none; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    color: rgba(255,255,255,0.45);
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logout:hover {
    background: rgba(220,38,38,0.15);
    color: #FC8181;
}

.sidebar-logout svg { flex-shrink: 0; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ----------------------------------------------------------
   5. Top Header
   ---------------------------------------------------------- */
.top-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
    transition: left var(--transition);
    gap: 16px;
}

.sidebar-collapsed + .main-wrapper .top-header,
.main-wrapper.sidebar-collapsed .top-header {
    left: var(--sidebar-collapsed);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-toggle:hover { background: var(--bg-secondary); }

.toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.header-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}

.header-search {
    width: 100%;
    height: 38px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-full);
    padding: 0 16px 0 38px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.header-search:focus {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(233,30,140,0.1);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dropdown);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-dropdown.hidden { display: none; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: var(--font-size-sm);
}

.search-result-item:hover { background: var(--bg-secondary); }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.quick-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.quick-stat-value {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--text-primary);
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    display: none;
}

.notif-dot.visible { display: block; }

.admin-profile-wrapper { position: relative; }

.admin-avatar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: none;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.admin-avatar-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.admin-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--color-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.admin-info { display: flex; flex-direction: column; line-height: 1.2; }
.admin-name { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); }
.admin-role { font-size: var(--font-size-xs); color: var(--text-muted); }

.chevron { color: var(--text-muted); transition: transform var(--transition-fast); }
.admin-avatar-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dropdown);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

.profile-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-dropdown-header strong { font-size: var(--font-size-sm); color: var(--text-primary); }
.profile-dropdown-header small { font-size: var(--font-size-xs); color: var(--text-muted); }

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 16px;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin: 4px;
    border-radius: var(--border-radius-sm);
}

.profile-dropdown-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.profile-dropdown-item.danger:hover { background: rgba(239,68,68,0.15); color: var(--color-danger); }

/* ----------------------------------------------------------
   6. Cards
   ---------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    padding: var(--card-padding);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.card-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ----------------------------------------------------------
   7. Badges
   ---------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.5;
}

.badge-success  { background: #DCFCE7; color: #166534; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-info     { background: #DBEAFE; color: #1E40AF; }
.badge-gray     { background: #F3F4F6; color: #4B5563; }
.badge-secondary{ background: #F3F4F6; color: #374151; }
.badge-purple   { background: #EDE9FE; color: #5B21B6; }

.badge-pulse {
    position: relative;
}

.badge-pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--border-radius-full);
    background: var(--color-info);
    opacity: 0.2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50%       { transform: scale(1.15); opacity: 0.05; }
}

/* ----------------------------------------------------------
   8. Buttons
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    outline: none;
}

.btn:focus-visible { box-shadow: 0 0 0 3px rgba(233,30,140,0.25); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #9333EA);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(233,30,140,0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #7E22CE);
    box-shadow: 0 6px 20px rgba(233,30,140,0.25);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.btn-success { background: var(--color-success); color: white; border-color: var(--color-success); }
.btn-success:hover { background: #15803D; color: white; }

.btn-danger { background: var(--color-danger); color: white; border-color: var(--color-danger); }
.btn-danger:hover { background: #B91C1C; color: white; }

.btn-warning { background: var(--color-warning); color: white; border-color: var(--color-warning); }
.btn-warning:hover { background: #D97706; color: white; }

.btn-info { background: var(--color-info); color: white; border-color: var(--color-info); }
.btn-info:hover { background: #2563EB; color: white; }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: var(--font-size-xs); }
.btn-lg { padding: 12px 24px; font-size: var(--font-size-md); }

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-icon.danger:hover { border-color: var(--color-danger); color: var(--color-danger); background: rgba(239,68,68,0.15); }

/* ----------------------------------------------------------
   9. Page Header
   ---------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--section-gap);
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-left h1 {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 4px;
}

.page-header-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   10. Empty State
   ---------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ----------------------------------------------------------
   11. Toast Notifications
   ---------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dropdown);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: toastSlideIn var(--transition) forwards;
    border-left: 4px solid var(--accent);
}

.toast.success { border-left-color: var(--color-success); }
.toast.error   { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.info    { border-left-color: var(--color-info); }

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--color-success); }
.toast.error   .toast-icon { color: var(--color-danger); }
.toast.warning .toast-icon { color: var(--color-warning); }
.toast.info    .toast-icon { color: var(--color-info); }

.toast-body { flex: 1; }
.toast-title { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); }
.toast-message { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 2px; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--transition-fast);
    padding: 0 2px;
}

.toast-close:hover { color: var(--text-primary); }

.toast.removing {
    animation: toastSlideOut var(--transition) forwards;
}

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

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

/* ----------------------------------------------------------
   12. Modal
   ---------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(16px);
    transition: transform var(--transition);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-sm { max-width: 420px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px var(--card-padding);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-size: 20px;
    transition: all var(--transition-fast);
}

.modal-close:hover { background: #FEE2E2; color: var(--color-danger); }

.modal-body { padding: var(--card-padding); }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px var(--card-padding);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* ----------------------------------------------------------
   13. Loading Spinner
   ---------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(233,30,140,0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   14. Utility Classes
   ---------------------------------------------------------- */
.hidden  { display: none !important; }
.flex    { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-sm   { font-size: var(--font-size-sm); }
.text-xs   { font-size: var(--font-size-xs); }
.text-muted { color: var(--text-muted); }
.font-bold  { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.relative { position: relative; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--section-gap) 0;
}

/* Section gap */
.section-gap { margin-bottom: var(--section-gap); }
