/* ASL Airlines France - Flight Safety Dashboard Styles */

:root {
    --primary: #004B93;
    --primary-dark: #003670;
    --secondary: #E6EEF5;
    --accent: #86D0F4;
    --success: #2e7d32;
    --warning: #ed6c02;
    --error: #d32f2f;
    --background: #F5F7FA;
    --white: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.landing-header .logo {
    height: 50px;
}

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero .btn-primary {
    background-color: var(--white);
    color: var(--primary);
    font-size: 1.1rem;
    padding: 16px 32px;
}

.hero .btn-primary:hover {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.landing-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 200px;
    background-color: var(--primary);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    width: 0;
}

.sidebar-logo img {
    height: 38px;
    filter: brightness(0) invert(1);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-nav {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Logout button at bottom of sidebar */
.nav-section-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.nav-section-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

.nav-section-bottom a:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-icon {
    flex-shrink: 0;
}

.nav-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 12px;
}

/* Submenu styles */
.nav-section {
    margin-bottom: 5px;
}

.nav-parent {
    cursor: pointer;
}

.nav-submenu {
    margin-left: 32px;
}

.nav-submenu a {
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: 300;
    opacity: 0.85;
}

.nav-submenu a.active,
.nav-submenu a:hover {
    opacity: 1;
    font-weight: 400;
}

.sidebar.collapsed .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-parent {
    justify-content: center;
    cursor: pointer;
}

.main-content {
    flex: 1;
    margin-left: 200px;
    width: calc(100% - 200px);
    background-color: var(--secondary);
    transition: margin-left 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-collapsed .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

.dashboard-header {
    background-color: var(--white);
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 12px;
    background-color: #E3F2FD;
    color: var(--primary);
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
}

.tag-remove:hover {
    background-color: var(--primary);
    color: white;
}

/* Breadcrumb Navigation */
/* Breadcrumb as title (Event Analysis dashboard) */
.breadcrumb-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.breadcrumb-title a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-title a:hover {
    text-decoration: underline;
}

.breadcrumb-title .separator {
    color: #999;
    font-weight: 400;
}

.breadcrumb-title .current {
    color: var(--text);
    font-weight: 600;
}

/* Legacy breadcrumb (if still used elsewhere) */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 4px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #999;
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
}

.header-title-section {
    display: flex;
    flex-direction: column;
}

.header-title-section h1 {
    margin: 0;
}

/* Header Actions (toggle + fullscreen) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Severity Pills in Header */
.severity-pills {
    display: flex;
    gap: 6px;
    margin-right: 100px;
}

.severity-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.severity-pill.caution {
    background: rgba(249, 168, 37, 0.15);
    color: #b77a00;
}
.severity-pill.caution:hover {
    background: rgba(249, 168, 37, 0.3);
}
.severity-pill.caution.selected {
    background: #f9a825;
    color: white;
}

.severity-pill.warning {
    background: rgba(240, 96, 0, 0.15);
    color: #c04d00;
}
.severity-pill.warning:hover {
    background: rgba(240, 96, 0, 0.3);
}
.severity-pill.warning.selected {
    background: #F06000;
    color: white;
}

.severity-pill.alert {
    background: rgba(198, 40, 40, 0.15);
    color: #a01e1e;
}
.severity-pill.alert:hover {
    background: rgba(198, 40, 40, 0.3);
}
.severity-pill.alert.selected {
    background: #c62828;
    color: white;
}

.severity-pill.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.severity-label {
    font-weight: 500;
}

.severity-value {
    font-weight: 700;
    min-width: 2.5em;
    text-align: right;
    display: inline-block;
}

/* Metric Toggle (Count/Ratio) */
.metric-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.metric-toggle .toggle-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--white);
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.metric-toggle .toggle-btn:first-child {
    border-right: 1px solid var(--border);
}

.metric-toggle .toggle-btn.active {
    background: var(--primary);
    color: var(--white);
}

.metric-toggle .toggle-btn:hover:not(.active) {
    background: var(--secondary);
}

/* Airport Type Pills (Takeoff/Landing) - selectable pills for chart headers */
.airport-type-pills {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 8px;
}

.airport-pill {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.airport-pill:hover:not(.selected) {
    background: var(--secondary);
    border-color: var(--primary);
}

.airport-pill.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Fullscreen button */
.btn-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-fullscreen:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Data table button */
.btn-data-table {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-data-table:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Anonymize pilots button */
.btn-anonymize {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-anonymize:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-anonymize.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Print button */
.btn-print {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-print:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 40px;
}

.dashboard-header h1 {
    font-size: 1.25rem;
    color: var(--text);
    margin: 0;
}

.header-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.date-range-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    width: 340px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range-text .date-label {
    color: var(--text-light);
    font-weight: 400;
}

.date-range-text .date-value {
    font-weight: 700;
    font-size: 1rem;
}

/* Clickable date values */
.date-picker-trigger {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.date-picker-trigger:hover {
    background-color: rgba(0, 75, 147, 0.1);
}

/* Hidden date inputs for Flatpickr */
.hidden-date-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Ensure Flatpickr calendar doesn't affect layout */
.header-slider-container .flatpickr-calendar {
    position: absolute;
}

/* Flatpickr theme customization to match ASL design */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.flatpickr-day:hover {
    background: rgba(0, 75, 147, 0.1);
}

.flatpickr-months .flatpickr-month {
    background: var(--primary);
    color: white;
    border-radius: 8px 8px 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    color: #393939;
    background: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='none' stroke='%236d6d6d' stroke-width='1.5' d='M1 1l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.flatpickr-current-month input.cur-year {
    color: white;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Year dropdown in header - match month dropdown exactly */
.flatpickr-current-month .flatpickr-year-dropdown {
    color: #393939;
    font-weight: inherit;
    font-size: inherit;
    font-family: inherit;
    background: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='none' stroke='%236d6d6d' stroke-width='1.5' d='M1 1l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 14px;
    border: none;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.flatpickr-current-month .flatpickr-year-dropdown:hover {
    background: rgba(0, 0, 0, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='none' stroke='%236d6d6d' stroke-width='1.5' d='M1 1l3 3 3-3'/%3E%3C/svg%3E") no-repeat right center;
}

/* Hide the numInputWrapper background that shows through */
.flatpickr-current-month .numInputWrapper {
    background: transparent;
}

.flatpickr-current-month .numInputWrapper:hover {
    background: transparent;
}

.flatpickr-current-month .flatpickr-year-dropdown:focus {
    outline: none;
}

.flatpickr-weekday {
    color: var(--primary);
    font-weight: 600;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: white;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: rgba(255, 255, 255, 0.8);
}

/* Hide the up/down arrows on year input */
.flatpickr-current-month .numInputWrapper span {
    display: none;
}

/* Year dropdown options (when open) */
.flatpickr-year-dropdown option {
    background: #f5f5f5;
    color: #393939;
    padding: 8px 20px;
    text-indent: 8px;
}

.flatpickr-year-dropdown option:checked,
.flatpickr-year-dropdown option:hover {
    background: var(--primary);
    color: white;
}

.dashboard-body {
    padding: 12px 24px 12px 24px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Report page content */
.report-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* PDF Loading State */
.pdf-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-light);
}

.pdf-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* PDF Error State */
.pdf-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-light);
}

.pdf-error span {
    font-size: 1rem;
    color: #c62828;
}

/* PDF Viewer */
#pdf-viewer {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: none;
}

/* Event Analysis Dashboard Grid: 3 columns, map spans 2 rows */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.dashboard-grid > .chart-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dashboard-grid > .chart-card .chart-container {
    flex: 1;
    min-height: 0;
}

/* Bottom charts wrapper: spans 2 columns, contains 3 equal sub-columns */
.bottom-charts-wrapper {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    min-height: 0;
}

.bottom-charts-wrapper .chart-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.bottom-charts-wrapper .chart-container {
    flex: 1;
    min-height: 0;
}

/* No-airport layout: when relevant_airport is 'none', hide airport chart and map */
/* Time chart spans full width in row 1, bottom charts get full width in row 2 */
.dashboard-grid.no-airport-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.dashboard-grid.no-airport-layout > .chart-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dashboard-grid.no-airport-layout > .chart-card .chart-container {
    flex: 1;
    min-height: 0;
}

/* Bottom charts wrapper in no-airport mode: full width with 3 equal columns */
.dashboard-grid.no-airport-layout .bottom-charts-wrapper {
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    min-height: 0;
}

/* Date Range Section */
.date-range-section {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.date-range-display {
    text-align: center;
    margin-bottom: 12px;
}

.date-range-display span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* Date Preset Buttons */
.date-preset-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.date-preset-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.date-preset-btn:hover {
    background: var(--primary);
    color: white;
}

.date-preset-btn.selected {
    background: var(--primary);
    color: white;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.kpi-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.kpi-card h3 {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.kpi-card.info {
    border-left-color: #616161;
}

.kpi-card.info .value {
    color: #616161;
}

.kpi-card.caution {
    border-left-color: #f9a825;
}

.kpi-card.caution .value {
    color: #f9a825;
}

.kpi-card.warning {
    border-left-color: #F06000;
}

.kpi-card.warning .value {
    color: #F06000;
}

.kpi-card.alert {
    border-left-color: #c62828;
}

.kpi-card.alert .value {
    color: #c62828;
}

.kpi-card.mixed {
    border-left-color: #9080B0;
}

.kpi-card.mixed .value {
    color: #9080B0;
}

/* Clickable KPI cards */
.kpi-card.clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-card.clickable.selected {
    box-shadow: 0 0 0 2px var(--primary), var(--shadow);
}

.kpi-card.caution.selected {
    box-shadow: 0 0 0 2px #f9a825, var(--shadow);
}

.kpi-card.warning.selected {
    box-shadow: 0 0 0 2px #F06000, var(--shadow);
}

.kpi-card.alert.selected {
    box-shadow: 0 0 0 2px #c62828, var(--shadow);
}

.kpi-card.mixed.selected {
    box-shadow: 0 0 0 2px #9080B0, var(--shadow);
}

/* Top Charts Row: Time + Airport (2 equal columns) */
.top-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.top-charts-row .chart-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.top-charts-row .chart-container {
    flex: 1;
    min-height: 0;
}

.map-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    grid-row: span 2;
    min-height: 0;
    position: relative;
}

.map-card h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
}

#goAroundMap, #eventMap {
    flex: 1;
    min-height: 0;
    border-radius: 6px;
    z-index: 1;
}

/* Leaflet tooltip styling to match Chart.js tooltip */
.leaflet-tooltip.airport-tooltip {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.leaflet-tooltip.airport-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.8) !important;
}

.leaflet-tooltip.airport-tooltip.leaflet-tooltip-bottom::before {
    border-bottom-color: rgba(0, 0, 0, 0.8) !important;
}

.leaflet-tooltip.airport-tooltip.leaflet-tooltip-left::before {
    border-left-color: rgba(0, 0, 0, 0.8) !important;
}

.leaflet-tooltip.airport-tooltip.leaflet-tooltip-right::before {
    border-right-color: rgba(0, 0, 0, 0.8) !important;
}

.airport-tooltip .tooltip-title {
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 13px;
}

.airport-tooltip .tooltip-body {
    display: flex;
    align-items: center;
    gap: 8px;
}

.airport-tooltip .tooltip-color-box {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.airport-tooltip .tooltip-footer {
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Bottom row: Pilots + Aircraft Type (3 equal columns) */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
    flex: 1;
    min-height: 0;
}

.bottom-row .chart-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* Pilot charts - compact */
.chart-card-pilots .chart-container {
    flex: 1;
    min-height: 0;
    position: relative;
}

.chart-card-pilots .chart-container canvas {
    max-width: 100%;
}

/* Aircraft type pie chart */
.pie-container {
    flex: 1;
    min-height: 0;
    position: relative;
}

.chart-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px;
    min-width: 0;
    min-height: 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.chart-header h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0;
}

.chart-header-buttons {
    display: flex;
    gap: 8px;
}

.chart-card h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
}

.btn-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-reset svg {
    flex-shrink: 0;
}

.chart-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
}

/* No data display */
.no-data-message {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary);
    border-radius: 6px;
    z-index: 5;
}

.no-data-message.visible {
    display: flex;
}

.no-data-message span {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.chart-container.has-no-data canvas {
    visibility: hidden;
}

/* Filters */
.filters {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.filters h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text);
    background-color: var(--white);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 75, 147, 0.1);
}

/* Data Table */
.data-table-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table-header h3 {
    font-size: 1rem;
    color: var(--text);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background-color: var(--background);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: var(--background);
}

.data-table td {
    font-size: 0.9rem;
}

/* Severity badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Level 0 - Information (Gray) */
.badge-info {
    background-color: #f5f5f5;
    color: #616161;
}

/* Level 1 - Caution (Yellow) */
.badge-caution {
    background-color: #fff9c4;
    color: #f9a825;
}

/* Level 2 - Warning (Orange) */
.badge-warning {
    background-color: #fff3e0;
    color: #F06000;
}

/* Level 3 - Alert (Red) */
.badge-alert {
    background-color: #ffebee;
    color: #c62828;
}

.badge-default {
    background-color: #e3f2fd;
    color: var(--primary);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    /* Event Analysis: Stack to 2 columns, map below */
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }

    .dashboard-grid > .map-card {
        grid-column: span 2;
        grid-row: auto;
        height: 300px;
    }

    .bottom-charts-wrapper {
        grid-column: span 2;
        grid-template-columns: 1fr 1fr;
    }

    .bottom-charts-wrapper .chart-card-pie {
        grid-column: span 2;
    }
}

/* ===== Overview Dashboard Layout ===== */
.overview-content {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left Column: Contains Events by Type and Events by Pilots */
.overview-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow: hidden;
}

/* Event Types Chart Card - Takes half height */
.event-types-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    flex: 1;
}

.event-types-card .chart-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Inner wrapper for the canvas - height set dynamically by JS */
.event-types-chart-wrapper {
    position: relative;
    width: 100%;
    /* Height will be set dynamically based on number of bars */
}

/* Event Pilots Chart Card - Takes half height */
.event-pilots-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    flex: 1;
}

.event-pilots-card .chart-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Inner wrapper for the pilots canvas - height set dynamically by JS */
.event-pilots-chart-wrapper {
    position: relative;
    width: 100%;
    /* Height will be set dynamically based on number of bars */
}

/* Event pilots wrapper - same as event types wrapper */
.event-pilots-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.event-pilots-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ===== Event Type Search Field ===== */
.event-type-search {
    position: relative;
    display: flex;
    align-items: center;
}

.event-type-search input {
    width: 140px;
    height: 28px;
    padding: 4px 28px 4px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.event-type-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 75, 147, 0.1);
}

.event-type-search input::placeholder {
    color: #999;
}

.event-type-search .search-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.event-type-search .search-clear:hover {
    background: #e0e0e0;
    color: #666;
}

/* ===== Event Types Chart Auto-Scale ===== */

/* Container wrapper for event types (holds scrollable chart and sticky X-axis) */
.event-types-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Make event-types-container scrollable within wrapper */
.event-types-wrapper .event-types-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* X-axis overlay (visible during auto-scale mode) - positioned at bottom */
.event-types-wrapper .xaxis-overlay,
.event-pilots-wrapper .xaxis-overlay {
    height: 40px;
    flex-shrink: 0;
    background: white;
    display: flex;
    flex-direction: column;
    /* padding-left set dynamically by JS based on chart Y-axis width */
    padding-right: 10px;
    border-top: 1px solid var(--border);
}

.event-types-wrapper .xaxis-overlay .xaxis-ticks,
.event-pilots-wrapper .xaxis-overlay .xaxis-ticks {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 4px;
    font-size: 10px;
    color: #666;
}

.event-types-wrapper .xaxis-overlay .xaxis-tick,
.event-pilots-wrapper .xaxis-overlay .xaxis-tick {
    line-height: 1;
}

/* First and last ticks stay at edges without overflow */

.event-types-wrapper .xaxis-overlay .xaxis-title,
.event-pilots-wrapper .xaxis-overlay .xaxis-title {
    font-size: 11px;
    color: #666;
    text-align: center;
    padding-bottom: 4px;
}

/* Events Over Time Chart Card */
.events-time-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.events-time-card .chart-container {
    flex: 1;
    min-height: 0;
    position: relative;
}

.events-time-card canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Right column container - holds Events over Time + new charts row */
.overview-right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

/* Events over time takes ~60% of right column height */
.overview-right-column .events-time-card {
    flex: 1.2;
    min-height: 0;
}

/* Bottom charts row - two equal columns */
.overview-bottom-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex: 0.8;
    min-height: 0;
}

/* New chart cards - match existing chart-card styling */
.overview-bottom-charts .chart-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Airport chart container wrapper (holds sticky Y-axis and scrollable chart) */
.overview-airport-chart .chart-container-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
}

/* Airport bar chart container */
.overview-airport-chart .chart-container {
    flex: 1;
    min-height: 0;
    position: relative;
}


/* Toggle view button (show all / show first 15) */
.btn-toggle-view {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-toggle-view:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Inner wrapper for airport chart (non-scrollable mode) */
.overview-airport-chart .chart-inner-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Non-scrollable mode: canvas fills wrapper */
.overview-airport-chart .chart-inner-wrapper canvas {
    width: 100%;
    height: 100%;
}

/* Scrollable mode: canvas has fixed dimensions set by JS */
.overview-airport-chart .chart-container.scrollable .chart-inner-wrapper canvas {
    /* Dimensions set via JS - don't override */
}

/* Scrollable airport chart container (horizontal scroll) */
.overview-airport-chart .chart-container.scrollable {
    overflow-x: auto;
    overflow-y: hidden;
}

.overview-airport-chart .chart-container.scrollable .chart-inner-wrapper {
    position: relative;
    width: auto; /* Override base 100% - JS sets actual width */
    height: 100%;
    flex-shrink: 0;
}

/* Chart header buttons container */
.chart-header-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Auto-scale icon button */
.btn-autoscale {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-autoscale:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-autoscale.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Y-axis overlay (visible during auto-scale mode) */
.overview-airport-chart .yaxis-overlay {
    width: 50px;
    flex-shrink: 0;
    background: white;
    display: flex;
    flex-direction: row;
    /* padding-top and padding-bottom set dynamically by JS based on chart area */
}

.overview-airport-chart .yaxis-overlay .yaxis-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.overview-airport-chart .yaxis-overlay .yaxis-ticks {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 4px;
    font-size: 10px;
    color: #666;
}

.overview-airport-chart .yaxis-overlay .yaxis-tick {
    line-height: 1;
}

/* Align tick text with chart gridlines */
.overview-airport-chart .yaxis-overlay .yaxis-tick:first-child {
    transform: translateY(-50%);
}

.overview-airport-chart .yaxis-overlay .yaxis-tick:last-child {
    transform: translateY(-50%);
}

/* Pilots chart wrapper for vertical scrolling */
.chart-card-pilots .pilots-chart-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Scrollable pilots chart container (vertical scroll) */
.chart-card-pilots .chart-container.scrollable-vertical {
    overflow-y: auto;
    overflow-x: hidden;
}

.chart-card-pilots .chart-container.scrollable-vertical .chart-inner-wrapper {
    position: relative;
    width: 100%;
    height: auto; /* JS sets actual height */
    flex-shrink: 0;
}

/* Sticky X-axis for pilots charts */
.chart-card-pilots .sticky-xaxis {
    display: flex;
    flex-direction: column;
    background: white;
    flex-shrink: 0;
    /* Padding matches Chart.js chart area - adjusted by JS */
}

.chart-card-pilots .sticky-xaxis .xaxis-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #e0e0e0;
    padding-top: 4px;
}

.chart-card-pilots .sticky-xaxis .xaxis-ticks span {
    text-align: center;
    min-width: 20px;
}

.chart-card-pilots .sticky-xaxis .xaxis-ticks span:first-child {
    text-align: left;
}

.chart-card-pilots .sticky-xaxis .xaxis-ticks span:last-child {
    text-align: right;
}

.chart-card-pilots .sticky-xaxis .xaxis-title {
    text-align: center;
    font-size: 11px;
    color: #666;
    padding-top: 2px;
}

/* Aircraft type pie chart container */
.overview-airframe-chart .chart-container {
    flex: 1;
    min-height: 0;
    position: relative;
}

.overview-airframe-chart canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Responsive: Stack charts on smaller screens */
@media (max-width: 1200px) {
    .overview-content {
        grid-template-columns: 1fr;
    }

    .overview-bottom-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .top-charts-row {
        grid-template-columns: 1fr;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }

    /* Event Analysis: Single column on small screens */
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .dashboard-grid > .map-card {
        grid-column: 1;
        height: 250px;
    }

    .bottom-charts-wrapper {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .bottom-charts-wrapper .chart-card-pie {
        grid-column: 1;
    }

    /* No-airport layout responsive adjustments */
    .dashboard-grid.no-airport-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .dashboard-grid.no-airport-layout .bottom-charts-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard {
        flex-direction: column;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-row {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* ===== Data Table Modal ===== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 95vw;
    max-width: 1600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title-group {
    flex: 1;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 4px 0 0 0;
    font-weight: 400;
}

.modal-header .event-count {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 12px;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--background);
    color: var(--text);
}

/* Modal Body with Scrollable Table */
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* Data Table in Modal */
.modal-body .data-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-body .data-table th {
    position: sticky;
    top: 0;
    background-color: var(--background);
    z-index: 10;
}

.modal-body .data-table th,
.modal-body .data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.modal-body .data-table th {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body .data-table td {
    font-size: 0.8rem;
}

.modal-body .data-table tr:hover {
    background-color: var(--background);
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-footer .pagination-info {
    font-size: 0.875rem;
    color: var(--text-light);
}

.btn-show-all {
    margin-left: 12px;
    padding: 4px 10px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-show-all:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Loading state inside modal */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-light);
}

/* Print styles - for screenshot print window */
@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
