/* ============================================================================
   FILE: dashboard-responsive.css
   PATH: public/css/dashboard-responsive.css
   VERSION: 4.0.0
   PURPOSE: Clean, full-width dashboard layout for the AviaSAFE SMS UI.
            - Fixed full-width header with brand, nav (WordPress-style dropdowns)
              and user/logout — NO sidebar, NO hamburger, NO overlay
            - Two-row header: Top (brand + user) / Yellow divider / Bottom (nav)
            - Page hero (airline name + department subtitle)
            - Main content full width
            - Single-line footer
            - Breakpoints: 768px
   AUTHOR: AviaSAFE Systems
   ============================================================================ */

/* ===== HEADER - Two Rows ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1a237e;
    color: #ffffff;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Top Row */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    height: 50px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.header-brand .logo-icon {
    font-size: 1.15rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right .user-email {
    font-size: 13px;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.85);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-right .logout-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.header-right .logout-btn:hover {
    background: #cc1111;
    border-color: #cc1111;
    color: #ffffff;
}

/* Yellow Separator Line */
.header-divider {
    height: 3px;
    background: #ffd700;
    width: 100%;
}

/* Bottom Row - Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    height: 44px;
    background: #1a237e;
    overflow-x: auto;
    justify-content: center;
}

/* Navigation links */
.header-nav .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-nav .nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.header-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
    border-bottom: 2px solid rgba(255, 215, 0, 0.65);
}

/* Home link - gold/yellow to stand out */
.header-nav .nav-link.nav-home {
    color: #ffd700;
    font-weight: 600;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.08);
}
.header-nav .nav-link.nav-home:hover {
    background: rgba(255, 215, 0, 0.18);
    color: #ffeb3b;
    border-color: rgba(255, 215, 0, 0.5);
}
.header-nav .nav-link.nav-home .home-icon {
    font-size: 14px;
    line-height: 1;
}

/* ===== NAV DROPDOWNS (ICAO 4-pillar structure) ===== */
.header-nav {
    overflow: visible; /* let dropdown menus escape the nav bar */
}

/* Dropdown toggle button (top-level pillar item) */
.header-nav .dropdown-toggle {
    border: none;
    background: transparent;
    font: inherit;
    line-height: inherit;
    color: rgba(255,255,255,0.8);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.header-nav .dropdown-toggle:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}
.header-nav .dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
    border-bottom: 2px solid rgba(255, 215, 0, 0.65);
}
.header-nav .dropdown-toggle:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: -2px;
}
.header-nav .nav-dropdown {
    position: relative;
}
.header-nav .nav-dropdown .nav-icon {
    font-size: 14px;
    line-height: 1;
}
.header-nav .nav-dropdown .chevron {
    font-size: 10px;
    opacity: 0.7;
    display: inline-block;
    transition: transform 0.15s ease;
}
.header-nav .nav-dropdown.open .chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.header-nav .dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    background: #ffffff;
    color: #0b2a42;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(13, 16, 61, 0.18);
    padding: 6px;
    display: none;
    z-index: 1001;
}
.header-nav .nav-dropdown.open .dropdown-menu {
    display: block;
}
.header-nav .dropdown-menu .dropdown-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    color: #0b2a42;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}
.header-nav .dropdown-menu .dropdown-link:hover {
    background: #eef2ff;
    color: #1a6b8a;
}
.header-nav .dropdown-menu .dropdown-link.active {
    background: #1a6b8a;
    color: #ffffff;
    font-weight: 700;
}



/* ===== LAYOUT - Keep footer at bottom ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* ===== MAIN CONTENT (adjust for two rows) ===== */
.main-content,
.app-shell .shell-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.main-content {
    margin-top: 94px; /* 50px top row + 3px divider + 44px nav = 97px, but use 94px for safety */
    padding: 20px 30px 20px;
    min-height: calc(100vh - 94px - 50px);
    background: #f5f7fa;
    flex: 1;
}

/* ===== PAGE HERO (airline name + subtitle) ===== */
.page-hero {
    padding: 16px 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8eaed;
}
.page-hero h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a237e;
    margin: 0;
}
.page-hero .subtitle {
    font-size: 14px;
    color: #666;
    margin: 4px 0 0 0;
}

/* Backwards-compat: previous .page-header block maps onto .page-hero */
.page-header {
    padding: 8px 0 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}
.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1a237e;
}
.page-header .subtitle {
    font-size: 13px;
    color: #666;
    margin: 2px 0 0 0;
}

/* ===== FOOTER ===== */
.app-footer {
    background: #e8f0fe;
    border-top: 2px solid #ffd700;
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    color: #1a237e;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

.app-footer .heart {
    color: #e53935;
    display: inline-block;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-top {
        padding: 6px 12px;
        height: 44px;
    }

    .header-brand {
        font-size: 15px;
    }

    .header-right .user-email {
        display: none;
    }

    .header-nav {
        padding: 4px 12px;
        height: auto;
        min-height: 40px;
        gap: 4px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: wrap;
    }

    .header-nav .nav-link {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Dropdowns stack in-flow on mobile so they stay tappable and unclipped */
    .header-nav .dropdown-toggle {
        font-size: 11px;
        padding: 4px 10px;
    }
    .header-nav .dropdown-menu {
        position: static;
        display: none;
        min-width: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.08);
        margin-top: 2px;
    }
    .header-nav .nav-dropdown.open .dropdown-menu {
        display: block;
    }
    .header-nav .dropdown-menu .dropdown-link {
        color: #ffffff;
        padding: 8px 10px;
    }
    .header-nav .dropdown-menu .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #ffd700;
    }
    .header-nav .dropdown-menu .dropdown-link.active {
        color: #ffd700;
        background: rgba(255, 215, 0, 0.15);
    }

    .main-content {
        margin-top: 84px; /* adjust for mobile */
        padding: 12px 12px;
    }

    .page-hero h1 {
        font-size: 18px;
    }
    .page-hero .subtitle {
        font-size: 12px;
    }

    .app-footer {
        font-size: 12px;
        padding: 12px 16px;
        min-height: 48px;
    }

    /* Home link: icon only on mobile */
    .header-nav .nav-link.nav-home .home-text {
        display: none;
    }
    .header-nav .nav-link.nav-home {
        padding: 4px 8px;
    }
}

/* ===== FEEDBACK MODAL ===== */
.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.feedback-btn {
    background: linear-gradient(135deg, #ffd700 0%, #f7b500 100%);
    color: #1a237e;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.feedback-btn:hover {
    background: linear-gradient(135deg, #f7b500 0%, #e6a300 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}
.feedback-btn:active {
    transform: translateY(0);
}

.feedback-modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 42, 66, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.feedback-modal.open {
    display: flex;
}

.feedback-modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.25s ease;
}

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

.feedback-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.feedback-close:hover {
    background: #f0f0f0;
    color: #1a237e;
}

.feedback-modal-content h2 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    color: #1a237e;
}

.feedback-rating {
    margin-bottom: 20px;
}
.feedback-rating label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    gap: 8px;
}
.star {
    background: none;
    border: none;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.star:hover,
.star.filled {
    color: #ffd700;
    transform: scale(1.15);
}
.star:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
    border-radius: 4px;
}

.feedback-field {
    margin-bottom: 16px;
}
.feedback-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}
.feedback-field input,
.feedback-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1a237e;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.feedback-field input:focus,
.feedback-field textarea:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.15);
}
.feedback-field textarea {
    resize: vertical;
    min-height: 100px;
}
.feedback-field input::placeholder,
.feedback-field textarea::placeholder {
    color: #999;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.feedback-btn-cancel,
.feedback-btn-submit {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.feedback-btn-cancel {
    background: transparent;
    color: #555;
    border: 1px solid #d0d7de;
}
.feedback-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #bbb;
}
.feedback-btn-submit {
    background: linear-gradient(135deg, #1a237e 0%, #0d1b5e 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
}
.feedback-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d1b5e 0%, #0a1445 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.4);
}
.feedback-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


