/* Main Styles for NOTAM Management System */

/* Custom Font */
@font-face {
    font-family: 'Khalid Art';
    src: url('../fonts/KhalidArt.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #1f8dee;
    --secondary-color: #1f8dee;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.15s ease-in-out;
}

* {
    box-sizing: border-box;
}

body, p, h1, h2, h3, h4, h5, h6, span, div, a, button, input, textarea, select, label, th, td, li {
    font-family: 'Khalid Art', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Restore Font Awesome icons */
.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-duotone,
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

body {
    font-family: 'Khalid Art', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: var(--light-color);
    color: #333;
    line-height: 1.6;
}

/* Icon-Text Spacing in Headers */
.card-header i.fas,
.card-header i.far,
.card-header i.fa {
    margin-left: 0.75rem;
}

.card-header h5,
.card-header h6 {
    margin-left: 0.5rem;
}

/* Button Icon Spacing */
.btn i.fas,
.btn i.far,
.btn i.fa {
    margin-left: 0.5rem;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    border-bottom: 3px solid #ffd700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
}

.navbar-brand i {
    margin-left: 0.5rem;
    color: #ffd700;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.nav-link:hover {
    color: #ffd700 !important;
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: #ffd700 !important;
    background-color: rgba(255,255,255,0.15);
    font-weight: 600;
}

.dropdown-menu {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
}

.dropdown-header {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dropdown-item {
    padding: 0.65rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(30, 58, 95, 0.05);
    transform: translateX(-3px);
}

.dropdown-item.active {
    background-color: rgba(30, 58, 95, 0.1);
    color: #1f8dee;
    font-weight: 500;
}

.dropdown-item i {
    margin-left: 0.5rem;
    width: 20px;
    text-align: center;
}

.dropdown-item small {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.badge {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
}

/* Login Page Styles */
.login-page body {
    font-family: 'Khalid Art', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #1f8dee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: linear-gradient(135deg, #FFFFFF, #1f8dee);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body {
    padding: 30px;
    direction: rtl;
    text-align: right;
}

.login-page .form-group {
    margin-bottom: 20px;
}

.login-page .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.login-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: right;
}

.login-page .form-control:focus {
    border-color: #1f8dee;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.login-page .input-group {
    direction: rtl;
}

.login-page .input-group .form-control {
    text-align: right;
}

.login-page .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
    order: -1;
}

.btn-login {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 500;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.login-page .alert {
    border: none;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
}

.login-page .alert-danger {
    background: #fee;
    color: #dc3545;
    border-right: 4px solid #dc3545;
}

.login-page .alert-warning {
    background: #fff3cd;
    color: #856404;
    border-right: 4px solid #ffc107;
}

.login-footer {
    text-align: center;
    padding: 20px 30px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.9rem;
    direction: rtl;
}

.welcome-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#1f8dee, #1f8dee);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 3s ease-in-out forwards;
}

.welcome-text {
    color: white;
    text-align: center;
    animation: slideIn 1.5s ease-out;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.welcome-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.info-animate {
    animation: infoSlideIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) 3s both;
}

@keyframes infoSlideIn {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes slideIn {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.login-container {
    animation: slideInUp 0.5s ease-out 3s both;
}

@keyframes slideInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Desktop-specific corner rounding to align with side panel */
@media (min-width: 768px) {
    body.login-page .login-container {
        border-radius: 0 15px 15px 0;
    }
}

/* Mobile adjustments for login layout */
@media (max-width: 768px) {
    body.login-page {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.login-page .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    body.login-page .login-container {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 15px; /* full rounded on mobile */
        min-height: auto;
    }
}

/* Dashboard Page Styles */
.dashboard-page body {
    font-family: 'Khalid Art', sans-serif;
    background: #f8f9fa;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid transparent;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-card.primary {
    border-left-color: #1f8dee;
}

.stats-card.success {
    border-left-color: #28a745;
}

.stats-card.warning {
    border-left-color: #ffc107;
}

.stats-card.danger {
    border-left-color: #dc3545;
}

.stats-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.stats-card.primary .icon {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
}

.stats-card.success .icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-card.warning .icon {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.stats-card.danger .icon {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.stats-card p {
    margin: 5px 0 0 0;
    color: #666;
    font-weight: 500;
}

.welcome-section {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.recent-activities {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.recent-activities h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.activity-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    font-size: 0.9rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #333;
    margin: 0;
}

.activity-time {
    font-size: 0.85rem;
    color: #666;
    margin: 2px 0 0 0;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #162f4a, #213f6b);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form Styles */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
}

.input-group .form-control {
    border-right: none;
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(30, 58, 95, 0.05);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #e9ecef;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 10rem;
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-info {
    background-color: var(--info-color);
}

.badge-secondary {
    background-color: #6c757d;
}

/* Pagination Styles */
.pagination {
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Sidebar Styles */
.sidebar {
    background: white;
    min-height: calc(100vh - 70px);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
}

.sidebar .nav-link i {
    margin-left: 10px;
    width: 20px;
}

.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.btn-quick-action {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dashboard-page .btn-primary {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
}

.dashboard-page .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.dashboard-page .btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

/* ==========================================================================
   LOGIN PAGE STYLES (Moved from auth/login.php)
   ========================================================================== */

.login-page body {
    font-family: 'Khalid Art', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #1f8dee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: linear-gradient(135deg, #FFFFFF, #1f8dee);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body {
    padding: 30px;
    direction: rtl;
    text-align: right;
}

.login-page .form-group {
    margin-bottom: 20px;
}

.login-page .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.login-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: right;
}

.login-page .form-control:focus {
    border-color: #1f8dee;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.login-page .input-group {
    direction: rtl;
}

.login-page .input-group .form-control {
    text-align: right;
}

.login-page .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
    order: -1;
}

.btn-login {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 500;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.login-page .alert {
    border: none;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
}

.login-page .alert-danger {
    background: #fee;
    color: #dc3545;
    border-right: 4px solid #dc3545;
}

.login-page .alert-warning {
    background: #fff3cd;
    color: #856404;
    border-right: 4px solid #ffc107;
}

.login-footer {
    text-align: center;
    padding: 20px 30px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.9rem;
    direction: rtl;
}

.welcome-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#1f8dee, #1f8dee);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 3s ease-in-out forwards;
}

.welcome-text {
    color: white;
    text-align: center;
    animation: slideIn 1.5s ease-out;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.welcome-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.info-animate {
    animation: infoSlideIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) 3s both;
}

@keyframes infoSlideIn {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes slideIn {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.login-container {
    animation: slideInUp 0.5s ease-out 3s both;
}

@keyframes slideInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Dashboard Page Styles */
.dashboard-page body {
    font-family: 'Khalid Art', sans-serif;
    background: #f8f9fa;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid transparent;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-card.primary {
    border-left-color: #1f8dee;
}

.stats-card.success {
    border-left-color: #28a745;
}

.stats-card.warning {
    border-left-color: #ffc107;
}

.stats-card.danger {
    border-left-color: #dc3545;
}

.stats-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.stats-card.primary .icon {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
}

.stats-card.success .icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-card.warning .icon {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.stats-card.danger .icon {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.stats-card p {
    margin: 5px 0 0 0;
    color: #666;
    font-weight: 500;
}

.welcome-section {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.recent-activities {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.recent-activities h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.activity-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    font-size: 0.9rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #333;
    margin: 0;
}

.activity-time {
    font-size: 0.85rem;
    color: #666;
    margin: 2px 0 0 0;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #162f4a, #213f6b);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form Styles */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
}

.input-group .form-control {
    border-right: none;
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(30, 58, 95, 0.05);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #e9ecef;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 10rem;
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-info {
    background-color: var(--info-color);
}

.badge-secondary {
    background-color: #6c757d;
}

/* Pagination Styles */
.pagination {
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Sidebar Styles */
.sidebar {
    background: white;
    min-height: calc(100vh - 70px);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
}

.sidebar .nav-link i {
    margin-left: 10px;
    width: 20px;
}

.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.btn-quick-action {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dashboard-page .btn-primary {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    color: white;
}

.dashboard-page .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.dashboard-page .btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

/* ==========================================================================
   LOGIN PAGE STYLES (Moved from auth/login.php)
   ========================================================================== */

.login-page body {
    font-family: 'Khalid Art', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #1f8dee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: linear-gradient(135deg, #FFFFFF, #1f8dee);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body {
    padding: 30px;
    direction: rtl;
    text-align: right;
}

.login-page .form-group {
    margin-bottom: 20px;
}

.login-page .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.login-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: right;
}

.login-page .form-control:focus {
    border-color: #1f8dee;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
}

.login-page .input-group {
    direction: rtl;
}

.login-page .input-group .form-control {
    text-align: right;
}

.login-page .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
    order: -1;
}

.btn-login {
    background: linear-gradient(135deg, #1f8dee, #1f8dee);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 500;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.login-page .alert {
    border: none;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
}

.login-page .alert-danger {
    background: #fee;
    color: #dc3545;
    border-right: 4px solid #dc3545;
}

.login-page .alert-warning {
    background: #fff3cd;
    color: #856404;
    border-right: 4px solid #ffc107;
}

.login-footer {
    text-align: center;
    padding: 20px 30px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.9rem;
    direction: rtl;
}

.welcome-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#1f8dee, #1f8dee);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 3s ease-in-out forwards;
}

.welcome-text {
    color: white;
    text-align: center;
    animation: slideIn 1.5s ease-out;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.welcome-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.info-animate {
    animation: infoSlideIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) 3s both;
}

@keyframes infoSlideIn {
    0% { transform: translateX(-60px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes slideIn {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.login-container {
    animation: slideInUp 0.5s ease-out 3s both;
}

@keyframes slideInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   NOTAM VIEW SPECIFIC STYLES (Moved from view files)
   ========================================================================== */

/* Map and General Styles from index.php */
#map {
    border-radius: 0.375rem;
}

.custom-marker {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.custom-marker i {
    font-size: 14px;
}

/* Global RTL support for Leaflet maps */
.leaflet-container {
    direction: ltr; /* Map controls should be LTR */
}

.leaflet-container .leaflet-popup {
    direction: rtl !important;
}

.notam-popup {
    font-family: 'Khalid Art', sans-serif;
    line-height: 1.3;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
    font-weight: bold;
    font-size: 13px;
    position: relative;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    direction: rtl !important;
    text-align: right;
}

.notam-popup.dragging {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    z-index: 9999;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transform: scale(1.02);
    transition: transform 0.1s ease;
}

.notam-popup:hover {
    cursor: grab;
    cursor: -webkit-grab;
}

/* Ensure Leaflet popup wrappers allow dragging visually */
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
    cursor: grab;
    cursor: -webkit-grab;
    pointer-events: auto;
    direction: rtl !important;
    text-align: right !important;
}

.leaflet-popup,
.leaflet-popup-tip,
.leaflet-container .leaflet-popup-content-wrapper {
    pointer-events: auto;
    touch-action: none;
    direction: rtl !important;
}

.dragging .leaflet-popup-content-wrapper,
.dragging .leaflet-popup-content {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

.notam-popup-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.1), rgba(44, 89, 130, 0.1));
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: grab;
    cursor: -webkit-grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}

.notam-popup-drag-handle:active,
.notam-popup-drag-handle:hover {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.2), rgba(44, 89, 130, 0.2));
}

.notam-popup-drag-handle::before {
    content: "⋮⋮⋮";
    color: rgba(30, 58, 95, 0.5);
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: bold;
}

.notam-popup-content {
    margin-top: 25px;
    padding: 8px;
}

/* Formal, table-like layout for NOTAM popup details */
.notam-popup-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 8px 0;
    background: #fff;
}
.notam-popup-table th,
.notam-popup-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: top;
    font-weight: 700;
}
.notam-popup-table th {
    color: #495057;
    width: 42%;
    text-align: right; /* RTL-friendly label alignment */
    white-space: nowrap;
}
.notam-popup-table td {
    color: #212529;
    font-weight: 800;
}
.notam-popup .popup-section-title {
    font-size: 12px;
    color: #6c757d;
    margin: 6px 0;
}
.notam-popup .popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Permit popup inherits NOTAM styles; tighten spacing slightly */
.permit-popup.notam-popup h6 {
    margin: 0 0 6px 0;
}

/* Formal list (non-table) layout for NOTAM popup details */
.notam-info {
    border: 2px solid #dee2e6; /* thicker, higher contrast */
    border-radius: 6px;
    background: #ffffff;
    overflow: visible; /* allow multi-line content to show fully */
    margin: 6px 0 8px;
}
.notam-row {
    display: grid; /* two columns: label | value */
    grid-template-columns: 42% 1fr;
    align-items: center;
    column-gap: 10px;
    padding: 8px 10px;
    border-bottom: 1.5px solid #dee2e6; /* thicker, higher contrast */
}
.notam-row:last-child { border-bottom: none; }
.notam-label {
    grid-column: 1;
    color: #495057;
    font-weight: 700;
    white-space: nowrap;
    text-align: right; /* RTL-friendly */
    border-left: 2px solid #dee2e6; /* vertical divider between columns */
    padding-left: 10px;
}
.notam-value {
    grid-column: 2;
    color: #212529;
    font-weight: 800;
    white-space: normal; /* allow wrapping */
    word-break: break-word; /* break long words if needed */
    overflow: visible;
}

/* Allow badges inside values to wrap; inline-block badges don't wrap by default */
.notam-value .badge {
    display: inline;
    white-space: normal;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .notam-row { padding: 10px 8px; grid-template-columns: 45% 1fr; }
    .notam-label, .notam-value { font-size: 16px; }
    /* Prevent overflow and ensure readability on phones */
    .notam-popup { max-width: 92vw; }
    .leaflet-popup-content { max-width: 92vw !important; }
    .notam-info { max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
/* Compact on small screens while keeping the table look */
@media (max-width: 768px) {
    .notam-popup-table th,
    .notam-popup-table td {
        padding: 8px 6px;
        font-size: 16px;
    }
    .notam-popup-table th { width: 48%; }
}

/* Aviation-style description popup modal */
.aviation-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.aviation-modal.show {
    display: block;
}

.aviation-modal-content {
    position: relative;
    background-color: #000000;
    border: 2px solid #00ff00;
    border-radius: 6px;
    margin: 10% auto;
    padding: 12px;
    width: 85%;
    max-width: 500px;
    max-height: 50vh;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.aviation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #00ff00;
}

.aviation-modal-title {
    color: #00ff00;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.aviation-close {
    color: #00ff00;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.aviation-close:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
    transform: scale(1.1);
}

.aviation-modal-body {
    color: #00ff00;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    letter-spacing: 0.3px;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.3);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.aviation-modal-info {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #00ff00;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
    font-weight: bold;
}

.aviation-info-item {
    display: flex;
    justify-content: space-between;
    color: #00ff00;
    font-weight: bold;
}

.aviation-info-label {
    color: #00ff00;
    opacity: 0.8;
    font-weight: bold;
}

.aviation-info-value {
    color: #ffffff;
    font-weight: bold;
}

/* Typing animation effect */
.aviation-typing {
    overflow: hidden;
    border-right: 2px solid #00ff00;
    animation: typing 2s steps(40) 1s both, blink 1s infinite;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Description click effect */
.description-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 4px;
    position: relative;
}

.description-clickable:hover {
    background-color: rgba(0, 255, 0, 0.1);
    color: #00ff00 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.2);
}

.description-clickable::after {
    content: "🔍";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.description-clickable:hover::after {
    opacity: 1;
}

/* Mobile aviation modal responsive */
@media (max-width: 768px) {
    .aviation-modal-content {
        width: 95%;
        max-height: 60vh;
        margin: 15% auto;
        padding: 10px;
        border-radius: 4px;
        -webkit-overflow-scrolling: touch;
    }
    
    .aviation-modal-header {
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .aviation-modal-title {
        font-size: 14px;
        font-weight: bold;
        letter-spacing: 0.3px;
    }
    
    .aviation-close {
        font-size: 20px;
        font-weight: bold;
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .aviation-modal-body {
        font-size: 13px;
        font-weight: bold;
        line-height: 1.3;
        letter-spacing: 0.2px;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .aviation-modal-info {
        grid-template-columns: 1fr;
        gap: 6px;
        font-size: 11px;
        font-weight: bold;
        margin-top: 8px;
        padding-top: 6px;
    }
    
    .aviation-info-item {
        flex-direction: column;
        gap: 2px;
        padding: 4px 6px;
        background-color: rgba(0, 255, 0, 0.05);
        border-left: 2px solid #00ff00;
        border-radius: 2px;
        font-weight: bold;
    }
    
    .aviation-info-label {
        font-size: 10px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.7;
    }
    
    .aviation-info-value {
        font-size: 12px;
        font-weight: bold;
        margin-top: 1px;
    }
    
    .aviation-modal-content::-webkit-scrollbar {
        width: 3px;
    }
    
    .aviation-modal-content::-webkit-scrollbar-track {
        background: rgba(0, 255, 0, 0.1);
    }
    
    .aviation-modal-content::-webkit-scrollbar-thumb {
        background: #00ff00;
        border-radius: 2px;
    }
}

/* Mobile-first responsive design for notam popup */
@media (max-width: 768px) {
    .notam-popup {
        min-width: 285px;
        max-width: 300px;
        font-size: 18px;
        padding: 14px;
        font-weight: 800;
        background: rgba(255, 255, 255, 0.99);
        backdrop-filter: blur(20px);
        border: 3px solid rgba(0, 123, 255, 0.4);
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    }
    
    .notam-popup h6 {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-weight: 900;
        color: #1f8dee;
        text-shadow: 0 2px 4px rgba(255,255,255,0.9);
        letter-spacing: 0.5px;
        border-bottom: 3px solid #e3f2fd;
    }
    
    .notam-popup p {
        margin-bottom: 8px;
        font-size: 18px;
        line-height: 1.5;
        font-weight: 800;
        color: #1a1a1a;
        text-shadow: 0 2px 3px rgba(255,255,255,0.8);
    }
    
    .notam-popup .badge {
        font-size: 15px;
        padding: 0.4em 0.8em;
        font-weight: 900;
        text-shadow: 0 1px 2px rgba(0,0,0,0.4);
        border: 2px solid rgba(255,255,255,0.4);
    }
    
    .notam-popup small {
        font-size: 17px;
        font-weight: 800;
        color: #333333;
        text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    }
    
    .notam-popup .row {
        font-size: 18px;
        font-weight: 800;
    }
    
    .popup-section {
        padding: 8px 0;
    }
    
    .popup-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .popup-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        border-bottom: 3px solid #f0f8ff;
        min-height: 32px;
        background: rgba(248, 252, 255, 0.6);
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .popup-item:last-child {
        border-bottom: none;
    }
    
    .popup-label {
        font-weight: 900;
        color: #1f8dee;
        flex: 0 0 45%;
        font-size: 18px;
        text-shadow: 0 2px 4px rgba(255,255,255,0.9);
        letter-spacing: 0.2px;
    }
    
    .popup-value {
        flex: 1;
        text-align: left;
        font-size: 18px;
        font-weight: 800;
        color: #1a1a1a;
        text-shadow: 0 2px 3px rgba(255,255,255,0.8);
    }
    
    /* Enhanced mobile map */
    #map {
        height: 75vh !important;
        min-height: 500px !important;
    }
    
    /* Mobile header enhancements */
    .card-header h5 {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .card-header h6 {
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Mobile button improvements */
    .btn-sm {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        font-weight: 600;
    }
    
    /* Mobile stats improvements */
    .stat-number {
        font-size: 1.1rem !important;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .stat-label {
        font-size: 0.8rem !important;
        font-weight: 600;
    }
    
    /* Mobile fullscreen button */
    #fullscreen-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #0d6efd;
        backdrop-filter: blur(5px);
    }
    
    #fullscreen-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
}

/* Desktop fullscreen button */
@media (min-width: 769px) {
    #fullscreen-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    #fullscreen-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    #fullscreen-hint {
        font-size: 0.85rem;
        padding: 0.25rem 0.75rem;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 20px;
        border: 1px solid rgba(0, 123, 255, 0.2);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

/* Tablet styles - Compact with bold text */
@media (min-width: 769px) and (max-width: 1024px) {
    .notam-popup {
        min-width: 280px;
        max-width: 300px;
        font-size: 13px;
        font-weight: bold;
    }
    
    .popup-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .popup-item {
        display: block;
        padding: 4px 0;
    }
    
    .popup-label {
        font-weight: 700;
        color: #495057;
        font-size: 13px;
        display: block;
        margin-bottom: 1px;
    }
    
    .popup-value {
        font-size: 13px;
        font-weight: bold;
    }
}

/* Desktop styles - Compact with bold text */
@media (min-width: 1025px) {
    .notam-popup {
        min-width: 300px;
        max-width: 350px;
        font-size: 13px;
        font-weight: bold;
    }
    
    .popup-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .popup-item {
        display: block;
        padding: 6px 0;
    }
    
    .popup-label {
        font-weight: 700;
        color: #495057;
        font-size: 13px;
        display: block;
        margin-bottom: 2px;
    }
    
    .popup-value {
        font-size: 13px;
        font-weight: bold;
    }
}

/* Enhanced popup text colors */
.notam-popup .text-primary {
    color: #0d6efd !important;
    font-weight: 500;
}

.notam-popup .text-info {
    color: #0dcaf0 !important;
    font-weight: 500;
}

.notam-popup .text-warning {
    color: #ffc107 !important;
    font-weight: 500;
}

.notam-popup .bg-outline-primary {
    background-color: transparent !important;
    border: 1px solid #0d6efd;
    color: #0d6efd !important;
}

/* Mobile-specific Leaflet popup styles - Enhanced visibility */
@media (max-width: 768px) {
    /* Allow vertical scroll inside popup on mobile (override global touch-action: none) */
    .leaflet-popup,
    .leaflet-container .leaflet-popup-content-wrapper {
        touch-action: pan-y !important;
    }
    
    .leaflet-popup-content-wrapper {
        border-radius: 12px !important;
        padding: 12px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        max-height: 75vh !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .leaflet-popup-content {
        margin: 14px !important;
        font-size: 18px !important;
        line-height: 1.6 !important;
        color: #1a1a1a !important;
        font-weight: 800 !important;
        text-shadow: 0 2px 4px rgba(255,255,255,0.9) !important;
        max-height: 65vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }
    
    .leaflet-popup-close-button {
        font-size: 20px !important;
        padding: 6px 10px !important;
        top: 6px !important;
        right: 6px !important;
        color: #495057 !important;
        font-weight: 700 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        text-align: center !important;
        line-height: 20px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    .leaflet-popup-tip {
        margin: -1px auto 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    /* Enhanced touch targets for mobile */
    .leaflet-popup .btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        touch-action: manipulation;
        font-weight: 600 !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .badge {
        padding: 0.4em 0.8em !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        text-shadow: none !important;
    }
    /* Ensure popup container itself doesn't overflow screen */
    .leaflet-popup {
        max-width: 92vw !important;
    }
}

/* Small mobile devices (375px and smaller) */
@media (max-width: 375px) {
    .notam-popup {
        min-width: 280px !important;
        max-width: 320px !important;
        font-size: 13px;
        padding: 0;
        margin: 3px;
        font-weight: 700;
    }
    
    .notam-popup-drag-handle {
        height: 20px;
    }
    
    .notam-popup-drag-handle::before {
        font-size: 10px;
    }
    
    .notam-popup-content {
        padding: 6px;
        margin-top: 20px;
    }
    
    .notam-popup h6 {
        font-size: 15px;
        margin-bottom: 4px;
        padding-bottom: 3px;
        line-height: 1.2;
    }
    
    .notam-popup p {
        font-size: 13px;
        margin-bottom: 3px;
        line-height: 1.3;
    }
    
    .notam-popup .badge {
        font-size: 11px;
        padding: 0.2em 0.4em;
    }
    
    .notam-popup small {
        font-size: 12px;
    }
    
    .leaflet-popup-content-wrapper {
        margin: 3px !important;
        padding: 0 !important;
    }
    
    .leaflet-popup-content {
        margin: 0 !important;
        max-width: 320px !important;
    }
    
    .notam-popup-table th,
    .notam-popup-table td {
        padding: 3px 4px;
        font-size: 12px;
    }
    
    .notam-row {
        padding: 4px 6px;
    }
    
    .notam-label, .notam-value {
        font-size: 12px;
    }
}

/* Very small mobile devices (320px and smaller) */
@media (max-width: 320px) {
    .notam-popup {
        min-width: 260px !important;
        max-width: 300px !important;
        font-size: 12px;
        padding: 0;
        margin: 2px;
        font-weight: 700;
    }
    
    .notam-popup-drag-handle {
        height: 18px;
    }
    
    .notam-popup-drag-handle::before {
        font-size: 9px;
    }
    
    .notam-popup-content {
        padding: 4px;
        margin-top: 18px;
    }
    
    .notam-popup h6 {
        font-size: 14px;
        margin-bottom: 3px;
        padding-bottom: 2px;
        line-height: 1.1;
    }
    
    .notam-popup p {
        font-size: 12px;
        margin-bottom: 2px;
        line-height: 1.2;
    }
    
    .notam-popup .badge {
        font-size: 10px;
        padding: 0.1em 0.3em;
    }
    
    .notam-popup small {
        font-size: 11px;
    }
    
    .leaflet-popup-content-wrapper {
        margin: 2px !important;
        padding: 0 !important;
    }
    
    .leaflet-popup-content {
        margin: 0 !important;
        max-width: 300px !important;
    }
    
    .notam-popup-table th,
    .notam-popup-table td {
        padding: 2px 3px;
        font-size: 11px;
    }
    
    .notam-row {
        padding: 3px 4px;
    }
    
    .notam-label, .notam-value {
        font-size: 11px;
    }
}

/* Very small phones: stack rows label over value for clarity */
@media (max-width: 380px) {
    .notam-row {
        grid-template-columns: 1fr;
        row-gap: 4px;
        padding: 8px 8px;
    }
    .notam-label {
        border-left: none;
        padding-left: 0;
        font-size: 15px;
    }
    .notam-value {
        font-size: 15px;
    }
}

/* Tablet-specific Leaflet popup styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .leaflet-popup-content-wrapper {
        border-radius: 6px !important;
        padding: 10px !important;
    }
    
    .leaflet-popup-content {
    margin: 8px !important;
    font-size: 14px !important;
    }
}

/* Desktop-specific Leaflet popup styles */
@media (min-width: 1025px) {
    .leaflet-popup-content-wrapper {
        border-radius: 6px !important;
        padding: 10px !important;
    }
    
    .leaflet-popup-content {
    margin: 8px !important;
    font-size: 13px !important;
    }

    /* Tone down popup text weight and spacing on larger screens */
    .notam-label { font-weight: 600; }
    .notam-value { font-weight: 700; }
    .notam-row { padding: 6px 8px; }
}

/* =====================================================
   FLIP CARD NOTAM STYLING
   True 3D flip card animation for NOTAM details
   ===================================================== */

.flip-card-container {
    perspective: 1000px;
    margin-bottom: 20px;
    min-height: 280px;
    position: relative;
}

/* When "عرض التفاصيل" is open, keep full-details panel above cards below */
.flip-card-container:has(.flip-card.flipped) {
    z-index: 999;
    min-height: 420px; /* fit flip-card-back so it isn't clipped by scroll container */
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    z-index: 2;
    overflow: hidden;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: #1f8dee;
    color: white;
    transform: rotateY(180deg);
    z-index: 3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Card Header */
.flip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    color: white;
}

.flip-card-header.back {
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.flip-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.flip-card-badges {
    display: flex;
    gap: 6px;
}

.flip-card-badges .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.flip-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.flip-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

/* Card Body */
.flip-card-body {
    padding: 14px 16px;
}

.flip-card-body.back {
    max-height: none;
    overflow-y: visible;
}

/* Scrollbar for flip-card-back */
.flip-card-back::-webkit-scrollbar {
    width: 6px;
}

.flip-card-back::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.flip-card-back::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.flip-card-back::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.flip-card-body.back::-webkit-scrollbar {
    width: 4px;
}

.flip-card-body.back::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.flip-card-preview {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 12px;
}

.flip-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flip-card-info .info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #475569;
}

.flip-card-info .info-row i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}

/* Back side detail sections */
.detail-section {
    margin-bottom: 14px;
}

.detail-section label,
.detail-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.detail-section p,
.detail-item p {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.detail-section .description-text {
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 100px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    white-space: pre-wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
    border-radius: 8px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item .coords {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #93c5fd;
}

/* Card Footer */
.flip-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.flip-card-footer.back {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.flip-btn.details {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    color: white;
}

.flip-btn.details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.flip-btn.map {
    flex: 0 0 auto;
    background: #f1f5f9;
    color: #475569;
    padding: 10px 14px;
}

.flip-btn.map:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.flip-btn.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.flip-btn.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.flip-card-footer.back .flip-btn.map {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.flip-card-footer.back .flip-btn.map:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* RTL Support */
[dir="rtl"] .flip-card.flipped {
    transform: rotateY(-180deg);
}

[dir="rtl"] .flip-card-back {
    transform: rotateY(-180deg);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .flip-card {
        min-height: 180px;
    }
    
    .flip-card-front,
    .flip-card-back {
        min-height: 180px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .flip-card-footer {
        flex-wrap: wrap;
    }
    
    .flip-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* =====================================================
   POPUP FLIP CARD - Map marker popup flip animation
   ===================================================== */

.popup-flip-container {
    position: relative;
    width: 300px;
    min-height: 350px;
    perspective: 1000px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.popup-flip-front,
.popup-flip-back {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    overflow: hidden;
}

.popup-flip-front {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.popup-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #1f8dee;
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
    color: white;
    transform: rotateY(180deg);
    overflow-y: auto;
    max-height: 350px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.popup-flip-container.flipped .popup-flip-front {
    transform: rotateY(-180deg);
}

.popup-flip-container.flipped .popup-flip-back {
    transform: rotateY(0deg);
}

/* Popup Header */
.popup-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    color: white;
    direction: rtl;
    text-align: right;
}

.popup-header.back {
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-title {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    direction: rtl;
}

.popup-title i {
    font-size: 1rem;
}

.popup-close-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.6);
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.popup-close-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: #ffffff;
}

.popup-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

/* Popup Summary (Front) */
.popup-summary {
    padding: 12px;
}

.popup-info-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.85rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    direction: rtl;
    text-align: right;
}

.popup-info-row:last-child {
    border-bottom: none;
}

.popup-info-row i {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
}

/* Popup Details (Back) */
.popup-details {
    padding: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.popup-details::-webkit-scrollbar {
    width: 4px;
}

.popup-details::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.popup-detail-section {
    margin-bottom: 12px;
}

.popup-detail-section label,
.popup-detail-item label {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 3px;
    direction: rtl !important;
    text-align: right;
}

.popup-detail-section p,
.popup-detail-item p {
    font-size: 0.8rem;
    margin: 0;
    font-weight: 500;
    unicode-bidi: plaintext;
    text-align: start;
    direction: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}

.popup-detail-section.description p {
    font-size: 0.75rem;
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    white-space: pre-wrap;
}

.popup-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    direction: rtl !important;
    text-align: right;
}

.popup-detail-item.full-width {
    grid-column: 1 / -1;
}

.popup-detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 6px;
    direction: rtl;
    text-align: right;
}

/* Auto direction for text content based on language */
.popup-detail-item p,
.popup-detail-item span:not(.icon),
.permit-info-value {
    unicode-bidi: plaintext;
    text-align: start;
}

/* For English/mixed content - auto direction */
.popup-detail-item p.ltr,
.popup-detail-item .coords-mono {
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
}

.popup-detail-item.full {
    grid-column: 1 / -1;
}

.popup-detail-item .coords-mono {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.75rem;
    color: #93c5fd;
}

.popup-detail-item .coords-dms {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Popup Flip Button */
.popup-flip-btn {
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: none;
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    direction: rtl;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.popup-flip-btn:hover {
    background: linear-gradient(135deg, #1f8dee 0%, #1e40af 100%);
}

.popup-flip-btn.back {
    background: rgba(255, 255, 255, 0.2);
}

.popup-flip-btn.back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Back footer - stays at bottom with flexbox */
.popup-back-footer {
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    flex-shrink: 0;
}

.popup-back-footer .popup-flip-btn {
    border-radius: 0;
    margin: 0;
}

/* Override Leaflet popup styles for flip card */
.leaflet-popup-content-wrapper:has(.popup-flip-container) {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    direction: rtl !important;
}

.leaflet-popup-content:has(.popup-flip-container) {
    margin: 0 !important;
    padding: 0 !important;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    height: auto !important;
    background: transparent !important;
    direction: rtl !important;
    text-align: right !important;
}

.leaflet-popup-content .popup-flip-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    direction: rtl !important;
}

/* RTL support for permit popup container */
.leaflet-popup-content-wrapper:has(.permit-popup-container) {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    direction: rtl !important;
}

.leaflet-popup-content:has(.permit-popup-container) {
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Ensure notam-popup matches flip container width */
.leaflet-popup-content .notam-popup,
.leaflet-popup-content-wrapper .notam-popup {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Front side details grid */
.popup-details-front {
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    flex: 1;
    overflow-y: auto;
    direction: rtl !important;
    text-align: right;
}

.popup-details-front .popup-detail-grid {
    background: transparent;
    direction: rtl !important;
}

.popup-details-front .popup-detail-item {
    background: white;
    border: 1px solid #e2e8f0;
    direction: rtl;
    text-align: right;
}

.popup-details-front .popup-detail-item label {
    color: #64748b;
    flex-direction: row-reverse;
    justify-content: flex-end;
    direction: rtl;
}

.popup-details-front .popup-detail-item p {
    color: #1e293b;
    unicode-bidi: plaintext;
    text-align: start;
}

/* Front side button at bottom */
.popup-flip-front > .popup-flip-btn {
    margin-top: auto;
    flex-shrink: 0;
    border-radius: 0 0 10px 10px;
}

/* Raw NOTAM Code Container */
.popup-code-container {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
}

.popup-code-container::-webkit-scrollbar {
    width: 4px;
}

.popup-code-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.notam-raw-code {
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Khalid Art', 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    unicode-bidi: plaintext;
    border: 1px solid rgba(255, 255, 255, 0.15);
    direction: ltr;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* RTL Support for popup */
[dir="rtl"] .popup-flip-container.flipped .popup-flip-front {
    transform: rotateY(180deg);
}

[dir="rtl"] .popup-flip-container.flipped .popup-flip-back {
    transform: rotateY(0deg);
}

[dir="rtl"] .popup-flip-back {
    transform: rotateY(-180deg);
}

/* =====================================================
   POPUP FLIP CARD - MOBILE RESPONSIVE
   ===================================================== */

/* Tablets */
@media (max-width: 768px) {
    .popup-flip-container {
        width: 280px;
        min-height: 380px;
    }
    
    .leaflet-popup-content:has(.popup-flip-container) {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }
    
    .leaflet-popup-content .notam-popup,
    .leaflet-popup-content-wrapper .notam-popup {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }
    
    .popup-header {
        padding: 10px 12px;
    }
    
    .popup-header .popup-title {
        font-size: 0.9rem;
    }
    
    .popup-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .popup-detail-item {
        padding: 8px;
    }
    
    .popup-detail-item label {
        font-size: 0.65rem;
    }
    
    .popup-detail-item p {
        font-size: 0.8rem;
    }
    
    .popup-flip-btn {
        padding: 12px;
        font-size: 0.85rem;
        min-height: 44px; /* Touch-friendly */
    }
    
    .notam-raw-code {
        font-size: 0.78rem;
        line-height: 1.6;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .popup-flip-container {
        width: 260px;
        min-height: 400px;
    }
    
    .leaflet-popup-content:has(.popup-flip-container) {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }
    
    .leaflet-popup-content .notam-popup,
    .leaflet-popup-content-wrapper .notam-popup {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }
    
    .popup-header {
        padding: 8px 10px;
    }
    
    .popup-header .popup-title {
        font-size: 0.8rem;
        max-width: 65%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .popup-header .popup-title i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .popup-header .badge {
        font-size: 0.65rem;
        padding: 3px 6px;
        max-width: 30%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }
    
    .popup-details-front {
        padding: 8px;
    }
    
    .popup-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    
    .popup-detail-item {
        padding: 6px;
    }
    
    .popup-detail-item label {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }
    
    .popup-detail-item label i {
        font-size: 0.65rem;
    }
    
    .popup-detail-item p {
        font-size: 0.75rem;
    }
    
    .popup-detail-item.full {
        grid-column: span 2;
    }
    
    .popup-flip-btn {
        padding: 14px;
        font-size: 0.9rem;
        min-height: 48px;
        font-weight: 600;
    }
    
    .popup-code-container {
        padding: 8px;
    }
    
    .notam-raw-code {
        font-size: 0.75rem;
        padding: 10px;
        line-height: 1.5;
    }
    
    .popup-back-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .popup-flip-container {
        width: 240px;
        min-height: 420px;
    }
    
    .leaflet-popup-content:has(.popup-flip-container) {
        width: 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
    }
    
    .leaflet-popup-content .notam-popup,
    .leaflet-popup-content-wrapper .notam-popup {
        width: 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
    }
    
    .popup-detail-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .popup-detail-item.full {
        grid-column: span 1;
    }
    
    .popup-detail-item label {
        font-size: 0.55rem;
    }
    
    .popup-detail-item p {
        font-size: 0.7rem;
    }
    
    .notam-raw-code {
        font-size: 0.7rem;
    }
}

/* =====================================================
   NOTAM DETAILS BUTTON STYLING
   ===================================================== */

.details-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 2px solid #1f8dee !important;
    color: #1f8dee !important;
    cursor: pointer;
    white-space: nowrap;
}

.details-btn:hover {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
}

.details-btn:active {
    transform: translateY(0);
}

.details-btn i {
    font-size: 0.75rem;
}

/* Popup details button */
.notam-popup .details-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* =====================================================
   MODERN NOTAM DETAILS MODAL - FLIP CARD STYLE
   Beautiful, professional popup for NOTAM details
   ===================================================== */

.notam-details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(44, 82, 130, 0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    pointer-events: none; /* Don't capture clicks when hidden */
}

.notam-details-overlay.show {
    display: flex;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.notam-details-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-15deg) scale(0.9);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notam-details-overlay.show .notam-details-card {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    opacity: 1;
}

/* Card Header */
.notam-card-header {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.notam-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.notam-card-badge {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.notam-card-badge i {
    font-size: 24px;
    color: #1f8dee;
}

.notam-card-title-section {
    flex: 1;
    min-width: 0;
}

.notam-card-id {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.notam-card-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.notam-card-status.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.notam-card-status.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.notam-card-status.expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.notam-card-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.notam-card-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Card Body */
.notam-card-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.notam-card-body::-webkit-scrollbar {
    width: 6px;
}

.notam-card-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.notam-card-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1f8dee, #1f8dee);
    border-radius: 3px;
}

/* Description Section */
.notam-section {
    margin-bottom: 20px;
}

.notam-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.notam-section-header i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.notam-section-header span {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.notam-description-content {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* Info Grid */
.notam-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.notam-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.notam-info-item:hover {
    border-color: #1f8dee;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.notam-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notam-info-icon i {
    font-size: 16px;
    color: white;
}

.notam-info-icon.location {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notam-info-icon.start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notam-info-icon.end {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notam-info-icon.coords {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
}

.notam-info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.notam-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notam-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

.coords-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Footer */
.notam-card-footer {
    padding: 20px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.notam-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.notam-action-btn.primary {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.notam-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.notam-action-btn.secondary {
    background: #ffffff;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.notam-action-btn.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* Flip Animation Keyframes */
@keyframes flipIn {
    0% {
        transform: perspective(1000px) rotateY(-15deg) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: perspective(1000px) rotateY(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes flipOut {
    0% {
        transform: perspective(1000px) rotateY(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: perspective(1000px) rotateY(15deg) scale(0.9);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .notam-details-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    
    .notam-details-card {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
    }
    
    .notam-card-header {
        padding: 16px 20px;
    }
    
    .notam-card-badge {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .notam-card-badge i {
        font-size: 20px;
    }
    
    .notam-card-id {
        font-size: 1.2rem;
    }
    
    .notam-card-body {
        padding: 16px;
    }
    
    .notam-info-grid {
        grid-template-columns: 1fr;
    }
    
    .notam-card-footer {
        padding: 16px;
        flex-direction: column;
    }
    
    .notam-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notam-details-card {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    }
    
    .notam-section-header span {
        color: #f1f5f9;
    }
    
    .notam-description-content {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: #e2e8f0;
        border-color: #475569;
    }
    
    .notam-info-item {
        background: #1e293b;
        border-color: #475569;
    }
    
    .notam-info-label {
        color: #94a3b8;
    }
    
    .notam-info-value {
        color: #f1f5f9;
    }
    
    .notam-card-footer {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        border-color: #475569;
    }
    
    .notam-action-btn.secondary {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }
}

/* =====================================================
   DASHBOARD ACTIVITY ACTIONS FIX
   ===================================================== */

.activity-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    flex-shrink: 0;
}

.activity-actions .btn {
    white-space: nowrap;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activity-actions .btn:hover {
    background: var(--primary-color);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.activity-meta {
    margin: 0;
}

/* Ensure btn-outline-primary has visible text on hover */
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #fff !important;
}

/* =====================================================
   NOTAMS LIST SECTION UI IMPROVEMENTS
   ===================================================== */

/* Stats Summary Cards */
#notams-stats .stat-item {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 12px 8px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

#notams-stats .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
}

#notams-stats .col-3:nth-child(1) .stat-item::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

#notams-stats .col-3:nth-child(2) .stat-item::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

#notams-stats .col-3:nth-child(3) .stat-item::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

#notams-stats .col-3:nth-child(4) .stat-item::before {
    background: linear-gradient(90deg, #1f8dee, #1f8dee);
}

#notams-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#notams-stats .stat-number {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

#notams-stats .stat-label {
    font-size: 0.75rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Tab Buttons */
#caa-notams-tab,
#rafo-notams-tab,
#permits-tab {
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#caa-notams-tab {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    border-color: #1f8dee;
}

#caa-notams-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

#rafo-notams-tab {
    background: transparent;
    border-color: #1f8dee;
    color: #1f8dee;
}

#rafo-notams-tab:hover,
#rafo-notams-tab.active {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

#permits-tab {
    background: transparent;
    border-color: #10b981;
    color: #10b981;
}

#permits-tab:hover,
#permits-tab.active {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

#caa-notams-tab .badge,
#rafo-notams-tab .badge,
#permits-tab .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 700;
}

/* NOTAMs Sections Container */
.notams-section {
    animation: fadeIn 0.3s ease-out;
}

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

/* Card View Container */
.notams-card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Loading State */
#loading-caa-notams,
#loading-rafo-notams,
#loading-permits {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 40px 20px;
    margin: 16px;
}

#loading-caa-notams .spinner-border,
#loading-rafo-notams .spinner-border,
#loading-permits .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

/* Empty State */
.notams-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    margin: 16px;
}

.notams-empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.notams-empty-state h5 {
    color: #64748b;
    font-weight: 700;
    margin-bottom: 12px;
}

.notams-empty-state p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Scrollbar for NOTAMs list container */
#notams-list-content .card-body:last-child {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#notams-list-content .card-body:last-child::-webkit-scrollbar {
    width: 8px;
}

#notams-list-content .card-body:last-child::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#notams-list-content .card-body:last-child::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8, #cbd5e1);
    border-radius: 4px;
}

#notams-list-content .card-body:last-child::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #64748b, #94a3b8);
}

/* Card Header Gradient */
#notams-list-card > .card-header {
    background: linear-gradient(135deg, #1f8dee 0%, #1f8dee 100%) !important;
    border-bottom: 3px solid #ffd700;
}

#notams-list-card > .card-header h6 {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Expanded NOTAMs List Card */
#notams-list-card.expanded {
    position: relative;
    z-index: 100;
    animation: expandCard 0.3s ease-out;
}

#notams-list-card.expanded > .card-header {
    background: linear-gradient(135deg, #0f2942 0%, #1f8dee 100%) !important;
    border-bottom: 3px solid #ffd700;
}

@keyframes expandCard {
    from {
        opacity: 0.8;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Refresh and View Mode Buttons */
#notams-list-card .btn-outline-light {
    border-radius: 8px;
    transition: all 0.3s ease;
}

#notams-list-card .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notams-card-view {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px !important;
    }
    
    /* Hide NOTAMs list card on small mobile screens */
    #notams-list-card {
        display: none !important;
    }
    
    #notams-stats .stat-number {
        font-size: 1.2rem !important;
    }
    
    #caa-notams-tab,
    #rafo-notams-tab,
    #permits-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Map container mobile */
    #map-container-card {
        margin-bottom: 16px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    #map {
        height: 55vh !important;
        min-height: 320px !important;
    }
    
    /* Page header mobile */
    #page-header-card .card-header {
        padding: 10px 12px;
    }
    
    #page-header-card .card-header h5 {
        font-size: 0.95rem;
    }
    
    #page-header-card .btn-sm {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* NOTAMs list card header mobile */
    #notams-list-card .card-header {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    #notams-list-card .card-header h6 {
        font-size: 0.9rem;
    }
    
    #notams-list-card .card-header .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* Stats section mobile */
    #notams-stats {
        flex-wrap: wrap;
        gap: 8px !important;
    }
    
    #notams-stats .stat-item {
        min-width: 70px;
        padding: 8px 10px !important;
    }
    
    #notams-stats .stat-label {
        font-size: 0.65rem !important;
    }
    
    /* Tabs mobile */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Flip cards mobile */
    .flip-card-container {
        min-height: 220px;
        margin-bottom: 15px;
    }
    
    .flip-card-front,
    .flip-card-back {
        padding: 12px;
    }
    
    .flip-card-front h5,
    .flip-card-back h5 {
        font-size: 0.9rem;
    }
    
    .flip-card-front .badge,
    .flip-card-back .badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .flip-card-back {
        max-height: 350px;
    }
    
    /* Empty state mobile */
    .notams-empty-state {
        padding: 30px 15px;
    }
    
    .notams-empty-state i {
        font-size: 2.5rem !important;
    }
    
    .notams-empty-state h5 {
        font-size: 1rem;
    }
    
    /* Expand button mobile */
    #expand-notams-btn {
        padding: 4px 8px;
    }
    
    /* Buttons in flip cards mobile */
    .flip-card-back .btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #map {
        height: 50vh !important;
        min-height: 280px !important;
    }
    
    .flip-card-container {
        min-height: 200px;
    }
    
    #notams-stats .stat-item {
        min-width: 60px;
        padding: 6px 8px !important;
    }
    
    #notams-stats .stat-number {
        font-size: 1rem !important;
    }
    
    #notams-stats .stat-label {
        font-size: 0.6rem !important;
    }
    
    #caa-notams-tab,
    #rafo-notams-tab,
    #permits-tab {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .flip-card-front h5,
    .flip-card-back h5 {
        font-size: 0.85rem;
    }
    
    .flip-card-front p,
    .flip-card-back p {
        font-size: 0.75rem;
    }
    
    /* Card header buttons stack on very small screens */
    #notams-list-card .card-header .d-flex {
        flex-wrap: wrap;
        gap: 5px;
    }
}