@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #121212;
    --surface-dark: #1e1e1e;
    --surface-glass: rgba(30, 30, 30, 0.7);
    --primary: #6366f1; /* Electric Blueish */
    --accent: #a855f7;  /* Deep Purple */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-blur: blur(12px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-dark);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
    min-height: 100vh;
}

/* Layout - Sidebar & Main */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--surface-glass);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.25rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem;
    max-width: calc(100% - 280px);
    transition: margin-left 0.4s ease;
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 2rem 0.75rem; }
    .sidebar span { display: none; }
    .main-content { margin-left: 80px; max-width: calc(100% - 80px); }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

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

.nav-link.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.tab-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-section.active {
    display: block;
}

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

/* Typography & Titles */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-glass), transparent);
}

/* Cards & Containers */
.glass-card {
    background: var(--surface-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.stat-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary);
}

/* Tables Customization */
.table-container {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

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

th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.9rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Buttons */
.btn-modern {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}
.btn-primary:hover { opacity: 0.9; transform: scale(1.02); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}
.btn-outline:hover { background: var(--border-glass); }

/* Badges */
.badge-modern {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-ivao { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-vatsim { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Avatars */
.pilot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid var(--border-glass);
}

/* Inputs */
input, select, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: white;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}