/* v3 preview styles — scoped to the v3 pages. */
.v3-app {
    margin: 15px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}
.v3-app h3 {
    color: #004a99;
    font-weight: normal;
}
.v3-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    background: #f5a623;
    border-radius: 3px;
    padding: 1px 6px;
    vertical-align: middle;
    margin-left: 6px;
}
.v3-toolbar {
    margin: 8px 0;
    font-size: 12px;
    color: #333;
}
.v3-status { color: #555; }
.v3-error { color: #b00020; margin-left: 12px; font-weight: bold; }

/* Filter toolbar */
.v3-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
    padding: 8px;
    background: #f4f6fa;
    border: 1px solid #d8dce6;
    border-radius: 4px;
}
.v3-filters .v3-f { min-width: 150px; }
.v3-filters .v3-f-year { min-width: 90px; }
.v3-filters .v3-f-btn { margin-left: auto; }
/* keep PrimeVue inputs compact to match the dense grid */
.v3-filters .p-inputtext,
.v3-filters .p-select,
.v3-filters .p-autocomplete-input { font-size: 12px; }

/* Deliberately no height and no min-height on any grid container. Tabulator sets
   fixedHeight when the element already has a clientHeight, which would give the
   table its own scrollbar again — the very thing the grids were changed to avoid.
   The tables size themselves to their rows and the page does the scrolling. */

/* New/Open action bar above the grid */
.v3-actions {
    display: flex;
    gap: 8px;
    margin: 6px 0;
}

/* ===== Presence badge in the navbar ===== */
.v3-navrow { display: flex; align-items: center; width: 100%; }
.v3-navrow > #v3-navbar-app { flex: 1 1 auto; min-width: 0; }
.v3-presence {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 6px;
    white-space: nowrap;
}
.v3-presence-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font-size: 11px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 11px;
}
.v3-presence-ico { font-size: 10px; line-height: 1; }
.v3-presence-lbl { opacity: 0.75; }

/* One soft pulse when the count changes: a light wash and a hairline border,
   no colour jump, so it reads as movement rather than an alert. */
@keyframes v3-presence-pulse {
    0%   { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); }
    35%  { background: rgba(255, 255, 255, 0.42); border-color: rgba(255, 255, 255, 0.65); }
    100% { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); }
}
.v3-presence-pulse { animation: v3-presence-pulse 500ms ease-in-out; }
@media (prefers-reduced-motion: reduce) {
    .v3-presence-pulse { animation: none; }
}
@media (max-width: 960px) {
    .v3-presence-lbl { display: none; }
}

/* ===== v3 navbar (PrimeVue Menubar styled as the EASA blue bar) ===== */
#v3-navbar-app { width: 100%; }
/* The toolbar row carries the header blue, exactly like the legacy menu bar:
       #nav-bar { background: url(nav1_bg.gif) repeat-x 0 100% #0275b2; }
   mbmenu only publishes that gif through Yii's asset manager (public/assets/<hash>/),
   and those hashes are regenerated, so a copy lives at public/images/nav1_bg.gif
   and is referenced from there. Path is relative to this file (public/js/v3/). */
.td_toolbar {
    background: url(../../images/nav1_bg.gif) repeat-x 0 100% #0275b2;
}

/* The menubar is transparent so the header blue above shows through it and the
   bar stops looking like a dark blob pasted on the header. */
.v3-navbar.p-menubar {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 4px;
}

/* The menubar must stay on ONE row. With many items on a 13" laptop the last
   one used to wrap to a second line and break the page layout. */
.v3-navbar > .p-menubar-root-list {
    flex-wrap: nowrap;
}
.v3-navbar .v3-nav-link {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #fff;
    font-size: 12px;
    padding: 4px 4px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
/* ===== Height of the top row =====
   The navbar template binds PrimeVue's props.action onto OUR element, so the
   same <a> also carries the class .p-menubar-item-link and the Aura theme
   applies padding: var(--p-menubar-base-item-padding) to it, stacking on top of
   ours and stretching the header a couple of pixels.
   Three defences, all scoped to the TOP-LEVEL row so submenus keep their own
   comfortable padding:
     1. blank out the theme variable the Aura rule reads,
     2. zero the .p-menubar-item-content wrapper,
     3. restate our padding with enough specificity to win the cascade. */
.v3-navbar { --p-menubar-base-item-padding: 0; }

.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {
    padding: 0;
}
.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .v3-nav-link {
    padding: 4px 4px;
}

/* ===== Top-level item states =====
   Resting state is a transparent bar with white labels.
   PrimeVue's Aura theme animates hover / open / focus to a light surface, so the
   label MUST flip to blue in those states or it turns white-on-white and
   disappears. Hover and open are styled identically so the bar does not change
   appearance between "hovering" and "opened".
   Background and colour only — no padding or size changes, so nothing shifts.
   PrimeVue v4 marks the open item with class p-menubar-item-active AND the
   attribute data-p-active="true"; both are targeted for robustness. */
.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content:hover,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-menubar-item-active > .p-menubar-item-content,
.v3-navbar > .p-menubar-root-list > .p-menubar-item[data-p-active="true"] > .p-menubar-item-content,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-focus > .p-menubar-item-content {
    background: #fff !important;
}
.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content:hover .v3-nav-link,
.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content:hover .v3-nav-caret,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-menubar-item-active > .p-menubar-item-content .v3-nav-link,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-menubar-item-active > .p-menubar-item-content .v3-nav-caret,
.v3-navbar > .p-menubar-root-list > .p-menubar-item[data-p-active="true"] > .p-menubar-item-content .v3-nav-link,
.v3-navbar > .p-menubar-root-list > .p-menubar-item[data-p-active="true"] > .p-menubar-item-content .v3-nav-caret,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-focus > .p-menubar-item-content .v3-nav-link,
.v3-navbar > .p-menubar-root-list > .p-menubar-item.p-focus > .p-menubar-item-content .v3-nav-caret {
    color: #0275b2 !important;   /* EASA blue, same as the bar background */
}

/* Disabled items sit on that white background too while hovered, so the pale
   blue used on the bar would vanish. Give them a readable grey instead. */
.v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content:hover .v3-nav-disabled {
    color: #7b8a99 !important;
}

.v3-navbar .v3-nav-disabled { color: #d3e6f4; cursor: default; opacity: 0.75; }
.v3-navbar .v3-nav-caret { font-size: 10px; }
.v3-navbar .v3-nav-legacy {
    font-size: 9px;
    background: #e0e0e0;
    color: #666;
    border-radius: 3px;
    padding: 0 4px;
    margin-left: 6px;
    text-transform: uppercase;
}
/* submenus (dropdowns) — light panel like the legacy menu */
.v3-navbar .p-menubar-submenu {
    background: #fff;
    border: 1px solid #cbd3e1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 4px 0;
    min-width: 220px;
}
.v3-navbar .p-menubar-submenu .v3-nav-link { color: #0a4b8c; padding: 6px 14px; }
.v3-navbar .p-menubar-submenu .p-menubar-item-content:hover .v3-nav-link { background: #eaf2fb; }
.v3-navbar .p-menubar-submenu .v3-nav-disabled { color: #b0b0b0; }

/* ===== Desktop: keep the bar off the logo =====
   The legacy menu used #nav-bar { padding: 0 20px }, so it was indented from the
   left edge. Ours started at 4px and sat right under the logo. */
@media (min-width: 961px) {
    .v3-navbar.p-menubar { padding-left: 30px; }
}

/* Narrow viewports (13" laptops, ~1366px). The navbar carries one item per
   top-level menu entry, so it is the first thing to run out of room.
   Tighten spacing and hide the "legacy" badges: the greyed-out style already
   says the item is not available yet, and those badges cost ~30px each. */
@media (max-width: 1366px) {
    .v3-navbar .v3-nav-link   { padding: 4px 2px; }
    .v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .v3-nav-link { padding: 4px 2px; }
    .v3-navbar .v3-nav-legacy { display: none; }
}

/* ===== Mobile / narrow: PrimeVue swaps the row for a hamburger + dropdown =====
   The Menubar breakpoint is not overridden in v3-navbar.js, so PrimeVue's default
   of 960px applies. Below it the bar becomes a toggle button and the root list is
   rendered as a panel on a light surface, where our white labels disappear. */
@media (max-width: 960px) {
    /* The hamburger itself: white on the blue bar, like the labels were. */
    .v3-navbar .p-menubar-button,
    .v3-navbar .p-menubar-button:hover,
    .v3-navbar .p-menubar-button:focus {
        color: #fff !important;
        background: transparent !important;
        border: none;
        box-shadow: none;
    }
    /* the icon may be an <svg> or a font icon depending on the build */
    .v3-navbar .p-menubar-button svg,
    .v3-navbar .p-menubar-button .p-icon,
    .v3-navbar .p-menubar-button i {
        color: #fff !important;
        fill: currentColor !important;
        stroke: currentColor;
    }
    .v3-navbar .p-menubar-button:hover { background: rgba(255, 255, 255, 0.16) !important; }

    /* The opened panel is a white surface: labels go dark, like the submenus. */
    .v3-navbar .p-menubar-root-list {
        background: #fff;
        border: 1px solid #cbd3e1;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        padding: 4px 0;
    }
    .v3-navbar .p-menubar-root-list .v3-nav-link,
    .v3-navbar .p-menubar-root-list .v3-nav-caret,
    .v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .v3-nav-link {
        color: #0a4b8c;
        padding: 6px 14px;
    }
    .v3-navbar .p-menubar-root-list .v3-nav-disabled { color: #9aa7b3; }
    /* Hover inside the panel needs a visible tint: the desktop rule paints it
       white, which on a white panel reads as no feedback at all. */
    .v3-navbar > .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content:hover,
    .v3-navbar > .p-menubar-root-list > .p-menubar-item.p-menubar-item-active > .p-menubar-item-content,
    .v3-navbar > .p-menubar-root-list > .p-menubar-item[data-p-active="true"] > .p-menubar-item-content,
    .v3-navbar > .p-menubar-root-list > .p-menubar-item.p-focus > .p-menubar-item-content {
        background: #eaf2fb !important;
    }
    /* The "legacy" badges are hidden on narrow screens by the 1366px tier; in the
       vertical panel there is plenty of room, so bring them back. */
    .v3-navbar .v3-nav-legacy { display: inline-block; }
}

/* ===== Auth pages (login, password reset) — shared card ===== */
.v3-auth {
    display: flex;
    justify-content: center;
    padding: 48px 16px 64px;
}
.v3-auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(10, 60, 110, 0.08);
    padding: 34px 32px 28px;
    text-align: center;
}
.v3-auth-title {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #0275b2;
}
.v3-auth-intro {
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.5;
    color: #5a6673;
}
.v3-auth-form { display: flex; flex-direction: column; gap: 10px; }
.v3-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    font-size: 14px;
    color: #223;
    background: #fbfcfe;
    border: 1px solid #cfd070;          /* overridden below; kept for old browsers */
    border-color: #ccd4e0;
    border-radius: 6px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.v3-auth-input::placeholder { color: #9aa7b5; }
.v3-auth-input:focus {
    background: #fff;
    border-color: #0275b2;
    box-shadow: 0 0 0 3px rgba(2, 117, 178, 0.14);
}
/* Secondary actions sit between the fields and the single primary action, so the
   button stays the only obvious thing to click. */
.v3-auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 2px 0 6px;
    font-size: 12px;
}
.v3-auth-links a, .v3-auth-foot a { color: #0275b2; text-decoration: none; }
.v3-auth-links a:hover, .v3-auth-foot a:hover { text-decoration: underline; }
.v3-auth-sep { color: #c3ccd8; }
.v3-auth-btn {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #fff;
    background: #0275b2;
    border: 1px solid #0268a0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.v3-auth-btn:hover { background: #02689e; }
.v3-auth-btn:active { background: #015b8c; }
.v3-auth-btn:focus-visible { box-shadow: 0 0 0 3px rgba(2, 117, 178, 0.3); }
.v3-auth-foot {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #eef1f6;
    font-size: 12px;
}
.v3-auth-error {
    margin: 0 0 14px;
    padding: 9px 11px;
    font-size: 12px;
    text-align: left;
    color: #8a1c20;
    background: #fdecee;
    border: 1px solid #f3c2c6;
    border-radius: 6px;
}
.v3-auth-note {
    margin: 0 0 6px;
    padding: 12px 13px;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
    color: #24506e;
    background: #eef6fc;
    border: 1px solid #cbe0f0;
    border-radius: 6px;
}
.v3-auth-maint {
    max-width: 380px;
    margin: 0 auto 14px;
    padding: 10px 12px;
    font-size: 12px;
    background: #fff8e1;
    border: 1px solid #f0dca8;
    border-radius: 6px;
}

/* ===== Basic Data managers (v3) ===== */
.v3-states-toolbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.v3-states-expired { min-width: 300px; }
.v3-states-date { width: 210px; }
.v3-states-filter { min-width: 170px; }
.v3-radio-row { display: flex; gap: 18px; margin-top: 2px; }
.v3-dlg-select {
    width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13px;
    color: #223; background: #fff; border: 1px solid #ccd4e0; border-radius: 5px;
}
.v3-radio { font-size: 12px; color: #333; display: flex; align-items: center; gap: 5px; }
.v3-states-label { display: block; margin: 12px 0 4px; font-size: 12px; color: #333; }
.v3-states .p-message { margin: 8px 0; }

/* The two grids side by side, so the prefixes of the selected state are visible
   without scrolling. Falls back to one column on narrow laptops. */
.v3-states-panels {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 14px;
    align-items: start;
}
@media (max-width: 1200px) {
    .v3-states-panels { grid-template-columns: 1fr; }
}
.v3-states-panel {
    border: 1px solid #d8dce6;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}
.v3-states-panel-title {
    display: flex; align-items: center; gap: 10px;
    background: #f4f6fa;
    border-bottom: 1px solid #d8dce6;
    padding: 7px 10px;
    font-size: 12px; font-weight: bold; color: #004a99;
}
.v3-states-panel-title small { font-weight: normal; color: #777; }
.v3-states-panel-title .p-button { margin-left: auto; }
.v3-states-count { margin-left: auto; font-weight: normal; color: #777; font-size: 11px; }
.v3-states-pager {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border-top: 1px solid #e3e7ef;
    font-size: 12px; color: #555;
}

/* Expired rows. Reproduces the legacy .grid-row-predescribed-expired, which
   stamped row_predescribed_expired.gif (94x21) on the right of the row over a
   pale orange background. Path is relative to this file (public/js/v3/). */
.v3-states .tabulator-row.v3-row-expired {
    background: #fff0e0 url(../../images/row_predescribed_expired.gif) center right no-repeat;
}
.v3-states .tabulator-row.v3-row-expired.tabulator-selected {
    background: #dfe8f6 url(../../images/selected_row_predescribed_expired.gif) center right no-repeat;
}
.v3-states .tabulator-row.v3-row-expired .tabulator-cell { background: transparent; }

/* ===== SAFA Library (v3) ===== */
.v3-safalib-toolbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.v3-safalib-count { margin-left: auto; font-size: 12px; color: #666; }
.v3-safalib-label { display: block; margin: 12px 0 4px; font-size: 12px; color: #333; }
.v3-safalib .p-message { margin: 8px 0; }
.v3-safalib a { color: #0275b2; }

/* ===== Dashboard (v3) ===== */
.v3-breadcrumb { font-size: 12px; margin: 0 0 10px; color: #666; }
.v3-breadcrumb a { color: #0275b2; text-decoration: none; }
.v3-breadcrumb a:hover { text-decoration: underline; }
.v3-breadcrumb-sep { margin: 0 6px; color: #aaa; }
.v3-breadcrumb-current { color: #333; font-weight: bold; }

.v3-dash-toolbar { margin: 0 0 12px; }
/* Two columns on a normal screen, one on narrow laptops: the six panels keep a
   predictable order instead of reflowing into ragged rows. */
.v3-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 1100px) {
    .v3-dash-grid { grid-template-columns: 1fr; }
}
.v3-dash-panel {
    border: 1px solid #d8dce6;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}
.v3-dash-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f6fa;
    border-bottom: 1px solid #d8dce6;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: bold;
    color: #004a99;
}
.v3-dash-note { margin-left: auto; font-weight: normal; color: #777; font-size: 11px; }
.v3-dash-err  { margin-left: auto; font-weight: normal; color: #b00020; font-size: 11px; }

/* ===== Self-registration (v3) ===== */
.v3-selfreg fieldset {
    border: 1px solid #d8dce6;
    border-radius: 4px;
    padding: 12px 14px;
    margin: 0;
}
.v3-selfreg legend { color: #004a99; font-weight: bold; font-size: 12px; padding: 0 6px; }
.v3-selfreg label {
    display: block;
    margin: 10px 0 3px;
    font-size: 12px;
    color: #333;
}
.v3-selfreg label:first-of-type { margin-top: 0; }
.v3-selfreg .v3-err { display: block; margin-top: 3px; color: #b00020; font-size: 11px; }
.v3-selfreg-captcha { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v3-selfreg-captcha img { border: 1px solid #d8dce6; border-radius: 3px; vertical-align: middle; }
.v3-selfreg-back { margin-left: 12px; font-size: 12px; color: #0275b2; }
.v3-flash {
    margin: 10px 0;
    padding: 10px 12px;
    background: #eaf2fb;
    border: 1px solid #cbd3e1;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== Ramp Inspection form ===== */
.v3-form { margin: 15px; }
.v3-form-header { display: flex; align-items: center; justify-content: space-between; }
.v3-form-actions { display: flex; gap: 8px; }
.v3-form-msg { margin: 8px 0; }
.v3-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}
.v3-form-grid.v3-loading { opacity: 0.5; pointer-events: none; }
.v3-form-grid fieldset {
    border: 1px solid #cdd3e0;
    border-radius: 4px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 6px 10px;
    align-items: center;
}
.v3-form-grid fieldset legend { color: #004a99; font-weight: bold; font-size: 12px; padding: 0 6px; }
.v3-form-grid label { font-size: 12px; color: #333; text-align: right; }
.v3-form-grid label.v3-inline { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 6px; }
.v3-form-grid .req { color: #b00020; }
.v3-form-grid .p-inputtext,
.v3-form-grid .p-select,
.v3-form-grid .p-autocomplete,
.v3-form-grid .p-datepicker,
.v3-form-grid .p-inputnumber { width: 100%; font-size: 12px; }
.v3-actions-box { grid-column: 1 / -1; }
.v3-actions-box label.v3-inline { grid-column: 1 / -1; }
.v3-tab-todo { padding: 40px; text-align: center; color: #888; font-style: italic; }

/* Tabulator: match the compact EASA grid look */
.tabulator {
    font-size: 12px;
    border: 1px solid #b5b8c8;
    background: #ffffff;
}
.tabulator .tabulator-header .tabulator-col {
    background: #eef1f7;
    border-right: 1px solid #d0d4e0;
}
.tabulator-row.tabulator-row-even { background: #f7f9fc; }
.tabulator-row:hover { background: #eaf2fb !important; }
/* Ensure the row area background is white, never the dark default that showed
   through when the table was taller than its rows. */
.tabulator .tabulator-tableholder { background: #ffffff; }

/* ------------------------------------------------------------------ */
/* User administration                                                 */
/* ------------------------------------------------------------------ */

/* The search box carries a long placeholder ("Search a country/organisation
   or email"), so it needs more room than the Basic Data one. */
.v3-users-search {
    min-width: 280px;
}

/* Per-row actions. The legacy page put Delete/Disable/Enable/Unblock/Edit on a
   second toolbar driven by the grid selection; showing them on the row itself
   removes the select-then-click step while keeping the same set and wording. */
.v3-rowact {
    display: inline-block;
    margin: 0 .18rem;
    padding: .05rem .3rem;
    border-radius: 3px;
    color: #0275b2;
    cursor: pointer;
    font-size: .82rem;
    line-height: 1.5;
    white-space: nowrap;
}

.v3-rowact:hover {
    background: #0275b2;
    color: #fff;
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Pending tasks / Registrations                                       */
/* ------------------------------------------------------------------ */

.v3-pending-form { margin-top: 1rem; }
.v3-pending-body { padding: .9rem 1rem 1.1rem; }

.v3-pending-row { margin-bottom: .8rem; }
.v3-pending-row > label,
.v3-pending-grid3 label {
    display: block;
    margin-bottom: .22rem;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
}
.v3-pending-row > strong { font-size: .95rem; }

.v3-pending-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .8rem;
    margin-bottom: .8rem;
}

.v3-pending-flags {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .9rem;
}
.v3-pending-flags fieldset {
    border: 1px solid #999;
    padding: .45rem .7rem;
    margin: 0;
}

.v3-pending-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.v3-tou-body { font-size: .9rem; line-height: 1.5; }
.v3-tou-body ul.v3-tou, .v3-tou-body ol { padding-left: 1.4rem; }
.v3-tou-body li { margin-bottom: .35rem; }

/* ------------------------------------------------------------------ */
/* Create user (on-behalf registration)                                */
/* ------------------------------------------------------------------ */

.v3-behalfreg { max-width: 1000px; }
.v3-behalfreg-intro { margin: 0 0 .4rem; }
.v3-behalfreg-note { margin: 0 0 1rem; font-size: .85rem; color: #666; }
.v3-required { color: #c00; }

.v3-behalfreg-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.6rem;
}

.v3-behalfreg-col label {
    display: block;
    margin: .7rem 0 .22rem;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
}
.v3-behalfreg-col > label:first-child { margin-top: 0; }

.v3-behalfreg-perms {
    margin-top: 1rem;
    border: 1px solid #999;
    padding: .5rem .8rem .7rem;
}
.v3-behalfreg-perms legend { font-size: .82rem; font-weight: 600; color: #555; }
.v3-behalfreg-perms .v3-radio { display: block; margin: .25rem 0; font-weight: 400; }

.v3-behalfreg-submit {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.4rem;
    flex-wrap: wrap;
}

.v3-behalfreg-pwnotice {
    border: 1px solid #ccc;
    background: #efefef;
    padding: .55rem .7rem;
    margin-top: 1rem;
    font-weight: 700;
    font-size: .85rem;
}

.v3-errsum { margin: 0; padding-left: 1.2rem; }

.v3-flash-success {
    border: 1px solid #b7d8b7;
    background: #eaf6ea;
    padding: .7rem .9rem;
    margin-bottom: .9rem;
}

@media (max-width: 860px) {
    .v3-behalfreg-cols { grid-template-columns: minmax(0, 1fr); }
    .v3-pending-grid3  { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ */
/* Account pages: my details, change password                          */
/* ------------------------------------------------------------------ */

/* The login and reset cards hold a single short form; these two carry more
   fields plus a policy panel, so they get a wider variant of the same card. */
.v3-auth-card-wide { max-width: 520px; }

.v3-auth-textarea {
    resize: vertical;
    min-height: 88px;
    font-family: inherit;
}

.v3-field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}

.v3-field-readonly {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .55rem .75rem;
    margin-bottom: .6rem;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #f7f7f7;
}
.v3-field-label {
    font-size: .78rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.v3-field-value { font-size: .95rem; color: #333; }

/* EASA password policy, as its own panel rather than the legacy floated
   orange box beside the form. */
.v3-pwpolicy {
    margin-top: 1.1rem;
    padding: .7rem .9rem .8rem;
    border: 1px solid #f0dcc0;
    border-radius: 6px;
    background: #fff8ef;
    text-align: left;
}
.v3-pwpolicy-title {
    margin: 0 0 .4rem;
    font-size: .85rem;
    font-weight: 700;
    color: #8a5a00;
}
.v3-pwpolicy ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: .84rem;
    line-height: 1.55;
    color: #5f4a2c;
}
.v3-pwpolicy-warn {
    margin: .5rem 0 0;
    font-size: .8rem;
    color: #8a5a00;
}

@media (max-width: 520px) {
    .v3-field-pair { grid-template-columns: 1fr; }
}

/* Saved filters: the notify flag is toggled straight from the grid cell. */
.v3-notify {
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    color: #999;
}
.v3-notify.is-on { color: #0275b2; }
.v3-notify:hover { color: #01527d; }

/* Saved filters: the parameter summary the legacy hid behind a note icon. */
.v3-filterparams {
    display: block;
    font-size: .82rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

/* ------------------------------------------------------------------ */
/* Forum                                                               */
/* ------------------------------------------------------------------ */

.v3-forum-layout {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

/* --- tree --- */
.v3-forum-tree {
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.v3-forum-tree-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .3rem .45rem .7rem;
    background: #f5f7f9;
    border-bottom: 1px solid #e3e3e3;
    font-weight: 600;
    font-size: .85rem;
    color: #444;
}
.v3-forum-cats, .v3-forum-threads { list-style: none; margin: 0; padding: 0; }
.v3-forum-threads { padding-left: 1.5rem; }

.v3-forum-cat,
.v3-forum-threads > li {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .28rem .5rem .28rem .35rem;
    font-size: .88rem;
}
.v3-forum-cat:hover,
.v3-forum-threads > li:hover { background: #f2f7fb; }
.v3-forum-threads > li.is-selected { background: #e3f0fa; font-weight: 600; }

.v3-forum-twisty {
    border: 0; background: none; cursor: pointer;
    color: #777; font-size: .8rem; line-height: 1; padding: 0 .15rem;
}
.v3-forum-cat-name, .v3-forum-thread-name {
    flex: 1; cursor: pointer; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.v3-forum-cat-name { font-weight: 600; color: #333; }

/* Node actions replace the legacy right-click menu, which was undiscoverable:
   they stay faint until the row is hovered. */
.v3-forum-acts { display: flex; gap: .1rem; opacity: 0; transition: opacity .12s; }
.v3-forum-cat:hover .v3-forum-acts,
.v3-forum-threads > li:hover .v3-forum-acts { opacity: 1; }
.v3-forum-acts button {
    border: 0; background: none; cursor: pointer;
    color: #0275b2; font-size: .8rem; padding: 0 .2rem; line-height: 1.4;
}
.v3-forum-acts button:hover { color: #01527d; }

.v3-forum-empty, .v3-forum-placeholder {
    margin: 0; padding: .6rem .7rem;
    font-size: .85rem; color: #888;
}
.v3-forum-placeholder { padding: 2.5rem 1rem; text-align: center; }

/* --- posts --- */
.v3-forum-posts {
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
    padding: .2rem .9rem 1rem;
    min-height: 320px;
}
.v3-forum-thread-head { border-bottom: 1px solid #eee; padding: .6rem 0 .5rem; }
.v3-forum-thread-head h2 { margin: 0; font-size: 1.05rem; }
.v3-forum-thread-head p { margin: .2rem 0 0; font-size: .85rem; color: #666; }
.v3-forum-count { font-size: .78rem; color: #888; }

.v3-forum-post { border-bottom: 1px solid #f0f0f0; padding: .75rem 0; }
.v3-forum-post header {
    display: flex; align-items: baseline; gap: .45rem;
    font-size: .82rem; color: #666; margin-bottom: .35rem;
}
.v3-forum-post header strong { color: #333; font-size: .88rem; }
.v3-forum-org { color: #0275b2; }
.v3-forum-date { margin-left: auto; }
.v3-forum-del {
    border: 0; background: none; cursor: pointer; color: #b00; padding: 0 .2rem;
}

/* Post text is inserted as text, not HTML, so newlines have to be honoured
   here rather than converted to <br> server-side as the legacy did. */
.v3-forum-body { white-space: pre-wrap; font-size: .9rem; line-height: 1.5; }

.v3-forum-files { margin: .45rem 0 0; padding-left: 1rem; font-size: .84rem; }

.v3-forum-pager { display: flex; gap: .25rem; padding: .8rem 0; flex-wrap: wrap; }
.v3-forum-pager button {
    min-width: 28px; padding: .15rem .4rem; cursor: pointer;
    border: 1px solid #d5d5d5; border-radius: 4px; background: #fff; font-size: .82rem;
}
.v3-forum-pager button.is-current { background: #0275b2; border-color: #0275b2; color: #fff; }
.v3-forum-pager button:disabled { opacity: .4; cursor: default; }

.v3-forum-reply { border-top: 1px solid #eee; padding-top: .9rem; }
.v3-forum-reply h3 { margin: 0 0 .5rem; font-size: .95rem; }
.v3-forum-reply-foot {
    display: flex; align-items: center; gap: 1rem;
    margin-top: .6rem; flex-wrap: wrap;
}
.v3-forum-file { font-size: .82rem; color: #555; }

@media (max-width: 820px) {
    .v3-forum-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ */
/* Focused states and operators                                        */
/* ------------------------------------------------------------------ */

/* The legacy laid this out as three ExtJS border regions (west/center/east);
   three equal columns say the same thing without the framework. */
.v3-foc-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    align-items: start;
}

.v3-foc-props {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .8rem;
    padding: .6rem .8rem;
    margin-bottom: .8rem;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #f7f9fb;
}
.v3-foc-prop { display: flex; flex-direction: column; gap: .2rem; }
.v3-foc-prop > label {
    font-size: .75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.v3-foc-prop > span { font-size: .9rem; color: #333; padding: .3rem 0; }
.v3-foc-grow { flex: 1; min-width: 180px; }
.v3-foc-prop:last-child { flex-direction: row; gap: .4rem; }

.v3-foc-foot { padding: .55rem .6rem; border-top: 1px solid #eee; }
.v3-foc-dlg-note { margin: 0 0 .5rem; font-size: .82rem; color: #666; }

@media (max-width: 1100px) {
    .v3-foc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .v3-foc-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ */
/* Report criteria forms (Data querying & analysis)                    */
/* ------------------------------------------------------------------ */

.v3-repform { max-width: 620px; }
.v3-repform-head h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.v3-repform-head p { margin: 0 0 1rem; font-size: .88rem; color: #666; }

.v3-repform-form {
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
    padding: 1rem 1.1rem 1.1rem;
}
.v3-repform-row { margin-bottom: .9rem; }
.v3-repform-row > label {
    display: block;
    margin-bottom: .25rem;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
}
.v3-repform-input, .v3-repform-select {
    width: 100%;
    max-width: 260px;
    padding: .5rem .6rem;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
}
.v3-repform-input:focus, .v3-repform-select:focus {
    outline: none;
    border-color: #0275b2;
    box-shadow: 0 0 0 3px rgba(2, 117, 178, .12);
}
.v3-repform-hint { display: block; margin-top: .2rem; font-size: .78rem; color: #888; }

.v3-repform-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}
/* Reuses the login button, but it is a real submit so the browser performs the
   POST and receives the report as a download. */
.v3-repform-submit { width: auto; min-width: 150px; margin: 0; }
.v3-repform-submit:disabled { opacity: .6; cursor: default; }

.v3-repform-note {
    margin-top: .9rem;
    font-size: .8rem;
    color: #777;
    line-height: 1.5;
}

/* Calculator result, for the pages that answer with a value instead of a file. */
.v3-repform-result {
    margin-top: 1rem;
    padding: .8rem 1rem;
    border: 1px solid #b7d8b7;
    border-radius: 6px;
    background: #f1f8f1;
}
.v3-repform-result h3 { margin: 0 0 .5rem; font-size: .95rem; color: #2d6a2d; }
.v3-repform-result dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; }
.v3-repform-result dt { font-weight: 600; font-size: .85rem; color: #555; }
.v3-repform-result dd { margin: 0; font-size: .9rem; }

/* Focused Inspections: count badge in the group header. */
.v3-focrep-count {
    display: inline-block;
    margin-left: .4rem;
    padding: 0 .4rem;
    border-radius: 9px;
    background: #0275b2;
    color: #fff;
    font-size: .72rem;
}

/* Inspection Preparation keeps the legacy column colours. */
.v3-t-green  { color: #0a0; }
.v3-t-orange { color: #e08000; }
.v3-t-red    { color: #c00; }
.v3-t-navy   { color: navy; }
.v3-avail-lbl { display: flex; align-items: center; gap: .35rem; font-size: .84rem; color: #555; }
.v3-avail-lbl .v3-repform-input { width: 150px; }

/* Groups of checkboxes that post several values under one name. */
.v3-repform-checks { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.v3-repform-checks .v3-radio { font-weight: 400; font-size: .88rem; }

/* Batch Import group header. */
.v3-di-date { color: #888; font-size: .78rem; margin-left: .3rem; }

/* ------------------------------------------------------------------ */
/* Analytical Report                                                   */
/* ------------------------------------------------------------------ */

.v3-analytical { max-width: 860px; }
.v3-an-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .8rem;
    margin-bottom: .8rem;
}
.v3-an-dates label {
    display: block; margin-bottom: .22rem;
    font-size: .8rem; font-weight: 600; color: #555;
}
.v3-an-iata { margin-bottom: .8rem; }

.v3-an-atts {
    border: 1px solid #e3e3e3; border-radius: 6px;
    padding: .6rem .8rem .7rem; margin-bottom: .9rem;
}
.v3-an-atts legend { font-size: .82rem; font-weight: 600; color: #555; }
.v3-an-atts .v3-radio { display: block; margin: .3rem 0; font-weight: 400; font-size: .88rem; }
.v3-an-atts .is-unsupported { color: #999; }
.v3-an-note { font-size: .75rem; color: #b06000; margin-left: .4rem; }

.v3-an-picker {
    border: 1px solid #dbe7f0; border-radius: 6px; background: #f7fbfe;
    padding: .7rem .9rem; margin-bottom: .9rem;
}
.v3-an-picker h3 { margin: 0 0 .5rem; font-size: .92rem; color: #0275b2; }
.v3-an-subopts .v3-radio { display: block; margin: .25rem 0; font-weight: 400; font-size: .86rem; }

.v3-an-log {
    margin-top: 1rem; padding: .7rem .9rem;
    border: 1px solid #e3e3e3; border-radius: 6px; background: #fafafa;
}
.v3-an-log h3 { margin: 0 0 .4rem; font-size: .9rem; }
.v3-an-log ul { margin: 0; padding-left: 1rem; font-size: .8rem; line-height: 1.6; }
.v3-an-log-t { color: #888; margin-right: .4rem; font-variant-numeric: tabular-nums; }

/* Dialog textarea, for records whose body is prose (news, descriptions). */
.v3-dlg-textarea {
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-family: inherit;
    font-size: .92rem;
    resize: vertical;
}
.v3-dlg-textarea:focus {
    outline: none;
    border-color: #0275b2;
    box-shadow: 0 0 0 3px rgba(2, 117, 178, .12);
}

/* ===== Pre-Described Findings (v3) ===== */
/* Rows whose expiry date is still in the future. The legacy marked them with
   row_predescribed_to_be_expired.gif over grey; already expired rows keep the
   .v3-row-expired treatment defined with the Basic Data managers above. */
.v3-states .tabulator-row.v3-row-to-be-expired {
    background: #efefef url(../../images/row_predescribed_to_be_expired.gif) center right no-repeat;
}
.v3-states .tabulator-row.v3-row-to-be-expired.tabulator-selected {
    background: #dfe8f6 url(../../images/selected_row_predescribed_to_be_expired.gif) center right no-repeat;
}
.v3-states .tabulator-row.v3-row-to-be-expired .tabulator-cell { background: transparent; }

.v3-pdf-cat { min-width: 120px; }

/* The standard-reference picker: type of operation (filter only), the list it
   narrows, and the button that moves one into the table below. */
.v3-pdf-picker { display: grid; grid-template-columns: 1fr 2fr auto; gap: 6px; align-items: center; }
.v3-pdf-stdrefs { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.v3-pdf-stdrefs th {
    text-align: left; background: #f4f6fa; color: #004a99;
    border-bottom: 1px solid #d8dce6; padding: 4px 6px; font-weight: bold;
}
.v3-pdf-stdrefs td { border-bottom: 1px solid #edf0f5; padding: 4px 6px; }
.v3-pdf-stdrefs td:last-child { width: 28px; text-align: center; }
.v3-pdf-empty { color: #888; font-style: italic; }
.v3-pdf-drop { cursor: pointer; color: #9e0b0f; }
.v3-pdf-note { font-size: 11px; color: #777; margin: 8px 0 0; }

/* ===== User administration: edit dialog (v3) ===== */
.v3-users-dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.v3-users-privs, .v3-users-oprs {
    margin-top: 14px; border: 1px solid #d8dce6; border-radius: 4px; overflow: hidden;
}
.v3-users-privs > header, .v3-users-oprs > header {
    background: #f4f6fa; border-bottom: 1px solid #d8dce6; padding: 6px 10px;
    font-size: 12px; font-weight: bold; color: #004a99;
}
.v3-users-privs .v3-radio-row { padding: 6px 10px; align-items: center; }
.v3-users-priv-label { font-size: 12px; color: #555; min-width: 150px; }
.v3-users-privs .v3-pdf-note { padding: 0 10px 8px; }

.v3-users-opr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.v3-users-opr-search { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.v3-users-opr-head { font-size: 12px; color: #555; margin-bottom: 6px; padding: 4px 0; }
.v3-users-opr-list {
    list-style: none; margin: 0; padding: 0; max-height: 190px; overflow-y: auto;
    border: 1px solid #e3e7ef; border-radius: 4px; font-size: 12px; background: #fff;
}
.v3-users-opr-list li { padding: 4px 8px; border-bottom: 1px solid #f0f2f7; cursor: pointer; }
.v3-users-opr-list li:hover { background: #eef4fb; }
.v3-users-opr-list li.v3-pdf-empty { cursor: default; }
.v3-users-opr-list li.v3-pdf-empty:hover { background: transparent; }
