/* ============================================================================
   SHIVA ADMIN DASHBOARD - DARK THEME
   ============================================================================ */

:root {
    /* Background Colors */
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-card: #252d4d;
    --bg-hover: #2f3757;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3c7e6;
    --text-muted: #7c8db5;

    /* Brand Colors */
    --accent-purple: #6F01DD;
    --accent-cyan: #00EE9D;
    --accent-yellow: #F6ED01;

    /* Status Colors */
    --success: #81c784;
    --warning: #ff9800;
    --error: #ef5350;
    --info: #64b5f6;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================================================
   GLOBAL RESET & BASE
   ============================================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 2px solid rgba(111, 1, 221, 0.3);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 0.6rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(111, 1, 221, 0.1);
    border-color: rgba(111, 1, 221, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(111, 1, 221, 0.2), rgba(0, 238, 157, 0.1));
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-offline {
    background: var(--error);
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

main h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid rgba(111, 1, 221, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(111, 1, 221, 0.5);
}

/* ============================================================================
   DASHBOARD GRID
   ============================================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-change {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

button, .button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-purple), #8A2AE8);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(111, 1, 221, 0.4);
}

button:hover, .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 1, 221, 0.6);
}

button:active, .button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-secondary {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-purple);
}

.button-danger {
    background: linear-gradient(135deg, var(--error), #c62828);
}

.button-success {
    background: linear-gradient(135deg, var(--success), #4caf50);
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: rgba(0, 0, 0, 0.3);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

table td {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

table tr:hover {
    background: rgba(111, 1, 221, 0.1);
}

table code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(111, 1, 221, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 238, 157, 0.1);
}

/* ============================================================================
   BADGES & TAGS
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(129, 199, 132, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-warning {
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-error {
    background: rgba(239, 83, 80, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
}

.badge-info {
    background: rgba(100, 181, 246, 0.2);
    color: var(--info);
    border: 1px solid var(--info);
}

/* ============================================================================
   RECENT SECTION
   ============================================================================ */

.recent-section {
    margin-top: 2rem;
}

.recent-section h2 {
    margin-bottom: 1rem;
}

/* ============================================================================
   LOGIN PAGE
   ============================================================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    max-width: 450px;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(111, 1, 221, 0.1) 0%, rgba(0, 238, 157, 0.05) 100%);
    border: 2px solid rgba(111, 1, 221, 0.3);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.error-message {
    padding: 1rem;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid var(--error);
    border-radius: 12px;
    color: var(--error);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(129, 199, 132, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-error {
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-info {
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

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

    .container {
        padding: 1rem;
    }

    main h1 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .nav-brand h1 {
        font-size: 1.5rem;
    }

    button, .button {
        width: 100%;
        padding: 1rem;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none; }
