/* ============================================
   GLOBAL STYLES
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #f5f5f7;

    /* Hintergrund: einmaliger Verlauf, keine Kachelung */
    background: radial-gradient(circle at top, #2b3f55 0, #0b1724 40%, #02060a 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* Globaler Link-Reset */
a,
a:link,
a:visited,
a:active,
a:hover {
    text-decoration: none !important;
    color: inherit;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background: rgba(10, 20, 35, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(6px);
}

.header-inner {
    max-width: 1400px; /* breiter */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: #fff !important;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-nav a {
    color: #dfe6f0 !important;
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Login-Button in der Navigation */
.nav-btn {
    border: 1px solid #4ca3ff;
    color: #f5faff !important;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3680ff, #4ca3ff);
    box-shadow: 0 0 8px rgba(76, 163, 255, 0.4);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #2a6de0, #3f94f0);
    box-shadow: 0 0 12px rgba(76, 163, 255, 0.8);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    padding: 30px 20px 50px;
    max-width: 1400px; /* Dashboard allgemein breiter */
    margin: 0 auto;
}

/* Links im Content in dezenter Farbe */
main a {
    color: #4ca3ff !important;
}

main a:hover {
    opacity: 0.85;
}

/* Startseiten- / Dashboard-Container */
.home-container {
    background: rgba(7, 15, 30, 0.96);
    padding: 26px 26px 30px;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-container {
    /* optional extra Zeug später */
}

/* Dashboard-Karten */
.dashboard-card {
    margin-top: 20px;
    padding: 18px 18px 20px;
    border-radius: 12px;
    background: radial-gradient(circle at top left, rgba(33, 66, 120, 0.4), rgba(6, 10, 20, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    color: #f5faff;
}

.dashboard-card .hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #c0c9dd;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 16px;
    margin-bottom: 10px;
}

.dashboard-header-main {
    max-width: 70%;
}

.airport-title {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    color: #f5faff;
}

.airport-title small {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-left: 6px;
}

.airport-location {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: #c7d2e5;
}

/* Stats-Zeile */
.dashboard-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.stat-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(36, 99, 235, 0.4), rgba(5, 12, 25, 0.98));
    border: 1px solid rgba(76, 163, 255, 0.45);
    display: flex;
    flex-direction: column;
    min-height: 58px;
}

.stat-pill-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c7d2e5;
    margin-bottom: 4px;
}

.stat-pill-value {
    font-size: 1rem;
    font-weight: 600;
    color: #f5faff;
}

/* 3-Spalten-Grid: links Steuerung, Mitte Karte, rechts Flüge */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1.8fr 1.1fr; /* Mitte mehr Platz gegeben */
    gap: 20px;
    margin-top: 24px;
}

.dashboard-sidebar,
.dashboard-main,
.dashboard-right {
    min-width: 0;
}

/* Sidebar-Menü-Card */
.dashboard-menu-card h3 {
    margin-bottom: 10px;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* Sidebar-Buttons */
.sidebar-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(76, 163, 255, 0.55);
    background: rgba(10, 25, 48, 0.95);
    color: #e4ecff;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease, box-shadow 0.1s ease;
}

.sidebar-btn:hover {
    background: rgba(24, 52, 98, 0.98);
    border-color: rgba(107, 185, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
}

.sidebar-btn-secondary {
    margin-top: 12px;
    text-align: center;
}

/* Karten-Bereich */
.dashboard-map-card {
    min-height: 360px; /* damit die Karte Raum hat */
}

.dashboard-map-card .hint {
    margin-bottom: 10px;
}

/* ECHTE Map */
#airport-map {
    width: 100%;
    height: 340px; /* höher gemacht */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(150, 180, 220, 0.6);
}

/* Fallback-Placeholder (falls woanders genutzt) */
.map-placeholder {
    width: 100%;
    height: 260px;
    border-radius: 10px;
    border: 1px dashed rgba(150, 180, 220, 0.5);
    background: radial-gradient(circle at top, rgba(40, 80, 140, 0.25), rgba(3, 8, 20, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #c0c9dd;
    font-style: italic;
}

/* Flüge-Liste */
.flight-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 0.9rem;
}

.flight-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flight-list li:last-child {
    border-bottom: none;
}

.flight-list-empty {
    color: #c0c9dd;
    font-style: italic;
}

/* ============================================
   AUTH PAGES (Login / Register)
   ============================================ */

.page-auth {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(7, 15, 30, 0.96);
    padding: 24px 22px 26px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    color: #f5faff;
}

/* Formulare */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #c7d2e5;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid #2a3447;
    background: #050b18;
    color: #f5f5f7;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4ca3ff;
    box-shadow: 0 0 0 1px rgba(76, 163, 255, 0.7);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 8px;
    text-align: center;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.75);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85);
}

/* Fehlermeldungen */
.form-errors {
    background: rgba(120, 20, 20, 0.85);
    border: 1px solid rgba(255, 120, 120, 0.7);
    color: #ffecec;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.form-errors ul {
    margin: 0;
    padding-left: 18px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #9ba4b8;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

/* ============================================
   USER MENU / AVATAR
   ============================================ */

.user-menu {
    position: relative;
    display: inline-block;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 27, 46, 0.9);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar-placeholder {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3680ff, #4ca3ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f5faff;
    box-shadow: 0 0 8px rgba(76, 163, 255, 0.7);
}

.user-name {
    font-size: 0.9rem;
    color: #e0e6f5;
}

/* Dropdown-Menü */
.user-menu-dropdown {
    position: absolute;
    right: 0;
    margin-top: 6px;
    min-width: 180px;
    background: rgba(7, 15, 30, 0.98);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    padding: 6px 0;
    display: none;
    z-index: 200;
}

.user-menu:hover .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 0.9rem;
    color: #dfe6f5 !important;
}

.user-menu-dropdown a:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Auth-Linkbereich unter Formular */
.auth-links {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #c7d2e5;
}

/* Dashboard-Link im Header hervorheben */
.nav-dashboard {
    border-radius: 999px;
    padding: 6px 14px;
    border: 1px solid rgba(76, 163, 255, 0.6);
    background: rgba(12, 32, 60, 0.9);
    box-shadow: 0 0 10px rgba(76, 163, 255, 0.35);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-dashboard:hover {
    background: rgba(22, 46, 80, 0.95);
    box-shadow: 0 0 14px rgba(76, 163, 255, 0.7);
}

/* ============================================
   RESPONSIVE ANPASSUNGEN
   ============================================ */

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    main {
        padding: 20px 12px 30px;
    }

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