/* Dashboard Styles */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: radial-gradient(circle at top, rgba(67, 196, 255, 0.15), transparent 45%) var(--bg);
}

.auth-card {
    background: var(--card);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.auth-subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

.auth-note {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.dashboard-container {
    min-height: 100vh;
}

.dashboard-header {
    background: rgba(5, 2, 10, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem clamp(1rem, 4vw, 3.5rem);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.75rem;
}

.dashboard-subtitle {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dashboard-main {
    padding: clamp(1rem, 4vw, 3.5rem);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(145deg, var(--card), var(--card-alt));
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-content p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.table-container {
    background: var(--card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(67, 196, 255, 0.2);
    color: var(--accent);
}

.badge-secondary {
    background: rgba(240, 173, 255, 0.2);
    color: var(--tag);
}

.chart-container {
    background: var(--card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
}

.chart-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.chart-bar-item {
    margin-bottom: 1rem;
}

.chart-bar-item:last-child {
    margin-bottom: 0;
}

.chart-bar-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.chart-bar {
    position: relative;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    border-radius: 8px;
    transition: width 0.5s ease;
}

.chart-bar-value {
    position: absolute;
    right: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    z-index: 1;
}

.loading, .no-data {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .dashboard-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .logout-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 1.5rem;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

