/* ============================================
   CableFlow Pro - Ultra Premium 3D UI
   ============================================ */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #7c3aed;
    --accent-light: #a855f7;
    --accent-glow: rgba(124, 58, 237, 0.4);
    --blue: #3b82f6;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;
    --cyan: #06b6d4;
    --pink: #ec4899;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, sans-serif;
}

[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ============ ULTRA PREMIUM 3D LOGIN ============ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050816;
    position: relative;
    overflow: hidden;
    padding: 16px;
}

/* Animated Background */
.login-bg-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.mesh-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124, 58, 237, 0.15) 0%, transparent 60%), radial-gradient(ellipse 60% 50% at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%), radial-gradient(ellipse 50% 50% at 20% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: meshPulse 12s ease-in-out infinite alternate;
}

@keyframes meshPulse {
    0% {
        opacity: 1;
        transform: scale(1)
    }

    100% {
        opacity: 0.7;
        transform: scale(1.1)
    }
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.orb-1 {
    width: 250px;
    height: 250px;
    background: rgba(124, 58, 237, 0.3);
    top: -60px;
    right: -40px;
    animation: orbFloat1 10s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(6, 182, 212, 0.2);
    bottom: -80px;
    left: -80px;
    animation: orbFloat2 14s ease-in-out infinite;
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: rgba(236, 72, 153, 0.25);
    top: 40%;
    left: 60%;
    animation: orbFloat3 8s ease-in-out infinite;
}

.orb-4 {
    width: 120px;
    height: 120px;
    background: rgba(59, 130, 246, 0.25);
    bottom: 30%;
    right: 10%;
    animation: orbFloat1 6s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(30px, -40px) scale(1.15)
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9)
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    50% {
        transform: translate(40px, -30px) scale(1.1)
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(0, 0)
    }

    50% {
        transform: translate(-30px, -40px)
    }
}

.grid-floor {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 40%;
    background: linear-gradient(transparent, rgba(124, 58, 237, 0.03));
    transform: perspective(500px) rotateX(60deg);
    background-image: linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 40px 40px
    }
}

/* 3D Card */
.login-3d-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    perspective: 1200px;
}

.login-card-3d {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 28px;
    padding: 36px 28px 20px;
    position: relative;
    overflow: hidden;
    transform: rotateX(2deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: cardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 58, 237, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: rotateX(8deg) translateY(60px) scale(0.95)
    }

    to {
        opacity: 1;
        transform: rotateX(2deg) translateY(0) scale(1)
    }
}

.card-border-glow {
    position: absolute;
    inset: -1px;
    border-radius: 28px;
    background: conic-gradient(from 0deg, transparent, rgba(124, 58, 237, 0.4), rgba(6, 182, 212, 0.3), rgba(236, 72, 153, 0.3), transparent);
    z-index: -1;
    animation: borderSpin 6s linear infinite;
    opacity: 0.6;
}

@keyframes borderSpin {
    to {
        transform: rotate(360deg)
    }
}

/* Logo */
.login-hero {
    text-align: center;
    margin-bottom: 28px;
}

.logo-3d-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
}

.logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-light);
    border-right-color: var(--cyan);
    animation: ringRotate 3s linear infinite;
}

@keyframes ringRotate {
    to {
        transform: rotate(360deg)
    }
}

.logo-core {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    background: linear-gradient(135deg, #7c3aed, #a855f7, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4), 0 0 60px rgba(124, 58, 237, 0.15);
    animation: coreFloat 4s ease-in-out infinite;
}

@keyframes coreFloat {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-6px)
    }
}

.brand-3d {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

.brand-3d span {
    background: linear-gradient(135deg, #a855f7, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    color: rgba(148, 163, 184, 0.8);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 400;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-chip i {
    font-size: 0.6rem;
}

/* Neon Input Fields */
.login-forms-wrap {
    margin-bottom: 4px;
}

.input-3d {
    position: relative;
    margin-bottom: 16px;
}

.input-3d>i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.9rem;
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-3d input {
    width: 100%;
    padding: 15px 16px 15px 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #f1f5f9;
    font-size: 0.95rem;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-3d input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1), 0 4px 24px rgba(124, 58, 237, 0.1);
}

.input-3d input:focus+.input-glow-line {
    transform: scaleX(1);
}

.input-3d input:focus~i,
.input-3d:focus-within>i {
    color: var(--accent-light);
}

.input-glow-line {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-light), var(--cyan), transparent);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.input-3d input::placeholder {
    color: rgba(148, 163, 184, 0.35);
    font-weight: 400;
}

.signup-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Neon Submit Button */
.btn-neon {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    margin-top: 4px;
}

.btn-neon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5);
}

.btn-neon:active {
    transform: translateY(0) scale(0.98);
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-neon:hover::before {
    left: 100%;
}

.btn-neon-green {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.btn-neon-green:hover {
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

.btn-neon-orange {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.3);
}

.btn-neon-orange:hover {
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5);
}

/* Login Type Selector (Bottom) */
.login-type-bottom {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.type-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.type-pill:hover {
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.05);
    transform: translateY(-2px);
}

.type-pill.active {
    border-color: rgba(124, 58, 237, 0.5);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.05));
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

.type-pill.active .pill-dot {
    opacity: 1;
    transform: scale(1);
}

.pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pill-staff {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.pill-signup {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.pill-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pill-text strong {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.pill-text small {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pill-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-light);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.type-pill.active .pill-icon {
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.3);
}

.error-msg {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    margin-top: 14px;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.15);
}


/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #059669, var(--green));
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, var(--red));
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #d97706, var(--orange));
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--bg-glass);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    width: 100%;
}

.btn-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: var(--accent);
    color: #fff;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============ HEADER ============ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ============ SIDEBAR ============ */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    z-index: 200;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    flex: 1;
}

.sidebar-close {
    margin-left: auto;
}

.sidebar-menu {
    flex: 1;
    padding: 12px 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.menu-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border-glass);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* ============ PAGE CONTENT ============ */
.page-content {
    margin-top: 60px;
    padding: 16px;
    padding-bottom: 90px;
    min-height: calc(100vh - 60px);
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item.active {
    color: var(--accent-light);
}

.nav-item.active i {
    text-shadow: 0 0 12px var(--accent-glow);
}

/* ============ 3D STAT CARDS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    transform: perspective(800px) rotateX(0) rotateY(0);
    cursor: pointer;
}

.stat-card:hover {
    transform: perspective(800px) rotateX(-2deg) rotateY(2deg) translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--green), #34d399);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, var(--orange), #fbbf24);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.stat-card:nth-child(5)::before {
    background: linear-gradient(90deg, var(--red), var(--pink));
}

.stat-card:nth-child(6)::before {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.stat-card:nth-child(7)::before {
    background: linear-gradient(90deg, var(--pink), var(--red));
}

.stat-card:nth-child(8)::before {
    background: linear-gradient(90deg, #34d399, var(--green));
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.stat-card:nth-child(1) .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.stat-card:nth-child(4) .stat-icon {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.stat-card:nth-child(5) .stat-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.stat-card:nth-child(6) .stat-icon {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan);
}

.stat-card:nth-child(7) .stat-icon {
    background: rgba(236, 72, 153, 0.15);
    color: var(--pink);
}

.stat-card:nth-child(8) .stat-icon {
    background: rgba(52, 211, 153, 0.15);
    color: var(--green);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.stat-card {
    animation: countUp 0.5s ease forwards;
}

.stat-card:nth-child(2) {
    animation-delay: 0.05s
}

.stat-card:nth-child(3) {
    animation-delay: 0.1s
}

.stat-card:nth-child(4) {
    animation-delay: 0.15s
}

.stat-card:nth-child(5) {
    animation-delay: 0.2s
}

.stat-card:nth-child(6) {
    animation-delay: 0.25s
}

.stat-card:nth-child(7) {
    animation-delay: 0.3s
}

.stat-card:nth-child(8) {
    animation-delay: 0.35s
}

/* ============ CARDS ============ */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--accent-light);
}

/* ============ QUICK ACTIONS ============ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.quick-action-btn .qa-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.qa-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.qa-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.qa-orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.qa-purple {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.qa-red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.qa-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan);
}

.qa-pink {
    background: rgba(236, 72, 153, 0.15);
    color: var(--pink);
}

/* ============ CHART ============ */
.chart-container {
    position: relative;
    height: 220px;
    margin-top: 8px;
}

/* ============ DATA LIST ============ */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-item {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.data-item:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

.data-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.data-item-info {
    flex: 1;
    min-width: 0;
}

.data-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-item-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.data-item-right {
    text-align: right;
    flex-shrink: 0;
}

.data-item-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.data-item-status {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.status-suspended {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.status-paid {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.status-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.status-partial {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.status-open {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
}

.status-progress {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

/* ============ FORMS ============ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.form-actions .btn {
    flex: 1;
}

/* ============ SEARCH BAR ============ */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
}

.search-input input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-body {
    padding: 20px;
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.3s ease;
    min-width: 280px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

.toast.success {
    border-left: 4px solid var(--green);
}

.toast.error {
    border-left: 4px solid var(--red);
}

.toast.warning {
    border-left: 4px solid var(--orange);
}

.toast-msg {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

/* ============ MORE MENU ============ */
.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.more-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.more-item i {
    font-size: 1.5rem;
}

.more-item span {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* ============ SECTION TITLE ============ */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--accent-light);
    font-size: 0.9rem;
}

/* ============ RECEIPT ============ */
.receipt {
    background: #fff;
    color: #000;
    padding: 24px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.receipt-header h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.receipt-row.total {
    border-top: 2px dashed #ccc;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.receipt-footer {
    text-align: center;
    border-top: 2px dashed #ccc;
    margin-top: 16px;
    padding-top: 12px;
    font-size: 0.75rem;
    color: #666;
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ============ TABLE ============ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table th {
    padding: 12px;
    text-align: left;
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-glass);
}

.data-table tr:hover td {
    background: var(--bg-glass);
}

/* ============ PRINT ============ */
.print-area {
    display: none;
}

@media print {
    body>*:not(.print-area) {
        display: none !important;
    }

    .print-area {
        display: block !important;
    }
}

/* ============ COLLECTOR APP ============ */
.collector-header {
    background: linear-gradient(135deg, #059669, var(--green)) !important;
}

.collector-header * {
    color: #fff !important;
}

.collector-header .btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* ============ DESKTOP ============ */
@media (min-width:768px) {
    .sidebar {
        left: 0;
        top: 0;
    }

    .sidebar-close {
        display: none;
    }

    .page-content {
        margin-left: 280px;
        padding: 24px;
    }

    .bottom-nav {
        display: none;
    }

    .top-header {
        left: 280px;
    }

    #menuToggle {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(8, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-container {
        border-radius: var(--radius-lg);
        max-width: 640px;
        max-height: 85vh;
    }

    .more-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .chart-container {
        height: 300px;
    }

    .page-content {
        padding-bottom: 24px;
    }
}

@media (min-width:1200px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ============ LOADING ============ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-glass);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ============ COLLECTOR CARD STYLES ============ */
.collector-customer-card {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.collector-customer-card .ccc-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.collector-customer-card .ccc-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.collector-customer-card .ccc-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.collector-customer-card .ccc-pending {
    font-weight: 700;
    color: var(--red);
    font-size: 1rem;
}

.collector-customer-card .ccc-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.collector-customer-card .ccc-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 8px;
}

/* ============ LOGIN TABS ============ */
.login-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.login-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.login-tab:hover:not(.active) {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.login-tab i {
    font-size: 0.85rem;
}

.success-msg {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
}

.success-msg a {
    color: var(--accent-light);
    font-weight: 700;
}

/* ============ AGENCY BADGE ============ */
.agency-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--accent-light);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ TAB BAR ============ */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 4px;
    overflow-x: auto;
}

/* ============ COMPLAINT STATUSES ============ */
.status-disconnected {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

.status-in-progress,
.status-in {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.status-resolved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.status-closed {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

.status-n\/a {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.status-trial {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.status-expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

/* ============ LOGOUT BUTTON (HEADER) ============ */
.logout-btn-header {
    background: rgba(239, 68, 68, 0.12) !important;
    color: var(--red) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    flex-shrink: 0;
}

.logout-btn-header:hover {
    background: rgba(239, 68, 68, 0.25) !important;
}

/* Mobile header compact */
@media (max-width:767px) {
    .header-right {
        gap: 6px !important;
    }

    .header-title {
        font-size: 0.95rem !important;
    }

    .btn-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
    }

    .agency-badge {
        max-width: 80px;
        font-size: 0.6rem;
        padding: 3px 8px;
    }
}