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

/* ═══════════════════════════════════════
   HUB LAUMAZ — Premium Design System
   ═══════════════════════════════════════ */

:root {
    /* Core palette */
    --bg-deep:    #0a0a0b;
    --bg-dark:    #101012;
    --bg-panel:   #161619;
    --bg-surface: #1c1c20;
    --bg-hover:   #222228;
    --bg-active:  rgba(255, 65, 65, 0.08);

    /* Text */
    --text-primary:   #f0f0f2;
    --text-secondary: #a0a0ab;
    --text-muted:     #68687a;

    /* Accent — signature red */
    --accent:       #ff4545;
    --accent-light: #ff6b6b;
    --accent-dim:   rgba(255, 69, 69, 0.15);
    --accent-glow:  rgba(255, 69, 69, 0.25);
    --accent-ring:  rgba(255, 69, 69, 0.35);

    /* Semantic */
    --success:     #34d399;
    --success-dim: rgba(52, 211, 153, 0.12);
    --warning:     #fbbf24;
    --warning-dim: rgba(251, 191, 36, 0.12);
    --danger:      #f87171;
    --danger-dim:  rgba(248, 113, 113, 0.10);
    --info:        #60a5fa;
    --info-dim:    rgba(96, 165, 250, 0.12);

    /* Border */
    --border:       rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 24px var(--accent-glow);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}
a:hover { color: var(--accent-light); }

::selection {
    background: var(--accent-dim);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }


/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */

.sidebar, .hub-sidebar {
    width: 260px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.35s var(--ease-out);
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 700;
    padding: 0 24px 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.03em;
}

/* ─── NAV ─── */
.nav-group { margin-bottom: 8px; }

.nav-item, .hub-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 2px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item:hover, .hub-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item.active, .hub-nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::before, .hub-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item svg, .hub-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.nav-item:hover svg, .hub-nav-item:hover svg { opacity: 1; }
.nav-item.active svg, .hub-nav-item.active svg { opacity: 1; }

.sidebar-footer {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), #ff8888);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════ */

.main-content, .hub-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 100vh;
    background: var(--bg-deep);
}

.topbar {
    height: 60px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.content-area {
    padding: 28px 32px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}


/* ═══════════════════════════════════════
   GLASS / SURFACES
   ═══════════════════════════════════════ */

.glass {
    background: rgba(22, 22, 25, 0.7) !important;
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg);
}

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.glow-primary {
    box-shadow: var(--shadow-glow);
    transition: box-shadow 0.35s var(--ease-out);
}
.glow-primary:hover {
    box-shadow: 0 0 36px var(--accent-ring);
}


/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
    transition-duration: 0.05s;
}

.btn.primary {
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 69, 69, 0.25);
}
.btn.primary:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 16px rgba(255, 69, 69, 0.35);
    transform: translateY(-1px);
}
.btn.primary:active {
    transform: scale(0.97) translateY(0);
}

.btn.danger {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.2);
}
.btn.danger:hover {
    background: var(--danger-dim);
    border-color: rgba(248, 113, 113, 0.3);
}

.btn.success {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.2);
}
.btn.success:hover {
    background: var(--success-dim);
    border-color: rgba(52, 211, 153, 0.3);
}


/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    position: sticky;
    top: 0;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s var(--ease-out);
}
.table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.table tr:last-child td { border-bottom: none; }

.table-row-hover .hover-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.table-row-hover:hover .hover-actions {
    opacity: 1;
}


/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge.premium {
    background: var(--accent-dim);
    color: var(--accent);
}
.badge.free {
    background: rgba(160, 160, 171, 0.08);
    color: var(--text-muted);
}
.badge.active {
    background: var(--success-dim);
    color: var(--success);
}
.badge.inactive {
    background: var(--danger-dim);
    color: var(--danger);
}


/* ═══════════════════════════════════════
   FORMS
   ═══════════════════════════════════════ */

.input-field, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.input-field:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}


/* ═══════════════════════════════════════
   STAT CARDS (Dashboard)
   ═══════════════════════════════════════ */

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
}


/* ═══════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════ */

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-deep);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-wrap::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    width: 420px;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-box h1 {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.login-box p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
    line-height: 1.5;
}


/* ═══════════════════════════════════════
   ALERTS / TOAST
   ═══════════════════════════════════════ */

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
}
.alert.success {
    background: var(--success-dim);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--success);
}
.alert.error {
    background: var(--danger-dim);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}
.alert.warning {
    background: var(--warning-dim);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}
.alert.info {
    background: var(--info-dim);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--info);
}


/* ═══════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════ */

.mono { font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; font-size: 13px; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.fade-in {
    animation: fadeIn 0.4s var(--ease-out);
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 12px var(--accent-dim); }
    50% { box-shadow: 0 0 24px var(--accent-glow); }
}

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

.slide-up { animation: slideUp 0.5s var(--ease-out) both; }
.slide-up-1 { animation-delay: 0.05s; }
.slide-up-2 { animation-delay: 0.1s; }
.slide-up-3 { animation-delay: 0.15s; }
.slide-up-4 { animation-delay: 0.2s; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    .sidebar, .hub-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
    }
    .sidebar.open, .hub-sidebar.open {
        transform: translateX(0);
    }
    .main-content, .hub-content {
        margin-left: 0;
    }
    .topbar {
        padding: 0 16px;
    }
    .content-area {
        padding: 16px;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }


/* ═══════════════════════════════════════
   MODAL (Hub actions confirm)
   ═══════════════════════════════════════ */

.hub-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.hub-modal-overlay.active { display: flex; }
.hub-modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.25s var(--ease-out);
}
