:root {
    --background-primary: #0a0a0f;
    --background-secondary: #12121a;
    --background-card: rgba(255, 255, 255, 0.03);
    --background-input: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    
    --accent-primary: #ef4444;
    --accent-secondary: #dc2626;
    --accent-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.1);
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(239, 68, 68, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 1.5rem auto;
    padding: 0.5rem;
    background: var(--background-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav a.active {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.1);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: inline-flex;
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Cards */
main {
    background: var(--background-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: border-color 0.2s;
}

main:hover {
    border-color: var(--border-hover);
}

.section {
    background: var(--background-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.section:hover {
    border-color: var(--border-hover);
}

.section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

label svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: var(--background-input);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.5rem;
}

select option {
    background: var(--background-secondary);
    color: var(--text-primary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
button {
    background: var(--accent-gradient);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Messages */
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

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

.stat-card {
    background: var(--background-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hover);
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
}

td {
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--background-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Coming Soon */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 3rem;
}

.coming-soon h1 {
    font-size: 4rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.coming-soon p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.coming-soon-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

@media (max-width: 600px) {
    .container, .container-wide {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1.25rem;
    }
    
    .coming-soon h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        width: calc(100% - 2rem);
        justify-content: space-around;
    }
}
