:root {
    --bg-body: #060c1c;
    --bg-sidebar: #0b162c;
    --bg-surface: #0c1832;
    --bg-card: #0f203e;
    --bg-card-hover: #182c50;

    --text-primary: #e9effa;
    --text-secondary: #a6b8d7;
    --text-muted: #7c8bad;

    --accent-color: #5ba8ff;
    --accent-2: #2dd4bf;
    --accent-gradient: linear-gradient(120deg, #5ba8ff 0%, #6dd3ff 50%, #2dd4bf 100%);
    --gold-accent: #fbbf24;

    --success-color: #22c55e;
    --danger-color: #f87171;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --sidebar-width: 280px;
    --header-height: 80px;

    --shadow-sm: 0 4px 16px rgba(3, 7, 18, 0.3);
    --shadow-md: 0 10px 30px rgba(2, 6, 23, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 30px rgba(91, 168, 255, 0.25);

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(91, 168, 255, 0.08), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(45, 212, 191, 0.06), transparent 25%),
        linear-gradient(145deg, #050915 0%, #0b1224 50%, #080f20 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
}

.app-container {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f2144 0%, #0b162c 100%);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-color);
    background: rgba(91, 168, 255, 0.12);
    padding: 0.55rem;
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-weight: 600;
    border: 1px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(91, 168, 255, 0.12) 0%, rgba(45, 212, 191, 0.08) 100%);
    color: var(--accent-color);
    border-color: rgba(91, 168, 255, 0.35);
    box-shadow: var(--shadow-sm);
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.user-profile {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-glow);
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--gold-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem 3rem;
    width: calc(100% - var(--sidebar-width));
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    inset: 1.5rem;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 40%);
    border: 1px solid rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.page-subtitle {
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.6;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.pill.success {
    color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.25);
}

.pill.info {
    color: var(--accent-color);
    background: rgba(91, 168, 255, 0.1);
    border-color: rgba(91, 168, 255, 0.25);
}

.notification {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.notification::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--danger-color);
    border-radius: 50%;
    top: 9px;
    right: 9px;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.notification:hover {
    border-color: rgba(91, 168, 255, 0.3);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert-stack {
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert {
    padding: 1rem 1.25rem;
    background: rgba(15, 32, 62, 0.6);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-error,
.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.7fr 1.1fr;
    gap: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.stacked {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.split-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Cards */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 10% 10%, rgba(91, 168, 255, 0.12), transparent 35%);
    opacity: 0.5;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    border-color: rgba(91, 168, 255, 0.35);
    box-shadow: var(--shadow-lg);
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-hero {
    background: linear-gradient(135deg, #0f203e 0%, #102748 40%, #14335c 100%);
    border: 1px solid rgba(91, 168, 255, 0.35);
    box-shadow: var(--shadow-glow);
}

.card-hero .headline {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff 0%, #b8d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Credit Card Visual */
.credit-card {
    background: linear-gradient(135deg, #0a1731 0%, #102749 60%, #0e1f3e 100%);
    border-radius: 24px;
    padding: 1.75rem;
    color: white;
    height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.credit-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(91, 168, 255, 0.25), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(45, 212, 191, 0.2), transparent 35%);
    opacity: 0.8;
}

.card-top,
.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.chip {
    width: 52px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.chip::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.card-brand {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #e5ecff;
}

.card-number {
    font-size: 1.6rem;
    letter-spacing: 3px;
    font-family: 'Outfit', monospace;
    font-weight: 600;
}

.card-holder-label,
.card-expires-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.35rem;
    letter-spacing: 1px;
}

.card-holder-name,
.card-expires-date {
    font-size: 1.05rem;
    font-weight: 700;
}

/* Meta bar */
.meta-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.meta-item {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.meta-label {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-value {
    font-weight: 700;
    color: var(--text-primary);
}

.trend {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.trend.up {
    color: var(--success-color);
    background: rgba(34, 197, 94, 0.12);
}

.trend.down {
    color: var(--danger-color);
    background: rgba(248, 113, 113, 0.12);
}

/* Stats */
.stat-card {
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.income {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.stat-icon.expense {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.stat-info h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 0.9rem 1rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 0.95rem 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.amount {
    font-weight: 700;
    font-family: 'Outfit', monospace;
    font-size: 1rem;
}

.amount.positive {
    color: var(--success-color);
}

.amount.negative {
    color: var(--text-primary);
}

.status-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}

.status-completed {
    background-color: rgba(34, 197, 94, 0.12);
    color: var(--success-color);
    border-color: rgba(34, 197, 94, 0.35);
}

/* Forms */
.form-shell {
    max-width: 720px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.15s ease;
    width: 100%;
}

.form-control:focus {
    border-color: rgba(91, 168, 255, 0.8);
    outline: none;
    box-shadow: 0 0 0 4px rgba(91, 168, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.03);
}

.field-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.input-prefix {
    position: relative;
}

.input-prefix span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-prefix input {
    padding-left: 2.4rem;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-icon input {
    padding-left: 2.6rem;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    background: var(--accent-gradient);
    color: #041022;
    padding: 0.95rem 1.4rem;
    border-radius: 14px;
    font-weight: 800;
    border: 1px solid rgba(91, 168, 255, 0.35);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 35px rgba(91, 168, 255, 0.25);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(91, 168, 255, 0.35);
    box-shadow: var(--shadow-sm);
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 3rem 1.5rem;
    background: linear-gradient(160deg, #050915 0%, #0c142b 45%, #081125 100%);
}

.auth-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: stretch;
}

.auth-copy {
    background: linear-gradient(145deg, rgba(91, 168, 255, 0.1), rgba(45, 212, 191, 0.08));
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-copy h1 {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.bullet-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.bullet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.bullet i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 168, 255, 0.18);
    color: var(--accent-color);
}

.auth-card {
    width: 100%;
    background: rgba(12, 24, 50, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card .btn-primary {
    width: 100%;
}

.auth-footnote {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.auth-footnote a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
}

/* Utility */
.muted {
    color: var(--text-muted);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.2rem 0;
}

.subtle-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        gap: 1.5rem;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }
}

@media (max-width: 780px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }
}
