:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #0f172a;
    --dark: #f8fafc;
    --gray-100: rgba(255, 255, 255, 0.05);
    --gray-200: rgba(255, 255, 255, 0.1);
    --gray-300: rgba(255, 255, 255, 0.2);
    --gray-600: #94a3b8;
    --gray-800: #1e293b;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-radius: 24px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #080c18;
    color: var(--dark);
    line-height: 1.6;
}

html { }

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header Navigation - Floating Style */
.top-header {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    /* Prevent scrollbar from shifting header */
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.header-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    border-radius: 50px;
    padding: 12px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.nav-menu {
    display: flex;
    gap: 6px;
    align-items: center;
    background: var(--gray-100);
    padding: 6px;
    border-radius: 50px;
    justify-self: center;
    margin-left: 0;
}

.nav-item {
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gray-200);
    color: var(--dark);
}

.nav-item.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.router-switcher {
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    gap: 6px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.router-switcher:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--white);
}

.router-switcher-empty {
    color: var(--gray-600);
    background: var(--gray-100);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    width: 100%;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--gray-200);
    color: var(--dark);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--dark);
}

.username {
    color: var(--gray-600);
    font-weight: 400;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 24px;
    align-items: start;
}

.left-column, .center-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.icon-btn-small {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--gray-600);
    transition: background 0.3s;
}

.icon-btn-small:hover {
    background: var(--gray-100);
}

/* Primary Card (Visa Style) */
.card-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.card-visa {
    padding: 20px;
}

.visa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.visa-logo {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.visa-amount {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
}

.visa-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.9;
}

/* Revenue Card */
.revenue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.revenue-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.3s;
}

.activity-item:hover {
    background: var(--gray-100);
}

.activity-icon img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.activity-name {
    font-weight: 600;
    font-size: 14px;
}

.activity-meta {
    font-size: 12px;
    color: var(--gray-600);
}

.activity-date {
    font-size: 13px;
    color: var(--dark);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-600);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-completed {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.activity-amount {
    font-weight: 600;
    font-size: 14px;
}

/* Chart Card */
.card-chart {
    min-height: 520px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.chart-tabs {
    display: flex;
    gap: 8px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Revenue Chart */
.revenue-chart-container {
    text-align: center;
    padding-right: 4px;
}

.revenue-chart-container::-webkit-scrollbar {
    width: 4px;
}
.revenue-chart-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}
.revenue-chart-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.total-balance {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

/* Balance breakdown list */
.balance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    text-align: left;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 13px;
}

.balance-row-label {
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.balance-row-value {
    font-weight: 700;
    color: var(--dark);
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 12px;
}

.chart-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--dark);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* Voucher Info */
.voucher-info {
    text-align: center;
}

.info-label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.info-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Avatar Group */
.avatar-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--white);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-more {
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
}

.login-header p {
    color: #94a3b8;
    font-size: 14px;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #94a3b8;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 14px;
    color: white;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-block {
    width: 100%;
}

/* Responsive */
@media (max-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr;
    }
    .right-column {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .right-column {
        grid-column: auto;
        display: flex;
        flex-direction: column;
    }
    .header-left {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 12px 16px;
    }
    .main-content {
        padding: 16px;
    }
    .nav-menu {
        display: none;
    }
    .logo span {
        display: none;
    }
}
