/* ==========================================================================
   EUROSTARLING ARS – Crew Portal Styles
   Tactical Pilot Dashboard / OCC
   ========================================================================== */

.crew-login-container {
    min-height: calc(100vh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    /* Center vertically again */
    justify-content: center;
    background: radial-gradient(circle at top right, var(--brand-600), var(--brand));
    padding: var(--sp-base);
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

.crew-login-card {
    width: 100%;
    max-width: 440px;
    padding: var(--sp-xl);
    border-radius: var(--r-large);
    color: white;
}

.crew-register-card {
    width: 100%;
    max-width: 900px;
    padding: 32px;
    border-radius: var(--r-large);
    color: white;
}

@media (max-width: 768px) {
    .crew-register-card {
        padding: 24px;
        margin-bottom: 24px;
    }

    .crew-register-card .grid-2 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.crew-login-header {
    text-align: center;
    margin-bottom: 20px;
}

.crew-logo img {
    width: 60px;
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.crew-login-header h1 {
    font-size: 24px;
    margin: 0;
    font-weight: var(--fw-bold);
    letter-spacing: -0.5px;
}

.crew-login-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-sm);
    margin-top: var(--sp-xs);
}

/* --- Theme Variables --- */
/* --- Theme Variables (Default Light) --- */
:root {
    --crew-input-bg: #ffffff;
    --crew-input-border: #e2e8f0;
    --crew-input-text: #1e293b;
    --crew-input-focus-border: var(--brand);
    --crew-input-focus-shadow: rgba(14, 165, 233, 0.15);
    --crew-label-color: #64748b;
    --crew-icon-color: #94a3b8;
    --crew-card-bg: #ffffff;
    --crew-body-bg: #f8fafc;
    --header-h: 60px;
}

/* Dark Mode Override */
.dark-mode {
    --crew-input-bg: rgba(255, 255, 255, 0.05);
    --crew-input-border: rgba(255, 255, 255, 0.1);
    --crew-input-text: #f8fafc;
    --crew-input-focus-border: var(--highlight);
    --crew-input-focus-shadow: rgba(62, 193, 201, 0.2);
    --crew-label-color: rgba(255, 255, 255, 0.7);
    --crew-icon-color: rgba(255, 255, 255, 0.5);
    --crew-card-bg: #0f172a;
    --crew-body-bg: #020617;
}

/* Ensure cards use the variables */
.crew-card {
    background: var(--crew-card-bg);
}

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    /* Bolder */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    color: #ffffff;
    /* White */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--crew-icon-color);
}

.crew-form input,
.crew-input,
.crew-card select.crew-input,
.crew-card textarea.crew-input {
    width: 100%;
    background: var(--crew-input-bg);
    border: 1px solid var(--crew-input-border);
    border-radius: var(--r-base);
    padding: 8px 14px;
    height: 42px;
    color: var(--crew-input-text);
    font-size: var(--fs-base);
    transition: all var(--transition-base);
    box-sizing: border-box;
    line-height: normal;
    /* Fix for vertical scrollbar */
}

.crew-card textarea.crew-input {
    height: auto;
    min-height: 100px;
    padding: 14px 16px;
}

.crew-card select.crew-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
    line-height: normal;
    /* Fix for vertical clipping */
}


/* Add padding if wrapper has icon */
.input-wrapper input,
.search-wrapper input {
    padding-left: 40px !important;
}

.crew-form input:focus,
.crew-input:focus,
.crew-card select.crew-input:focus,
.crew-card textarea.crew-input:focus,
.search-wrapper input:focus {
    background: var(--crew-input-bg);
    /* Keep bg or slightly lighter? */
    border-color: var(--crew-input-focus-border);
    outline: none;
    box-shadow: 0 0 0 4px var(--crew-input-focus-shadow);
}

/* --- Utilities --- */
.text-muted {
    color: var(--crew-icon-color) !important;
}

.text-dark {
    color: #1e293b !important;
}

.text-red {
    color: #dc2626 !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.pl-32 {
    padding-left: 32px !important;
}

.ml-4 {
    margin-left: 4px !important;
}

.mr-8 {
    margin-right: 8px !important;
}

.fs-sm {
    font-size: 14px !important;
}

.fs-xs {
    font-size: 13px !important;
}

.muted {
    color: var(--crew-icon-color) !important;
}

.font-bold {
    font-weight: 700 !important;
}

/* --- Layout Utilities --- */
.relative {
    position: relative !important;
}

.absolute {
    position: absolute !important;
}

.d-flex {
    display: flex !important;
}

.align-center {
    align-items: center !important;
}

.gap-12 {
    gap: 12px !important;
}

.flex-1 {
    flex: 1 !important;
}

.justify-between {
    justify-content: space-between !important;
}

.justify-center {
    justify-content: center !important;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    color: #94a3b8;
    font-size: 14px;
}

/* --- Form Layout & Grid System --- */
.grid-form {
    display: flex;
    flex-direction: column;
}

.form-section {
    display: block;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
    /* Fix: Align items to top, not bottom */
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.gap-16 {
    gap: 16px !important;
}

.gap-24 {
    gap: 24px !important;
}

/* Margins & Paddings */
.mt-12 {
    margin-top: 12px !important;
}

.ml-8 {
    margin-left: 8px !important;
}


.mt-24 {
    margin-top: 24px !important;
}

.mb-12 {
    margin-bottom: 12px !important;
}

.mb-24 {
    margin-bottom: 24px !important;
}

.p-24 {
    padding: 24px !important;
}

.p-0 {
    padding: 0 !important;
}

.uppercase {
    text-transform: uppercase !important;
}

.fw-bold {
    font-weight: 700 !important;
}



/* --- Buttons --- */
.btn-crew-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 91, 105, 0.2);
    text-decoration: none;
}

.btn-crew-primary:hover {
    transform: translateY(-2px);
    background: var(--brand-600);
    box-shadow: 0 8px 20px rgba(0, 91, 105, 0.3);
    color: white;
}

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

.btn-xl {
    min-width: 200px;
    height: 48px;
    font-size: 15px;
    padding: 0 32px;
}

.btn-crew-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: var(--brand);
    border: 1px solid var(--crew-input-border);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-crew-secondary:hover {
    background: #f8fafc;
    border-color: var(--brand);
    color: var(--brand-600);
}

.btn-crew-secondary.sm,
.btn-crew-primary.sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}


.form-footer {
    text-align: center;
    margin-top: var(--sp-l);
}

.form-footer a {
    color: var(--highlight);
    font-size: var(--fs-sm);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    color: white;
    text-decoration: underline;
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Crew Portal Specifics --- */
.crew-portal-body {
    background: #f1f5f9;
    overflow-x: hidden;
    overflow-y: auto;
    /* Ensure vertical scroll is allowed */
    margin: 0 !important;
    padding: 0 !important;
}

/* Force override any main site layout constraints */
.crew-portal-body .page,
.crew-portal-body main.page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.crew-portal-body .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Hide main site layout components that might leak in */
.crew-portal-body .site-header,
.crew-portal-body .site-footer,
.crew-portal-body #cookie-banner {
    display: none !important;
}

.bg-petrol {
    background: var(--brand) !important;
}

.bg-highlight {
    background: var(--highlight) !important;
}

.crew-top-bar {
    height: 60px;
    background: var(--brand);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--sp-l);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-base);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
}

.crew-brand-small {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crew-brand-small img {
    height: 32px;
}

.crew-brand-small span {
    font-weight: var(--fw-bold);
    letter-spacing: 0.5px;
    font-size: var(--fs-sm);
    text-transform: uppercase;
}

.zulu-clock {
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: var(--r-small);
    font-family: 'Courier New', monospace;
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--highlight);
}

.zulu-clock .tz {
    color: white;
    opacity: 0.5;
}

.network-status {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.top-pilot-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 30px;
}

.rank-badge {
    background: var(--highlight);
    color: var(--brand);
    font-size: 10px;
    font-weight: var(--fw-bold);
    padding: 2px 6px;
    border-radius: 4px;
}

.pilot-name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

/* --- Crew Interface Layout --- */
.crew-interface {
    min-height: calc(100vh - 60px);
    background: #f1f5f9;
    color: var(--text);
    margin: 0;
    width: 100%;
    position: relative;
    padding-top: 60px;
}

.crew-main-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 60px);
    width: 100%;
    align-items: start;
}

.crew-sidebar {
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    background: var(--brand);
    color: white;
    display: flex;
    flex-direction: column;
    padding: var(--sp-l);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.crew-pilot-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-base);
    padding: var(--sp-base);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--r-base);
    margin-bottom: var(--sp-xl);
}

.avatar-shimmer {
    width: 48px;
    height: 48px;
    background: var(--highlight);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 20px;
}

.pilot-info .pilot-name {
    display: block;
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pilot-info .pilot-id {
    font-size: var(--fs-xs);
    color: var(--highlight);
    font-family: monospace;
}

.crew-nav {
    flex: 1;
}

.crew-nav-group-title {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: var(--sp-l) 0 var(--sp-s);
    padding-left: var(--sp-s);
}

.crew-nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    padding: 12px var(--sp-s);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--r-small);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.crew-nav-item .icon-box {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.crew-nav-item:hover,
.crew-nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.crew-nav-item.active .icon-box {
    background: var(--highlight);
    color: var(--brand);
}

.crew-sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--sp-base);
}

.crew-content-area {
    padding: var(--sp-xl);
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.crew-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-xl);
}

.crew-page-title {
    font-size: 24px;
    font-weight: var(--fw-bold);
    margin: 0;
    color: var(--brand);
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: var(--r-full);
    box-shadow: var(--shadow-sm);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--ok);
    border-radius: 50%;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* --- Dashboard Grid --- */
.crew-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-xl);
    width: 100%;
}

.crew-card {
    background: white;
    padding: var(--sp-xl);
    border-radius: var(--r-large);
    box-shadow: var(--shadow-base);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-l);
}

.summary-header h2 {
    margin: 0;
    font-size: 28px;
    color: var(--brand);
}

.stats-row {
    display: flex;
    gap: var(--sp-xxl);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: var(--fs-xs);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 20px;
    font-weight: var(--fw-bold);
    color: var(--brand);
}

/* --- Modernized Tables --- */
.crew-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.crew-table thead th {
    text-align: left;
    padding: 16px 20px;
    background: rgba(248, 250, 252, 0.5);
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    border-bottom: 1px solid var(--crew-input-border);
    white-space: nowrap;
}

.crew-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--crew-input-text);
    vertical-align: middle;
    transition: all 0.2s ease;
}

.crew-table tbody tr {
    transition: background 0.2s ease;
}

.crew-table tbody tr:hover td {
    background: rgba(14, 165, 233, 0.02);
    color: var(--brand);
}

.crew-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Success States */
.status-badge.active,
.status-badge.accepted {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Warning States */
.status-badge.pending,
.status-badge.pending_approval {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* Error/Danger States */
.status-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Neutral States */
.status-badge.inactive,
.status-badge.on_leave {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}



/* Action Buttons & Icons */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: var(--muted);
    border: 1px solid var(--crew-input-border);
    text-decoration: none;
    font-size: 14px;
}

.action-btn:hover {
    background: #f8fafc;
    color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.action-btn.success:hover {
    color: #059669;
    background: #ecfdf5;
    border-color: #10b981;
}

.action-btn.danger:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #ef4444;
}

.crew-table .btn-icon {
    color: var(--muted);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.crew-table .btn-icon:hover {
    color: var(--brand);
    background: rgba(14, 165, 233, 0.1);
}


.grid-sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 2px solid var(--highlight);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 16px;
}

.bulletin-date {
    font-size: 10px;
    color: var(--muted);
}

/* --- Profile View --- */
.avatar-large {
    width: 80px;
    height: 80px;
    background: var(--highlight);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--brand);
    box-shadow: 0 0 0 4px rgba(62, 193, 201, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-l);
}

.input-wrapper.dark input {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text);
    padding-left: 44px;
}

.input-wrapper.dark i {
    color: var(--muted);
}

.crew-input:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.crew-input.sm {
    padding: 8px 12px;
    font-size: var(--fs-sm);
    height: 36px;
    /* consistent height */
}

/* Override icon padding if no icon present or fix generally */
.input-group .crew-input.sm {
    padding-left: 12px;
}



.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    transform: none;
}

.clickable {
    cursor: pointer;
    user-select: none;
}

.clickable:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-row {
    margin-bottom: var(--sp-l);
}

.flex-1 {
    flex: 1;
}

.crew-footer-minimal {
    height: 40px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--sp-l);
    font-size: 11px;
    color: var(--muted);
}

/* --- StarlingPulse Tracker Layout --- */
.starlingpulse-tracker {
    color: var(--white);
}

.instrument-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.instrument-card .label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.instrument-card .value {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 18px;
    font-weight: 800;
    color: var(--white);
}

.operational-log-content {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    line-height: 1.4;
    white-space: pre-wrap;
}

.status-pill.highlight {
    background: var(--brand);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 11px;
    box-shadow: 0 0 15px var(--brand);
}

.pulse-red {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.progress-track {
    background: rgba(255, 255, 255, 0.03) !important;
}

.progress-fill.highlight {
    background: linear-gradient(90deg, var(--brand) 0%, var(--highlight) 100%);
    box-shadow: 0 0 10px var(--brand);
}

.tactical-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid var(--brand) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
}


/* --- Dispatch & OFP Styles --- */
.ofp-body-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.bg-dark {
    background: rgba(0, 0, 0, 0.2);
}

.fuel-grid,
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fuel-item,
.spec-item {
    display: flex;
    flex-direction: column;
}

.fuel-item .label,
.spec-item .label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
}

.fuel-item .value,
.spec-item .value {
    font-size: 16px;
    font-weight: 700;
}

.text-wrap {
    word-break: break-all;
}

/* PIREP Modal Styles */
.pirep-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: white;
}

.pirep-modal.active {
    display: flex;
}

.pirep-modal-content {
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border-radius: var(--r-large);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.pirep-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}

.active-bid-hero {
    background: linear-gradient(135deg, var(--brand) 0%, #004a56 100%);
    color: white !important;
    padding: 32px;
    border-radius: var(--r-large);
    margin-bottom: 32px;
}

.bid-header {
    margin-bottom: 24px;
}

.bid-status-pill {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.route-display {
    display: flex;
    align-items: center;
    gap: 48px;
    margin: 32px 0;
}

.airport {
    display: flex;
    flex-direction: column;
}

.airport .icao {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.airport .label {
    font-size: 12px;
    opacity: 0.6;
}

.route-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.route-line i {
    background: var(--brand);
    padding: 0 12px;
    transform: rotate(90deg);
}

.flight-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .label {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-item .value {
    font-size: 18px;
    font-weight: 600;
}

.bid-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
}

.icao-badge {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-family: monospace;
}

/* --- Utility & Component Overrides (Migrated from Views) --- */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.z-index-1000 {
    z-index: 1000;
}

.z-index-9999 {
    z-index: 9999;
}

.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.badge-premium {
    background: linear-gradient(135deg, var(--highlight) 0%, var(--brand) 100%);
    color: var(--brand);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-premium.sm {
    font-size: 10px;
    padding: 2px 8px;
}

.step-num {
    width: 20px;
    height: 20px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.rotate-pulse {
    animation: pulse-rotate 4s infinite linear;
}

@keyframes pulse-rotate {
    0% {
        transform: rotate(0deg);
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: rotate(360deg);
        opacity: 0.5;
    }
}

.bg-petrol-dark {
    background: rgba(0, 0, 0, 0.1);
}

.border-r8 {
    border-radius: 8px;
}

.leaflet-container {
    background: #0a0a0a !important;
}

.dispatch-overlay-link {
    background: rgba(255, 255, 255, 0.15) !important;
}

.dispatch-overlay-link:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.starling-key-box {
    background: rgba(0, 196, 224, 0.05) !important;
    border: 1px dashed var(--brand) !important;
}


/* --- Additional Utilities for Tracker --- */
.h-4 {
    height: 4px;
}

.h-600 {
    height: 600px;
}

.w-0 {
    width: 0;
}

.w-120 {
    width: 120px;
}

.w-fit {
    width: fit-content;
}

.inset-0 {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.b-24 {
    bottom: 24px;
}

.l-24 {
    left: 24px;
}

.r-24 {
    right: 24px;
}

.h-50 {
    height: 50px;
}

.bg-white-05 {
    background: rgba(255, 255, 255, 0.5) !important;
}

.bg-black-05 {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0;
}

.border-white-05 {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.delay-100 {
    animation-delay: 0.1s !important;
}

/* --- Global Notification Styles --- */
.status-message {
    padding: 0;
    margin: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    height: 0;
    overflow: hidden;
}

.status-message.visible {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-message.info {
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-message i {
    font-size: 16px;
}

.delay-200 {
    animation-delay: 0.2s !important;
}

.delay-300 {
    animation-delay: 0.3s !important;
}

.transition-2s {
    transition: all 2s ease-out !important;
}

/* --- Premium Tab System --- */
.crew-tabs-container {
    display: flex;
    gap: 32px;
    min-height: 500px;
}

.crew-tabs-sidebar {
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding-right: 24px;
}

.crew-tabs-content {
    flex: 1;
}

.crew-tab-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.crew-tab-link i {
    width: 20px;
    text-align: center;
    opacity: 0.6;
}

.crew-tab-link:hover {
    background: #f8fafc;
    color: var(--brand);
}

.crew-tab-link.active {
    background: var(--brand);
    color: white;
}

.crew-tab-link.active i {
    opacity: 1;
}

.crew-tab-pane {
    display: none;
}

.crew-tab-pane.active {
    display: block;
    animation: tab-fade-in 0.3s ease-out;
}

@keyframes tab-fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Searchable Select Component --- */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select .options-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--crew-card-bg, #ffffff) !important;
    border: 1px solid var(--crew-input-border, #e2e8f0);
    border-radius: var(--r-base, 8px);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow-xl);
}

.searchable-select .options-list.visible {
    display: block !important;
}

.searchable-select .option-item {
    padding: 10px 14px;
    cursor: pointer;
    color: var(--crew-input-text, #1e293b);
    border-bottom: 1px solid var(--crew-input-border, #e2e8f0);
    font-size: 13px;
    transition: background 0.2s ease;
}

.searchable-select .option-item:last-child {
    border-bottom: none;
}

.searchable-select .option-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.dark-mode .searchable-select .option-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.searchable-select .dropdown-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--crew-icon-color, #94a3b8);
    font-size: 14px;
    z-index: 10;
    /* Ensure above input */
    transition: transform 0.3s ease;
}

/* Support for leading icon in searchable-select */
.searchable-select>i:first-child:not(.dropdown-icon) {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--crew-icon-color, #94a3b8);
    z-index: 10;
    /* Ensure above input */
    pointer-events: none;
}

.searchable-select .search-input {
    padding-left: 40px !important;
    padding-right: 40px !important;
    position: relative;
    z-index: 1;
}

.searchable-select .options-list.visible~.dropdown-icon.fa-chevron-down {
    transform: translateY(-50%) rotate(180deg);
}

.captcha-row {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: var(--r-base);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}

.captcha-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.captcha-input-box {
    width: 120px;
}

/* Utilities & Visibility Fixes */
.text-highlight {
    color: var(--highlight, #3ec1c9) !important;
}

.terms-acceptance {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: var(--r-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-acceptance span {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.terms-acceptance a.text-highlight:hover {
    text-decoration: underline;
    filter: brightness(1.1);
}

/* --- Admin Table Standards (Crew Portal Implementation) --- */
.admin-table-wrapper {
    background: var(--crew-card-bg, #ffffff);
    border: 1px solid var(--crew-input-border, #e2e8f0);
    border-radius: var(--r-large, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-base);
}

.admin-table-controls {
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted, #64748b);
    border-bottom: 2px solid var(--crew-input-border, #e2e8f0);
    letter-spacing: 0.8px;
    background: rgba(0, 0, 0, 0.02);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--crew-input-text, #1e293b);
}

.admin-table tbody tr:hover td {
    background: rgba(0, 91, 105, 0.02);
}

.admin-table th.clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.admin-table th.clickable:hover {
    color: var(--brand);
}

/* Standardized Table Components (OCC Portal) */
.crew-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.crew-table-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .crew-table-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.search-wrapper {
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
}

.search-wrapper .crew-input.sm {
    padding-left: 32px !important;
}

/* Admin Input Variants */
.admin-input.sm {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    background: var(--crew-input-bg);
    border: 1px solid var(--crew-input-border);
    border-radius: 8px;
    color: var(--crew-input-text);
    transition: all 0.2s;
}

.admin-input.sm:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 91, 105, 0.1);
    outline: none;
}

/* Additional Layout Utilities */
.items-center {
    align-items: center !important;
}

.justify-end {
    justify-content: flex-end !important;
}

.border-l {
    border-left: 1px solid var(--crew-input-border);
}

.pl-12 {
    padding-left: 12px !important;
}

.mx-4 {
    margin-left: 4px !important;
    margin-right: 4px !important;
}

.font-normal {
    font-weight: 400 !important;
}

.color-muted {
    color: var(--muted) !important;
}