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

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    color: #f1f5f9;
}

/* Error Message */
.error-message {
    background: #ef444420;
    color: #ef4444;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
}

/* Currency Badge */
.currency-badge {
    background: #3b82f6;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 10px;
    display: inline-block;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.login-box {
    background: #1e293b;
    padding: 40px 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid #334155;
}

.login-box i {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 16px;
}

.login-box h2 {
    margin-bottom: 8px;
    font-size: clamp(22px, 5vw, 28px);
}

.login-box p {
    color: #94a3b8;
    margin-bottom: 32px;
    font-size: 14px;
}

.login-box input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f1f5f9;
    border-radius: 8px;
    font-size: 16px;
}

.login-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.login-box button:hover {
    background: #2563eb;
}

.login-box button:active {
    transform: scale(0.98);
}

.login-box button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1e293b;
    border-right: 1px solid #334155;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo {
    padding: 20px 24px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: #3b82f6;
    font-size: 24px;
}

.sidebar nav {
    flex: 1;
    padding: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #94a3b8;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #334155;
    color: #f1f5f9;
}

.nav-item.active {
    background: #3b82f6;
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #334155;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 12px;
    color: #94a3b8;
}

.admin-info i {
    font-size: 18px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

.logout-btn:active {
    transform: scale(0.98);
}

/* Mobile Menu Button - Hidden on desktop */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    transition: margin-left 0.3s ease;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header p {
    color: #94a3b8;
    font-size: 14px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10b98120;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #10b981;
}

.live-badge i {
    font-size: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #334155;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: #8b5cf620;
    color: #8b5cf6;
}

.stat-icon.blue {
    background: #3b82f620;
    color: #3b82f6;
}

.stat-icon.green {
    background: #10b98120;
    color: #10b981;
}

.stat-icon.orange {
    background: #f59e0b20;
    color: #f59e0b;
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-details h3 {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.stat-details p {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    word-break: break-word;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 0;
}

.chart-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 16px;
}

canvas {
    max-height: 300px;
    width: 100% !important;
}

/* Table */
.table-container {
    overflow-x: auto;
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

th {
    background: #0f172a;
    font-weight: 600;
    color: #94a3b8;
    font-size: 13px;
}

td {
    font-size: 14px;
    word-break: break-word;
}

tr:hover {
    background: #334155;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.status-active {
    background: #10b98120;
    color: #10b981;
}

.status-cancelled {
    background: #ef444420;
    color: #ef4444;
}

.status-paused {
    background: #f59e0b20;
    color: #f59e0b;
}

/* Search & Export */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.export-btn {
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.export-btn:hover {
    background: #059669;
}

.export-btn:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        position: fixed;
        z-index: 150;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: 70px;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .main-content {
        padding: 12px;
        padding-top: 60px;
    }

    th,
    td {
        padding: 8px 10px;
        font-size: 11px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding-top: 60px;
    }
}