:root {
    --bg-base: #0a0e1a;
    --bg-surface: #121726;
    --bg-elevated: #1a2138;
    --bg-glass: rgba(26, 33, 56, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f4ff;
    --text-secondary: #9aa5c0;
    --text-muted: #6b7592;
    --accent: #00f5a0;
    --accent-dim: #00b878;
    --accent-glow: rgba(0, 245, 160, 0.15);
    --warning: #fbbf24;
    --danger: #ef4444;
    --info: #38bdf8;
    --gradient-accent: linear-gradient(135deg, #00f5a0 0%, #00d4ff 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --gradient-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --shadow-glow: 0 0 40px rgba(0, 245, 160, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    min-height: 100vh;
    background-image:
        radial-gradient(at 20% 0%, rgba(0, 245, 160, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(124, 58, 237, 0.06) 0px, transparent 50%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.03em;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.app-sidebar .brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.app-sidebar .brand-mark {
    width: 36px;
    height: 36px;
    background: var(--gradient-accent);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #0a0e1a;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.app-sidebar .brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.nav-section {
    padding: 1rem 0.75rem;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 2px;
    position: relative;
}

.nav-link-custom:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-link-custom.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-link-custom.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.nav-link-custom i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

/* Main */
.app-main {
    margin-left: 260px;
    min-height: 100vh;
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }
}

/* Topbar */
.app-topbar {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.topbar-btn:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Cards */
.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.card-glass.featured {
    background: linear-gradient(135deg, rgba(0, 245, 160, 0.08), rgba(124, 58, 237, 0.04));
    border-color: var(--accent-dim);
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-dim);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    margin-bottom: 0.85rem;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: clamp(1rem, 3.5vw, 1.75rem);
    font-weight: 700;
    margin-top: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
    max-width: 100%;
    min-width: 0;
}

.stat-card .stat-delta {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.stat-card.accent .stat-icon {
    background: var(--accent-glow);
    color: var(--accent);
}

.stat-card.purple .stat-icon {
    background: rgba(124, 58, 237, 0.12);
    color: #a78bfa;
}

.stat-card.warning .stat-icon {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}

.stat-card.info .stat-icon {
    background: rgba(56, 189, 248, 0.12);
    color: var(--info);
}

.stat-card.danger .stat-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* Tables */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-subtle);
}

.table-custom td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chip-success {
    background: rgba(0, 245, 160, 0.12);
    color: var(--accent);
    border: 1px solid rgba(0, 245, 160, 0.25);
}

.chip-pending {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.chip-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.chip-info {
    background: rgba(56, 189, 248, 0.12);
    color: var(--info);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.chip-muted {
    background: rgba(155, 165, 192, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Forms */
.form-control-custom,
.form-select-custom {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.7rem 0.95rem;
    width: 100%;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-custom:focus,
.form-select-custom:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-label-custom {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary-custom {
    background: var(--gradient-accent);
    color: #0a0e1a;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 245, 160, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 245, 160, 0.35);
}

.btn-secondary-custom {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    border: 1px solid var(--border-default);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.btn-secondary-custom:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger-custom {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-danger-custom:hover {
    background: var(--danger);
    color: white;
}

.btn-sm-custom {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

/* Plan card */
.plan-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.plan-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-dim);
    box-shadow: var(--shadow-glow);
}

.plan-card.featured {
    border-color: var(--accent);
}

.plan-card.featured::after {
    content: 'POPULAR';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-accent);
    color: #0a0e1a;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.plan-roi {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Progress */
.progress-track {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    box-shadow: 0 0 12px rgba(0, 245, 160, 0.4);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* Alerts */
.alert-custom {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.alert-success-custom {
    background: rgba(0, 245, 160, 0.08);
    border: 1px solid rgba(0, 245, 160, 0.25);
    color: var(--accent);
}

.alert-danger-custom {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-warning-custom {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--warning);
}

.alert-info-custom {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--info);
}

/* Notification dropdown */
.notif-dropdown {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
}

.notif-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.75rem;
}

.notif-item:hover {
    background: var(--bg-surface);
}

.notif-item.unread {
    background: rgba(0, 245, 160, 0.04);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-surface);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

/* Inputs special */
.copy-field {
    background: var(--bg-base);
    border: 1px dashed var(--accent-dim);
    border-radius: 10px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    word-break: break-all;
}

/* Spinner */
@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Hero (landing) */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pagination */
.pagination .page-link {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    margin: 0 2px;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    color: #0a0e1a;
    border-color: var(--accent);
}

/* Print PDF override */
@media print {
    body {
        background: white;
        color: black;
    }
}