/* ============================================================
   Shared Yacht module styles
   Applied to: Application, Limits, Operators, Vessel,
               Tender, Trailer, Viewrequest, components
   NOT intended for: Pages/Yacht/Payment/
   ============================================================ */

:root {
    --page-bg: #1A1A1A;
    --card-bg: #222222;
    --card-border: #444444;
    --muted: #888888;
    --text-main: #FFFFFF;
    --grid-header: #1A1A1A;
    --grid-border: #444444;
    --primary-soft-bg: rgba(33, 150, 243, 0.15);
    --primary-soft-text: #2196F3;
    --warning-soft-bg: rgba(255, 152, 0, 0.15);
    --warning-soft-text: #FF9800;
    --success-soft-bg: rgba(76, 175, 80, 0.15);
    --success-soft-text: #4CAF50;
    --danger-soft-bg: rgba(244, 67, 54, 0.15);
    --danger-soft-text: #F44336;
}

.yacht-page {
    background: var(--page-bg);
    padding: 1.25rem;
    border-radius: 18px;
}

.page-title {
    margin: 0 0 .35rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-subtitle {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: .95rem;
}

.summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    border: 1px solid transparent;
}

    .summary-chip.primary {
        background: var(--primary-soft-bg);
        color: var(--primary-soft-text);
        border-color: rgba(33, 150, 243, 0.25);
    }

    .summary-chip.warning {
        background: var(--warning-soft-bg);
        color: var(--warning-soft-text);
        border-color: rgba(255, 152, 0, 0.25);
    }

    .summary-chip.success {
        background: var(--success-soft-bg);
        color: var(--success-soft-text);
        border-color: rgba(76, 175, 80, 0.25);
    }

.main-shell {
    background: #222222;
    border: 2px solid #444444;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.section-card {
    border-radius: 18px !important;
    border: 2px solid var(--card-border) !important;
    background: var(--card-bg) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.25rem 1rem 1.25rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(242, 183, 53, 0.12);
    color: #F2B735;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
}

.section-subtitle {
    margin: .2rem 0 0 0;
    color: var(--muted);
    font-size: .9rem;
}

.question-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .25rem 0;
}

.question-text {
    font-weight: 500;
    color: #CCCCCC;
}

.rz-radiobuttonlist {
    gap: 1.25rem !important;
}

.field-label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 600;
    color: #888888;
}

.rz-dropdown,
.rz-textbox,
.rz-textarea {
    border-radius: 12px !important;
    border: 1px solid #444 !important;
    background: #2a2a2a !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

    .rz-dropdown:hover,
    .rz-textbox:hover,
    .rz-textarea:hover {
        border-color: #555 !important;
    }

    .rz-state-focus,
    .rz-dropdown.rz-state-focus,
    .rz-textbox:focus,
    .rz-textarea:focus {
        box-shadow: 0 0 0 3px rgba(242, 183, 53, 0.15) !important;
    }

.modern-grid-wrap {
    border: 1px solid var(--grid-border);
    border-radius: 18px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

    .modern-grid-wrap .rz-datatable-table thead th,
    .modern-grid-wrap .rz-grid-table thead th {
        background: var(--grid-header);
        color: #888888;
        font-weight: 700;
        font-size: .78rem;
        border-bottom: 1px solid var(--grid-border);
    }

    .modern-grid-wrap .rz-datatable-table tbody td,
    .modern-grid-wrap .rz-grid-table tbody td {
        border-bottom: 1px solid var(--grid-border);
        color: #FFFFFF;
        vertical-align: middle;
    }

    .modern-grid-wrap .rz-datatable-table tbody tr:nth-child(even) td,
    .modern-grid-wrap .rz-grid-table tbody tr:nth-child(even) td {
        background: rgba(255, 255, 255, 0.03);
    }

    .modern-grid-wrap .rz-datatable-table tbody tr:hover td,
    .modern-grid-wrap .rz-grid-table tbody tr:hover td {
        background: rgba(242, 183, 53, 0.04);
        transition: background 0.15s ease;
    }

    .modern-grid-wrap .rz-paginator {
        background: var(--grid-header);
        border-top: 1px solid var(--grid-border);
        border-radius: 0 0 18px 18px;
    }

.badge-soft {
    display: inline-block;
    padding: .4rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.1;
}

.badge-role-captain {
    background: var(--primary-soft-bg);
    color: var(--primary-soft-text);
}

.badge-role-operator {
    background: rgba(255, 255, 255, 0.08);
    color: #CCCCCC;
}

.badge-success-soft {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
}

.badge-warning-soft {
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
}

.badge-danger-soft {
    background: var(--danger-soft-bg);
    color: var(--danger-soft-text);
}

.action-btn {
    border-radius: 10px !important;
    min-width: 38px;
    height: 38px;
}

.edit-btn {
    border: 1px solid #444 !important;
    background: #2a2a2a !important;
}

.footer-actions {
    margin-top: 1rem;
}

    .footer-actions .rz-button {
        border-radius: 12px !important;
        min-width: 120px;
        font-weight: 700;
    }

.save-btn {
    box-shadow: 0 8px 18px rgba(18, 183, 106, 0.22);
}

.back-btn {
    border: 1px solid #444 !important;
    background: #2a2a2a !important;
}

.danger-btn {
    box-shadow: 0 8px 18px rgba(185, 28, 28, 0.22);
}

/* ---- Button hover effects ---- */
.action-btn,
.save-btn,
.back-btn,
.edit-btn,
.danger-btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease,
                background-color 0.18s ease, border-color 0.18s ease !important;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 6px 18px rgba(242, 183, 53, 0.28) !important;
}

.save-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(18, 183, 106, 0.46) !important;
    filter: brightness(1.05);
}

.back-btn:hover {
    transform: translateY(-2px) !important;
    background: #333333 !important;
    border-color: #555 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.edit-btn:hover {
    transform: translateY(-2px) !important;
    background: #333333 !important;
    border-color: #555 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.danger-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(185, 28, 28, 0.46) !important;
    filter: brightness(1.05);
}

/* Generic subtle hover for any other Radzen buttons inside yacht pages */
.yacht-page .rz-button:not(.wave-button):not(:disabled) {
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

.yacht-page .rz-button:not(.wave-button):not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.grid-title-helper {
    color: var(--muted);
    font-size: .9rem;
}

/* Ocean wave float animation — used by .wave-button:hover */
@keyframes wave-float {
    0%   { transform: translateY(0px)  scale(1.02); }
    18%  { transform: translateY(-6px) scale(1.02); }
    36%  { transform: translateY(-2px) scale(1.015); }
    55%  { transform: translateY(-8px) scale(1.02); }
    74%  { transform: translateY(-3px) scale(1.015); }
    90%  { transform: translateY(-6px) scale(1.02); }
    100% { transform: translateY(0px)  scale(1.02); }
}

@keyframes wave-glow {
    0%       { box-shadow: 0 5px 16px rgba(242,183,53,0.22), 0 2px 6px rgba(0,0,0,0.08) !important; }
    35%      { box-shadow: 0 14px 30px rgba(242,183,53,0.40), 0 4px 10px rgba(0,0,0,0.12) !important; }
    65%      { box-shadow: 0 18px 38px rgba(242,183,53,0.52), 0 6px 14px rgba(0,0,0,0.15) !important; }
    100%     { box-shadow: 0 5px 16px rgba(242,183,53,0.22), 0 2px 6px rgba(0,0,0,0.08) !important; }
}

/* Corporation confirmation dialog — checkbox row */
.yacht-page .yd-corp-check { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.yacht-page .yd-corp-check span { color: var(--text-main); }

@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .yacht-page {
        padding: .75rem;
    }

    .section-card {
        padding: 1rem;
    }
}

/* ============================================================
   Viewrequest — Operator Cockpit
   Scoped to .vr-cockpit to avoid collisions with other pages
   ============================================================ */

.vr-cockpit {
    --vr-page-bg: #1A1A1A;
    --vr-shell-bg: #222222;
    --vr-card-bg: #222222;
    --vr-card-bg-elev: #2a2a2a;
    --vr-border: #444444;
    --vr-border-strong: #555555;
    --vr-text: #FFFFFF;
    --vr-text-muted: #888888;
    --vr-text-soft: #CCCCCC;
    --vr-header-bg: #1A1A1A;
    --vr-accent: #F2B735;
    --vr-accent-deep: #D97706;
    --vr-accent-soft-bg: rgba(242, 183, 53, 0.12);
    --vr-grid-stripe: rgba(255, 255, 255, 0.03);
    --vr-grid-hover: rgba(242, 183, 53, 0.06);
    --vr-primary-soft-bg: rgba(33, 150, 243, 0.15);
    --vr-primary-soft-text: #2196F3;
    --vr-warning-soft-bg: rgba(255, 152, 0, 0.15);
    --vr-warning-soft-text: #FF9800;
    --vr-success-soft-bg: rgba(76, 175, 80, 0.15);
    --vr-success-soft-text: #4CAF50;
    --vr-danger-soft-bg: rgba(244, 67, 54, 0.15);
    --vr-danger-soft-text: #F44336;
    --vr-info-soft-bg: rgba(99, 102, 241, 0.15);
    --vr-info-soft-text: #818CF8;
    --vr-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --vr-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --vr-input-bg: #2a2a2a;
    --vr-seg-bg: #1a1a1a;
    --vr-count-bg: #2a2a2a;
    --vr-accent-shadow: 0 8px 18px rgba(242, 183, 53, 0.30);

    background: var(--vr-page-bg);
    color: var(--vr-text);
    font-family: Inter, system-ui, sans-serif;
    padding: 28px 32px;
    min-height: 100%;
    box-sizing: border-box;
}

[data-theme="light"] .vr-cockpit {
    --vr-page-bg: #f4f7fb;
    --vr-shell-bg: #FFFFFF;
    --vr-card-bg: #FFFFFF;
    --vr-card-bg-elev: #f8fafc;
    --vr-border: #e7edf5;
    --vr-border-strong: #d7dfe9;
    --vr-text: #243447;
    --vr-text-muted: #667085;
    --vr-text-soft: #344054;
    --vr-header-bg: #f8fafc;
    --vr-accent: #D97706;
    --vr-accent-deep: #B45309;
    --vr-accent-soft-bg: rgba(217, 119, 6, 0.08);
    --vr-grid-stripe: #f9fbfe;
    --vr-grid-hover: #fef6e9;
    --vr-primary-soft-bg: rgba(33, 150, 243, 0.10);
    --vr-primary-soft-text: #175cd3;
    --vr-warning-soft-bg: rgba(234, 148, 12, 0.12);
    --vr-warning-soft-text: #B45309;
    --vr-success-soft-bg: rgba(16, 185, 129, 0.12);
    --vr-success-soft-text: #047857;
    --vr-danger-soft-bg: rgba(244, 67, 54, 0.10);
    --vr-danger-soft-text: #b42318;
    --vr-info-soft-bg: rgba(99, 102, 241, 0.10);
    --vr-info-soft-text: #4338ca;
    --vr-shadow: 0 20px 60px rgba(16,24,40,0.10), 0 6px 16px rgba(16,24,40,0.06);
    --vr-shadow-sm: 0 8px 22px rgba(16, 24, 40, 0.05);
    --vr-input-bg: #FFFFFF;
    --vr-seg-bg: #f8fafc;
    --vr-count-bg: #edf1f7;
    --vr-accent-shadow: 0 8px 18px rgba(217, 119, 6, 0.30);
}

.vr-cockpit .material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.vr-cockpit .ms-filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.vr-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vr-text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}

.vr-breadcrumb .ms-accent { color: var(--vr-accent); font-size: 16px; }
.vr-breadcrumb .ms-sep { font-size: 14px; }
.vr-breadcrumb .current { color: var(--vr-text-soft); }

.vr-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.vr-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--vr-text);
}

.vr-subtitle {
    margin-top: 6px;
    color: var(--vr-text-muted);
    font-size: 14px;
}

.vr-title-actions {
    display: flex;
    gap: 10px;
}

.vr-btn-ghost,
.vr-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.vr-btn-ghost {
    background: transparent;
    color: var(--vr-text-soft);
    border: 1px solid var(--vr-border);
    padding: 10px 16px;
    font-weight: 600;
}

.vr-btn-ghost:hover {
    background: var(--vr-card-bg-elev);
}

.vr-btn-primary {
    background: linear-gradient(180deg, var(--vr-accent) 0%, var(--vr-accent-deep) 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-weight: 700;
    box-shadow: var(--vr-accent-shadow);
}

.vr-btn-primary:hover {
    filter: brightness(1.05);
}

/* Neither cockpit button had a :disabled rule; Import Excel is disabled while Print, Copy or an
   import runs (they share the circuit's DbContext). */
.vr-cockpit .vr-btn-primary:disabled,
.vr-cockpit .vr-btn-ghost:disabled {
    opacity: .6;
    cursor: not-allowed;
    filter: none;
}
.vr-cockpit .vr-btn-ghost[aria-busy="true"] { cursor: progress; }

.vr-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.vr-kpi {
    position: relative;
    overflow: hidden;
    background: var(--vr-card-bg);
    border: 1px solid var(--vr-border);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--vr-shadow-sm);
}

.vr-kpi-blob {
    position: absolute;
    right: -18px;
    top: -18px;
    width: 90px;
    height: 90px;
    pointer-events: none;
}

.vr-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vr-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vr-kpi-icon .material-symbols-rounded {
    font-size: 20px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.vr-kpi-trend {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.vr-kpi-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--vr-text);
    line-height: 1.1;
}

.vr-kpi-label {
    margin-top: 4px;
    color: var(--vr-text-muted);
    font-size: 12.5px;
    font-weight: 500;
}

.vr-kpi-hint {
    color: var(--vr-text-muted);
    opacity: 0.65;
}

.vr-tone-primary .vr-kpi-icon { background: var(--vr-primary-soft-bg); color: var(--vr-primary-soft-text); }
.vr-tone-primary .vr-kpi-blob { background: radial-gradient(circle, var(--vr-primary-soft-bg) 0%, transparent 70%); }
.vr-tone-success .vr-kpi-icon { background: var(--vr-success-soft-bg); color: var(--vr-success-soft-text); }
.vr-tone-success .vr-kpi-blob { background: radial-gradient(circle, var(--vr-success-soft-bg) 0%, transparent 70%); }
.vr-tone-warning .vr-kpi-icon { background: var(--vr-warning-soft-bg); color: var(--vr-warning-soft-text); }
.vr-tone-warning .vr-kpi-blob { background: radial-gradient(circle, var(--vr-warning-soft-bg) 0%, transparent 70%); }
.vr-tone-danger  .vr-kpi-icon { background: var(--vr-danger-soft-bg);  color: var(--vr-danger-soft-text); }
.vr-tone-danger  .vr-kpi-blob { background: radial-gradient(circle, var(--vr-danger-soft-bg) 0%, transparent 70%); }

.vr-trend-up   { background: var(--vr-success-soft-bg); color: var(--vr-success-soft-text); }
.vr-trend-down { background: var(--vr-warning-soft-bg); color: var(--vr-warning-soft-text); }
.vr-trend-alert{ background: var(--vr-danger-soft-bg);  color: var(--vr-danger-soft-text); }

.vr-shell {
    background: var(--vr-shell-bg);
    border: 1px solid var(--vr-border);
    border-radius: 20px;
    box-shadow: var(--vr-shadow);
    overflow: hidden;
}

/* Shown when the applications list fails to load (e.g. the database is unreachable).
   Built entirely from --vr-danger-* tokens, which already carry a [data-theme="light"]
   override, so it reads correctly in both themes without a per-theme rule here. */
.vr-load-error {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 20px 0;
    padding: 12px 16px;
    border: 1px solid var(--vr-danger-soft-text);
    border-radius: 12px;
    background: var(--vr-danger-soft-bg);
    color: var(--vr-danger-soft-text);
}

.vr-load-error > .material-symbols-rounded {
    flex: 0 0 auto;
    font-size: 22px;
}

.vr-load-error-text {
    flex: 1 1 auto;
    min-width: 0;
}

.vr-load-error-detail {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.85;
    word-break: break-word;
}

.vr-filter-bar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--vr-border);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.vr-seg {
    display: inline-flex;
    background: var(--vr-seg-bg);
    border: 1px solid var(--vr-border);
    border-radius: 12px;
    padding: 4px;
}

.vr-seg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--vr-text-soft);
    border: none;
    border-radius: 9px;
    padding: 7px 13px;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.vr-seg-chip.on {
    background: var(--vr-accent);
    color: #1a1a1a;
}

.vr-seg-count {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--vr-count-bg);
    color: var(--vr-text-muted);
}

.vr-seg-chip.on .vr-seg-count {
    background: rgba(0, 0, 0, 0.18);
    color: #1a1a1a;
}

.vr-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 360px;
    background: var(--vr-input-bg);
    border: 1px solid var(--vr-border);
    border-radius: 12px;
    padding: 8px 12px;
}

.vr-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--vr-text);
    font-family: inherit;
    font-size: 13.5px;
}

.vr-search .material-symbols-rounded {
    color: var(--vr-text-muted);
    font-size: 18px;
}

.vr-search .clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--vr-text-muted);
    display: flex;
    padding: 0;
}

.vr-filter-spacer { flex: 1; }

.vr-result-count {
    color: var(--vr-text-muted);
    font-size: 12.5px;
}

.vr-result-count strong {
    color: var(--vr-text);
}

.vr-cockpit .rz-data-grid,
.vr-cockpit .rz-grid-table {
    background: transparent;
    border: none;
}

.vr-cockpit .rz-grid-table thead th {
    background: var(--vr-header-bg);
    color: var(--vr-text-muted);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 12px 18px;
    border-bottom: 1px solid var(--vr-border);
}

.vr-cockpit .rz-grid-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--vr-border);
    color: var(--vr-text);
    background: transparent;
}

.vr-cockpit .rz-grid-table tbody tr:nth-child(even) td {
    background: var(--vr-grid-stripe);
}

.vr-cockpit .rz-grid-table tbody tr:hover td {
    background: var(--vr-grid-hover);
}

.vr-quote-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vr-quote-id {
    color: var(--vr-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
}

/* Bound policies only — sits under the quote # so the policy number the dashboard
   search now matches is visible in the row it belongs to. */
.vr-policy-no {
    color: var(--vr-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vr-client-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    background: var(--vr-accent-soft-bg);
    color: var(--vr-accent);
}

.vr-avatar.business {
    background: var(--vr-info-soft-bg);
    color: var(--vr-info-soft-text);
}

.vr-avatar.business .material-symbols-rounded {
    font-size: 18px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.vr-client-name {
    color: var(--vr-text);
    font-weight: 600;
    line-height: 1.3;
}

.vr-vessel-line {
    color: var(--vr-text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.vr-vessel-line .material-symbols-rounded { font-size: 12px; }

.vr-vessel-line span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vr-premium {
    color: var(--vr-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.vr-total-limit {
    color: var(--vr-text-soft);
    font-variant-numeric: tabular-nums;
}

.vr-agent { color: var(--vr-text-soft); }
.vr-date { color: var(--vr-text-muted); font-variant-numeric: tabular-nums; }

.vr-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.vr-status-pill .material-symbols-rounded {
    font-size: 13px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.vr-status-pill.primary { background: var(--vr-primary-soft-bg); color: var(--vr-primary-soft-text); }
.vr-status-pill.success { background: var(--vr-success-soft-bg); color: var(--vr-success-soft-text); }
.vr-status-pill.warning { background: var(--vr-warning-soft-bg); color: var(--vr-warning-soft-text); }
.vr-status-pill.danger  { background: var(--vr-danger-soft-bg);  color: var(--vr-danger-soft-text); }

.vr-actions {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}

.vr-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--vr-border);
    background: transparent;
    color: var(--vr-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vr-icon-btn:hover {
    background: var(--vr-card-bg-elev);
}

.vr-icon-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.vr-icon-btn[aria-busy="true"] { cursor: progress; }

.vr-icon-btn:disabled:hover {
    background: transparent;
}

.vr-icon-btn .material-symbols-rounded { font-size: 16px; }

/* Copy quote: labelled and in the accent so it stands apart from the grey icon buttons. The
   --vr-accent tokens flip per theme (#F2B735 dark, #D97706 light); light mode writes the label in
   the deeper amber (#B45309) because #D97706 text on white is only about 3:1. Hover fills the
   button and turns the label dark: white on #F2B735 would be about 2:1. */
.vr-copy-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--vr-accent);
    background: var(--vr-accent-soft-bg);
    color: var(--vr-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

[data-theme="light"] .vr-cockpit .vr-copy-btn { color: var(--vr-accent-deep); }

.vr-copy-btn:hover:not(:disabled),
[data-theme="light"] .vr-cockpit .vr-copy-btn:hover:not(:disabled) {
    background: var(--vr-accent);
    color: #1A1A1A;
}

.vr-copy-btn:focus-visible {
    outline: 2px solid var(--vr-accent);
    outline-offset: 2px;
}

.vr-copy-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.vr-copy-btn[aria-busy="true"] {
    opacity: 1;
    cursor: progress;
}

.vr-copy-btn .material-symbols-rounded { font-size: 16px; }

.vr-copy-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--vr-accent-soft-bg);
    border-top-color: var(--vr-accent);
    border-radius: 50%;
    animation: ya-save-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) { .vr-copy-spinner { animation: none; } }

.vr-footer-meta {
    color: var(--vr-text-muted);
    font-size: 12px;
    margin-top: 14px;
    text-align: center;
}

@media (max-width: 900px) {
    .vr-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Applications list — responsive grid.
   The columns declare fixed widths in Viewrequest.razor (1,360px in all) and Radzen lays the table out with
   table-layout: fixed, so it never gets narrower than that. Below it the grid scrolls sideways, and the row
   actions — the last column, Copy quote among them — were the first thing pushed out of view, with the
   scrollbar under all 25 rows. Now the actions column stays pinned to the grid's right edge while the other
   columns scroll under it, and below 760px (the pinned column beside Quote # and Client & Vessel) each row
   becomes a card. The queries measure the grid, not the window, so an open or closed sidebar counts. The
   container is the grid and not .vr-shell: a query container becomes the containing block of positioned
   descendants, and the filter dropdowns' popups in .vr-shell are placed from viewport coordinates. */
.vr-applist .vr-grid {
    container-type: inline-size;
    container-name: vr-grid;
    --vr-pin-shadow: inset 1px 0 0 var(--vr-border), -10px 0 12px -10px rgba(0, 0, 0, 0.6);
    /* The current page in both pagers: Radzen draws it #F2B735 on #F5C85C (--rz-primary on --rz-primary-lighter),
       unreadable in either theme. Dark text on the accent, like the selected status chip. */
    --rz-pager-numeric-button-selected-background-color: var(--vr-accent);
    --rz-pager-numeric-button-selected-color: #1A1A1A;
}

[data-theme="light"] .vr-applist .vr-grid {
    --vr-pin-shadow: inset 1px 0 0 var(--vr-border), -10px 0 12px -10px rgba(16, 24, 40, 0.18);
    /* Radzen colours the header titles with the dark theme's #E0E0E0, nearly invisible on the light header row. */
    --rz-grid-header-color: var(--vr-text-muted);
    /* Radzen's scrollbar thumb is white at 12%, invisible on white: the grid's two sideways scrollbars need a dark one. */
    --rz-scrollbar-color: rgba(16, 24, 40, 0.28);
}

/* The status chips wrap instead of being clipped by the card on a narrow screen. */
.vr-applist .vr-seg { flex-wrap: wrap; }

/* Shown only in the card layout, which has no header row. */
.vr-applist .vr-cell-label { display: none; }

/* The second scrollbar above the table (Viewrequest's HeaderTemplate; yacht-hscroll.js sizes the track to the
   table's scroll width and adds is-active only while the table is wider than the grid). */
.vr-applist .vr-hscroll {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
}

.vr-applist .vr-hscroll.is-active { display: block; }
.vr-applist .vr-hscroll-track { height: 1px; }

/* Radzen renders the HeaderTemplate in .rz-group-header, a padded flex row that sizes its content to the table
   (so nothing would scroll) and that comes before the top pager. As a bare block, ordered between the top pager
   and the table, it is just the strip. The grid root is a flex column; both pagers carry the same classes, so the
   bottom one is the pager after the data area. */
.vr-applist .vr-grid > .rz-group-header {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    order: 1;
}

.vr-applist .vr-grid > .rz-data-grid-data { order: 2; }
.vr-applist .vr-grid > .rz-data-grid-data ~ .rz-pager { order: 3; }

@container vr-grid (min-width: 760px) {
    .vr-applist .rz-grid-table .vr-col-actions {
        position: sticky;
        right: 0;
        z-index: 1; /* above the columns scrolling under it, below Radzen's loading mask (2) */
    }

    /* A pinned cell must be opaque or the columns under it show through. The row colours are layered over
       the card colour because the dark theme's stripe and hover are translucent. */
    .vr-applist .rz-grid-table tbody td.vr-col-actions {
        background: var(--vr-shell-bg);
    }

    .vr-applist .rz-grid-table tbody tr:nth-child(even) td.vr-col-actions {
        background: linear-gradient(var(--vr-grid-stripe), var(--vr-grid-stripe)), var(--vr-shell-bg);
    }

    .vr-applist .rz-grid-table tbody tr:hover td.vr-col-actions {
        background: linear-gradient(var(--vr-grid-hover), var(--vr-grid-hover)), var(--vr-shell-bg);
    }
}

/* The edge shadow only while columns can scroll under the pinned one, i.e. below the 1,360px of columns. */
@container vr-grid (min-width: 760px) and (max-width: 1359.98px) {
    .vr-applist .rz-grid-table .vr-col-actions { box-shadow: var(--vr-pin-shadow); }
}

/* Card layout: no header row (so no sorting here), each row a two-column card. */
@container vr-grid (max-width: 759.98px) {
    .vr-applist .rz-grid-table,
    .vr-applist .rz-grid-table tbody {
        display: block;
    }

    .vr-applist .rz-grid-table colgroup,
    .vr-applist .rz-grid-table thead {
        display: none;
    }

    .vr-applist .rz-grid-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        padding: 16px 18px;
        border-bottom: 1px solid var(--vr-border);
    }

    .vr-applist .rz-grid-table tbody tr:nth-child(even) { background: var(--vr-grid-stripe); }
    .vr-applist .rz-grid-table tbody tr:hover { background: var(--vr-grid-hover); }

    /* The cells drop the table look and the row paints the stripe and hover. .vr-cockpit.vr-applist outranks
       the stripe/hover cell rules above; !important only beats the width and right alignment Radzen writes
       inline on every cell. */
    .vr-cockpit.vr-applist .rz-grid-table tbody tr td {
        display: block;
        grid-column: 1 / -1;
        width: auto !important;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: left !important;
    }

    /* Same prefix as the reset above, so these placements outrank its full-width grid-column. */
    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-quote,
    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-premium,
    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-agent {
        grid-column: 1;
    }

    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-total,
    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-quoted {
        grid-column: 2;
    }

    .vr-cockpit.vr-applist .rz-grid-table tbody td.vr-col-status {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .vr-applist .vr-cell-label {
        display: block;
        margin-bottom: 2px;
        color: var(--vr-text-muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
    }

    .vr-applist .rz-grid-table tbody td.vr-col-actions .rz-cell-data { overflow: visible; }

    .vr-applist .vr-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
    }
}

/* ============================================================
   Application — Progress stepper + per-card progress bars
   Scoped to .ya-* to avoid collisions with other pages
   ============================================================ */

.ya-stepper {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    margin-bottom: 1.25rem;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

.ya-step {
    flex: 1 1 0;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    transition: background 0.2s ease;
}

.ya-step.is-complete {
    background: rgba(76, 175, 80, 0.06);
}

.ya-step.is-active {
    background: rgba(242, 183, 53, 0.08);
    border: 1.5px solid #F2B735;
    padding: 8.5px 12.5px;
}

.ya-step-chip {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ya-step.is-complete .ya-step-chip {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
}

.ya-step.is-active .ya-step-chip {
    background: rgba(242, 183, 53, 0.15);
    color: #F2B735;
    border: 1.5px solid #F2B735;
}

.ya-step.is-pending .ya-step-chip {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--card-border);
}

.ya-step-chip .material-symbols-rounded {
    font-size: 18px;
}

.ya-step-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ya-step-eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.ya-step.is-complete .ya-step-eyebrow {
    color: var(--success-soft-text);
}

.ya-step.is-active .ya-step-eyebrow {
    color: #F2B735;
}

.ya-step-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ya-step.is-pending .ya-step-name {
    color: var(--muted);
}

/* Connector = muted track + animated fill. Complete sweeps full green; partial (previous
   step done, next one not) half-fills amber to mark the workflow frontier. Fills sweep in
   left→right on load with a small per-connector stagger. */
.ya-step-connector {
    flex: 0 0 18px;
    height: 3px;
    align-self: center;
    background: var(--card-border);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.ya-step-connector::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
}

.ya-step-connector.is-complete::after {
    background: var(--success-soft-text);
    animation: ya-connector-sweep 0.45s ease-out forwards;
}

.ya-step-connector.is-partial::after {
    background: #F2B735;
    animation: ya-connector-sweep-half 0.45s ease-out forwards;
}

/* Steps and connectors alternate as stepper children, so connectors sit at 2/4/6/8. */
.ya-stepper > .ya-step-connector:nth-child(2)::after { animation-delay: 0.05s; }
.ya-stepper > .ya-step-connector:nth-child(4)::after { animation-delay: 0.15s; }
.ya-stepper > .ya-step-connector:nth-child(6)::after { animation-delay: 0.25s; }
.ya-stepper > .ya-step-connector:nth-child(8)::after { animation-delay: 0.35s; }

@keyframes ya-connector-sweep {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes ya-connector-sweep-half {
    from { transform: scaleX(0); }
    to   { transform: scaleX(0.5); }
}

/* Active step: soft amber ring pulsing out of the chip. */
.ya-step.is-active .ya-step-chip {
    animation: ya-step-pulse 2.4s ease-in-out infinite;
}

@keyframes ya-step-pulse {
    0%       { box-shadow: 0 0 0 0 rgba(242, 183, 53, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(242, 183, 53, 0); }
    100%     { box-shadow: 0 0 0 0 rgba(242, 183, 53, 0.35); }
}

/* Completed step: the check pops in with a small overshoot. */
.ya-step.is-complete .ya-step-chip .material-symbols-rounded {
    animation: ya-check-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ya-check-pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Two-column layout: form on left, sticky rail on right */
.ya-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.ya-main { min-width: 0; }

.ya-rail {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ya-rail-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 6px 0;
}

.ya-nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ya-nav-card:hover {
    transform: translateY(-2px);
    border-color: #F2B735;
    box-shadow: 0 10px 22px rgba(242, 183, 53, 0.18);
}

.ya-nav-card.is-locked {
    cursor: not-allowed;
    opacity: 0.55;
}

.ya-nav-card.is-locked:hover {
    transform: none;
    border-color: var(--card-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ya-nav-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(242, 183, 53, 0.12);
    color: #F2B735;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ya-nav-card-icon .material-symbols-rounded { font-size: 20px; }

.ya-nav-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ya-nav-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
}

.ya-nav-card-state {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ya-nav-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.ya-nav-badge.is-success { background: var(--success-soft-bg);  color: var(--success-soft-text); }
.ya-nav-badge.is-info    { background: var(--primary-soft-bg);  color: var(--primary-soft-text); }
.ya-nav-badge.is-warning { background: var(--warning-soft-bg);  color: var(--warning-soft-text); }

.ya-nav-card-chevron {
    color: var(--muted);
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ya-nav-card:hover .ya-nav-card-chevron {
    transform: translateX(3px);
    color: var(--text-main);
}

.ya-nav-card.is-locked:hover .ya-nav-card-chevron {
    transform: none;
    color: var(--muted);
}

/* Rail nav-card active state (the card for the page the user is currently on) */
.ya-nav-card.is-active {
    border: 1.5px solid #F2B735;
    box-shadow: 0 10px 22px rgba(242, 183, 53, 0.22);
    background: linear-gradient(180deg, rgba(242, 183, 53, 0.06), transparent);
}

[data-theme="light"] .yacht-page .ya-nav-card.is-active {
    border-color: #D97706;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.18);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.05), #fff);
}

/* Operators — colored summary chips (Permanent / Temporary / Total / Flagged) */
.ya-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.ya-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    min-width: 140px;
}

.ya-summary-chip .material-symbols-rounded { font-size: 18px; }

.ya-summary-chip-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ya-summary-chip-value {
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-top: 2px;
}

.ya-summary-chip.is-primary {
    background: var(--primary-soft-bg);
    color: var(--primary-soft-text);
    border-color: rgba(33, 150, 243, 0.2);
}

.ya-summary-chip.is-warning {
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
    border-color: rgba(255, 152, 0, 0.2);
}

.ya-summary-chip.is-success {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
    border-color: rgba(76, 175, 80, 0.2);
}

.ya-summary-chip.is-danger {
    background: var(--danger-soft-bg);
    color: var(--danger-soft-text);
    border-color: rgba(244, 67, 54, 0.2);
}

/* Larger Yes/No pill for the Operators Q1 card (design spec) */
.ya-yesno.ya-yesno-lg .ya-yesno-btn {
    padding: 10px 28px;
    font-size: 13px;
}

/* Question prompt text rendered inside a section card */
.ya-question-text {
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Info note (used under quantity dropdowns) */
.ya-info-note {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(33, 150, 243, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.ya-info-note .material-symbols-rounded {
    color: var(--primary-soft-text);
    font-size: 16px;
    flex-shrink: 0;
}

[data-theme="light"] .yacht-page .ya-info-note {
    background: rgba(33, 150, 243, 0.06);
}

/* Crew table — captain pin + row accent + pills */
/* The crew table lives in the form column, which is only ~570px wide on a 1366
   screen once the 300px sidebar, page padding and the 340px rail are taken out.
   Eight columns could not fit that, so Role + Type fold under the name and the
   accident description under its badge, leaving five columns sized in percentages
   that total 100%. min-width is the floor below which they stop being readable and
   the wrapper scrolls instead. */
.ya-crew-grid-wrap {
    overflow-x: auto;
}

    .ya-crew-grid-wrap .rz-grid-table,
    .ya-crew-grid-wrap .rz-datatable-table {
        min-width: 560px;
    }

/* Stacked identity cell: name over its Role / Type badges. */
.ya-crew-identity,
.ya-crew-accident {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ya-crew-identity-name {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ya-crew-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Two pills share a narrow cell, so they run tighter than a standalone pill. */
    .ya-crew-badges .ya-pill {
        font-size: 10.5px;
        padding: 2px 7px;
        gap: 3px;
    }

    .ya-crew-badges .ya-pill .material-symbols-rounded {
        font-size: 12px;
    }

/* Long free text (experience, accident description) wraps rather than forcing the
   column wider — the whole point of the five-column layout. */
.ya-crew-grid-wrap .ya-crew-soft {
    display: block;
    overflow-wrap: anywhere;
}

/* Inline-edit cells now hold two controls each; keep them from colliding. */
.ya-crew-edit-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Accident answer in the crew grid (2026-10-19): compact Yes/No segmented toggle with nothing
   lit until answered, plus a "clear" link back to unanswered. */
.ya-crew-answer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Compound selectors so these beat the generic .ya-segmented rules declared later in this file. */
.ya-segmented.ya-crew-seg { margin-top: 0; padding: 2px; }

.ya-segmented.ya-crew-seg .ya-segmented-btn {
    min-width: 44px;
    padding: 5px 12px;
    font-size: 12px;
}

.ya-crew-clear {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: #F2B735;
    cursor: pointer;
}

[data-theme="light"] .yacht-page .ya-crew-clear { color: #B45309; }

/* "Not answered" reads as a gap, not a status: dashed outline on the muted pill. */
.ya-crew-accident .ya-pill.is-muted { border: 1px dashed var(--card-border); }

[data-theme="light"] .yacht-page .ya-crew-accident .ya-pill.is-muted { border-color: var(--muted); }

.ya-summary-chip.is-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    border-color: var(--card-border);
}

[data-theme="light"] .yacht-page .ya-summary-chip.is-muted { background: rgba(16, 24, 40, 0.04); }

.ya-captain-pin {
    color: #F2B735;
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}

.ya-captain-pin .material-symbols-rounded { font-size: 14px; }

[data-theme="light"] .yacht-page .ya-captain-pin { color: #D97706; }

.ya-crew-name {
    font-weight: 600;
    color: var(--text-main);
}

.ya-crew-soft {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.4;
}

.ya-tabular { font-variant-numeric: tabular-nums; }

/* Captain row accent — left border + subtle amber wash (global stylesheet, so
   match the Radzen-generated <tr> directly using the RowClass we emit) */
.ya-crew-row-captain > td {
    background: rgba(242, 183, 53, 0.05) !important;
    box-shadow: inset 3px 0 0 0 #F2B735;
}

[data-theme="light"] .yacht-page .ya-crew-row-captain > td {
    background: rgba(217, 119, 6, 0.04) !important;
    box-shadow: inset 3px 0 0 0 #D97706;
}

/* Compact soft-color pill used inside crew table columns */
.ya-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.ya-pill .material-symbols-rounded { font-size: 13px; }

.ya-pill.is-captain {
    background: rgba(242, 183, 53, 0.14);
    color: #F2B735;
}

[data-theme="light"] .yacht-page .ya-pill.is-captain {
    background: rgba(217, 119, 6, 0.10);
    color: #D97706;
}

.ya-pill.is-info    { background: var(--primary-soft-bg); color: var(--primary-soft-text); }
.ya-pill.is-success { background: var(--success-soft-bg); color: var(--success-soft-text); }
.ya-pill.is-warning { background: var(--warning-soft-bg); color: var(--warning-soft-text); }
.ya-pill.is-danger  { background: var(--danger-soft-bg);  color: var(--danger-soft-text); }
.ya-pill.is-muted   { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

[data-theme="light"] .yacht-page .ya-pill.is-muted {
    background: rgba(16, 24, 40, 0.06);
}

/* Save footer (right-aligned) */
.ya-save-footer {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
}

/* Back is the only action that leaves the page, so it anchors left and the forward
   actions (Save · Print Quote · Proceed) group on the right. Without this the Limits
   footer read as one undifferentiated row of buttons. */
.ya-save-footer .ya-footer-lead {
    margin-right: auto;
}

/* ---- Print Quote split button (Limits footer) ---- */

.ya-print-menu-wrap {
    position: relative;
    display: inline-flex;
}

.ya-print-caret {
    font-size: 17px;
    margin-left: 2px;
    margin-right: -4px;
    transition: transform 0.18s ease;
}

.ya-save-btn.is-menu-open .ya-print-caret {
    transform: rotate(180deg);
}

/* Sits above the catcher; the catcher sits above everything else in the footer. */
.ya-print-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.ya-print-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    z-index: 41;
    min-width: 260px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    animation: ya-print-menu-in 0.14s ease-out;
}

@keyframes ya-print-menu-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ya-print-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-main);
    font: 600 13px/1.3 inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    .ya-print-menu-item:hover {
        background: var(--primary-soft-bg);
        color: var(--primary-soft-text);
    }

    .ya-print-menu-item .material-symbols-rounded {
        font-size: 18px;
        color: var(--muted);
    }

    .ya-print-menu-item:hover .material-symbols-rounded {
        color: inherit;
    }

[data-theme="light"] .yacht-page .ya-print-menu {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

/* Animated three-state Save button */
.ya-save-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    min-height: 44px;
    padding: 11px 22px;
    background: linear-gradient(180deg, #F2B735 0%, #D97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(242, 183, 53, 0.28);
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

.ya-save-btn:hover:not(:disabled) { transform: translateY(-1px); }

.ya-save-btn:disabled { cursor: default; }

.ya-save-progress-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
    z-index: -1;
    /* Keep in step with the Task.Delay(600) save floor in the yacht pages' Submit handlers. */
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ya-save-btn.is-saving .ya-save-progress-fill { width: 100%; }

.ya-save-btn.is-saved {
    background: linear-gradient(180deg, #5CBF60 0%, #3b9a3f 100%);
    box-shadow: 0 8px 18px rgba(76, 175, 80, 0.35);
}

.ya-save-btn.is-saved .ya-save-progress-fill {
    width: 100%;
    background: transparent;
}

.ya-save-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ya-save-label .material-symbols-rounded { font-size: 17px; }

.ya-save-btn .ya-save-label-saving,
.ya-save-btn .ya-save-label-saved {
    position: absolute;
    opacity: 0;
    transform: translateY(6px);
}

.ya-save-btn.is-saving .ya-save-label-default { opacity: 0; transform: translateY(-6px); }
.ya-save-btn.is-saving .ya-save-label-saving  { opacity: 1; transform: translateY(0); }
.ya-save-btn.is-saved  .ya-save-label-default { opacity: 0; transform: translateY(-6px); }
.ya-save-btn.is-saved  .ya-save-label-saved   { opacity: 1; transform: translateY(0); }

.ya-save-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ya-save-spin 0.7s linear infinite;
}

@keyframes ya-save-spin { to { transform: rotate(360deg); } }

/* Inline "Application saved" toast, sits above the footer */
.ya-save-toast {
    position: absolute;
    right: 20px;
    bottom: calc(100% + 14px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    z-index: 5;
}

.ya-save-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* "Save before printing" hint. Sits at the left of the save footer (margin-right:auto
   keeps the buttons right-aligned) and explains a disabled Print Quote, whose title
   attribute alone is easy to miss. */
/* Own full-width line ABOVE the button row (order:-1 + 100% basis against the footer's
   flex-wrap), so a sentence of explanation never squeezes the buttons. */
.ya-print-hint {
    flex: 1 0 100%;
    order: -1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
}

    .ya-print-hint .material-symbols-rounded { font-size: 15px; }

.ya-save-toast .material-symbols-rounded { font-size: 16px; }

/* Yes/No pill toggle */
.ya-yesno {
    display: inline-flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 3px;
    margin-top: 6px;
    min-height: 40px;
    min-width: 220px;
}

.ya-yesno-btn {
    flex: 1;
    min-width: 80px;
    padding: 7px 18px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.ya-yesno-btn:hover:not(.is-active) {
    color: var(--text-main);
}

.ya-yesno-btn.is-active {
    background: linear-gradient(180deg, #F2B735 0%, #D97706 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(242, 183, 53, 0.22);
}

/* Final Premiums card (rail) — a three-column ledger of coverage · limit · premium, closed by
   the total and the rate-on-hull chip. Persistent on every yacht workflow page.
   The two numeric tracks are fixed widths because each row is its own grid container: `auto`
   tracks would be measured per row and the columns would stop lining up down the card. */
.ya-premiums {
    --ya-prem-limit-col: 66px;
    --ya-prem-value-col: 64px;
    background: var(--card-bg);
    border: 1.5px solid #F2B735;
    border-radius: 18px;
    padding: 16px 18px 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .ya-premiums {
    border-color: #D97706;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.12);
}

.ya-premiums-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 10px;
    margin: -6px -8px 12px;
    background: rgba(242, 183, 53, 0.18);
    color: #F2B735;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

[data-theme="light"] .ya-premiums-head {
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
}

.ya-premiums-head .material-symbols-rounded {
    font-size: 16px;
    font-variation-settings: 'FILL' 1;
}

.ya-premiums-rows {
    display: flex;
    flex-direction: column;
}

/* Column key. Only emitted (and only useful) when a visible row can fill the limit column,
   which is the same condition that puts .has-limits on the container. */
.ya-premiums-colhead {
    display: grid;
    grid-template-columns: 1fr var(--ya-prem-limit-col) var(--ya-prem-value-col);
    gap: 8px;
    padding-bottom: 5px;
    margin-bottom: 3px;
    border-bottom: 1px solid var(--card-border);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--muted);
}

.ya-premiums-colhead span + span {
    text-align: right;
}

.ya-premiums-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
}

.ya-premiums-rows.has-limits .ya-premiums-row {
    grid-template-columns: 1fr var(--ya-prem-limit-col) var(--ya-prem-value-col);
    gap: 8px;
}

/* Nothing to align the middle cell to, so remove it from the grid outright — an empty item
   would still hold its track (and the gap beside it) open. */
.ya-premiums-rows:not(.has-limits) .ya-premiums-limit {
    display: none;
}

.ya-premiums-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.25;
}

/* Limits sit a tier below the premiums: smaller, muted, no accent. Their job is to explain
   what each premium was priced on, not to compete with it. */
.ya-premiums-limit {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    text-align: right;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ya-premiums-limit.is-layer {
    cursor: help;
}

.ya-premiums-value {
    font-size: 12.5px;
    font-weight: 700;
    color: #F2B735;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: var(--ya-prem-value-col);
}

[data-theme="light"] .ya-premiums-value {
    color: #D97706;
}

/* Subtotal — the coverages summed, between them and the flat charges below (surveys, policy
   fee). A hairline over it, the same tracks as the rows above so its value lines up with
   theirs, and a weight between a line and the total. */
.ya-premiums-row.is-subtotal {
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px solid var(--card-border);
}

.ya-premiums-row.is-subtotal .ya-premiums-label {
    font-weight: 900;
}

.ya-premiums-row.is-subtotal .ya-premiums-value {
    font-size: 13.5px;
    font-weight: 800;
}

/* The total steps back out to two columns: its value is set 18px and would overflow the
   fixed premium track, and it has no limit of its own to sit under the limit column. */
.ya-premiums-row.is-total,
.ya-premiums-rows.has-limits .ya-premiums-row.is-total {
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1.5px solid var(--text-main);
}

/* Rate on hull — a percentage of the hull limit, so it reads as a property of the total
   rather than another line being added to it. Chip, not row. */
.ya-premiums-rate {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.ya-premiums-rate-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(242, 183, 53, 0.14);
    border: 1px solid rgba(242, 183, 53, 0.28);
}

.ya-premiums-rate-key {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
}

.ya-premiums-rate-val {
    font-size: 11.5px;
    font-weight: 800;
    color: #F2B735;
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .ya-premiums-rate-chip {
    background: rgba(217, 119, 6, 0.10);
    border-color: rgba(217, 119, 6, 0.24);
}

[data-theme="light"] .ya-premiums-rate-val {
    color: #D97706;
}

.ya-premiums-row.is-total .ya-premiums-label {
    font-size: 13px;
    font-weight: 900;
}

.ya-premiums-row.is-total .ya-premiums-value {
    font-size: 18px;
    font-weight: 900;
}

.ya-premiums-pending {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 4px 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.ya-premiums-pending .material-symbols-rounded {
    font-size: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    color: #F2B735;
}

[data-theme="light"] .ya-premiums-pending .material-symbols-rounded {
    color: #D97706;
}

@media (max-width: 1100px) {
    .ya-layout { grid-template-columns: 1fr; }
    .ya-rail { position: static; }
}

/* Attention pulse on the first field that failed validation — applied briefly by
   validation-scroll.js after an invalid submit. Deliberately NOT scoped to .yacht-page
   so dialog forms get it too; the danger red is the same in both themes. */
@keyframes optima-error-flash {
    0%   { box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.5); }
    100% { box-shadow: 0 0 0 3px rgba(244, 67, 54, 0); }
}

.optima-field-error-flash {
    animation: optima-error-flash 1.5s ease-out 1;
    border-radius: 8px;
}

/* Quote-required fields (spec 2026-10-27): a QUOTE chip on every field the premium calculation
   needs (YachtQuoteChip), a green ring on the control once the field is filled
   (YachtQuoteField.ColumnClass), and a brighter pulse on every save (validation-scroll.js
   optimaPulseQuoteFields puts .ya-quote-pulse on the page or dialog root).
   - The ring is !important because the global .rz-dropdown rule near the top of this file sets
     box-shadow: none !important; at equal importance this selector's higher specificity wins.
   - An !important box-shadow also outranks keyframes, so the pulse animates a registered number
     (--ya-quote-boost, 1 -> 0) that the ring's own declaration reads, not box-shadow itself.
   - Skipped: a disabled control (the dropdown behind a ticked "Other"), a focused one (the
     theme's focus ring shows while typing), anything under .ya-booked-lock (booked pages are
     inert but their controls are not disabled), and the pulse under reduced motion.
   - Not scoped to .yacht-page, so dialogs get it; the ring colour per theme is --ya-q-rgb.
   Checked in headless Chrome against mock Radzen markup in the 2026-10-27 code review. */
@property --ya-quote-boost {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

.ya-quote-chip {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
    vertical-align: middle;
    color: #9e9e9e; /* not --muted: #888 on this tint is ~3.7:1, under WCAG AA for small text */
    background: rgba(255, 255, 255, 0.07);
    cursor: help;
    transition: color .25s, background-color .25s;
}

.ya-quote-chip.is-filled {
    color: var(--success-soft-text);
    background: var(--success-soft-bg);
}

[data-theme="light"] .ya-quote-chip {
    color: #475569;
    background: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .ya-quote-chip.is-filled {
    color: var(--success-soft-text);
    background: var(--success-soft-bg);
}

.ya-quote-field {
    --ya-q-rgb: 76, 175, 80;
}

[data-theme="light"] .ya-quote-field {
    --ya-q-rgb: 4, 120, 87;
}

/* Filled ring for the QUOTE and BOOK fields (YATE-201): dropdowns, numerics, text boxes, text areas and date pickers. */
.ya-quote-field.is-filled:not(.ya-booked-lock *) :is(.rz-dropdown, .rz-numeric, .rz-textbox, .rz-textarea, .rz-datepicker):not(.rz-state-disabled):not(:focus-within) {
    box-shadow:
        0 0 0 calc(1px + 2px * var(--ya-quote-boost, 0)) rgba(var(--ya-q-rgb), calc(0.45 + 0.10 * var(--ya-quote-boost, 0))),
        0 0 calc(8px + 8px * var(--ya-quote-boost, 0)) rgba(var(--ya-q-rgb), calc(0.20 + 0.15 * var(--ya-quote-boost, 0))) !important;
}

@keyframes ya-quote-pulse {
    from { --ya-quote-boost: 1; }
    to   { --ya-quote-boost: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .ya-quote-pulse .ya-quote-field.is-filled:not(.ya-booked-lock *) :is(.rz-dropdown, .rz-numeric, .rz-textbox, .rz-textarea, .rz-datepicker):not(.rz-state-disabled) {
        animation: ya-quote-pulse 2.4s ease-out 1;
    }
}

/* Booked policy: nothing left to fill, so no chips (the ring rules above already skip it). */
.ya-booked-lock .ya-quote-chip {
    display: none;
}

/* The LOA feet/inches cells are 120px wide, so the chip never fits beside its label there: put it
   on its own line, flush left, instead of letting it wrap with a stray indent. */
.ya-loa-callout-grid .ya-quote-chip {
    display: flex;
    width: max-content;
    margin: 2px 0 4px;
}

/* The rule above would otherwise beat the generic booked rule (same 0,2,0, declared later):
   restate the booked hiding at 0,3,0 so LOA chips stay hidden on a booked policy. */
.ya-booked-lock .ya-loa-callout-grid .ya-quote-chip {
    display: none;
}

/* Light theme: deeper amber (see the theming rules — #F2B735 lacks contrast on white). */
[data-theme="light"] .yacht-page .ya-step-connector.is-partial::after {
    background: #D97706;
}

[data-theme="light"] .yacht-page .ya-step.is-active .ya-step-chip {
    animation-name: ya-step-pulse-light;
}

@keyframes ya-step-pulse-light {
    0%       { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.30); }
    50%      { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
    100%     { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.30); }
}

/* Respect the OS-level reduced-motion preference: decorative motion collapses to its
   end state; the informational fills stay visible, just without the sweep. */
@media (prefers-reduced-motion: reduce) {
    .ya-step-connector.is-complete::after { animation: none; transform: scaleX(1); }
    .ya-step-connector.is-partial::after { animation: none; transform: scaleX(0.5); }
    .ya-step.is-active .ya-step-chip { animation: none; }
    .ya-step.is-complete .ya-step-chip .material-symbols-rounded { animation: none; }
    .ya-nav-card:hover .ya-nav-card-chevron { transform: none; }
    .optima-field-error-flash { animation: none; }
    .ya-save-progress-fill { transition: none; }
}

/* Per-section completion pill (top-right of each section header) */
.ya-section-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.ya-section-pill .material-symbols-rounded { font-size: 14px; }

.ya-section-pill.is-complete {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
}

.ya-section-pill.is-progress {
    background: rgba(242, 183, 53, 0.12);
    color: #F2B735;
}

/* Per-section progress bar at the bottom of each card */
.ya-section-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--card-border);
}

.ya-section-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.ya-section-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #F2B735 0%, #D97706 100%);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.ya-section-progress-fill.is-complete {
    background: linear-gradient(90deg, var(--success-soft-text) 0%, #2E7D32 100%);
}

.ya-section-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.ya-section-progress-count {
    color: var(--text-main);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ya-section-progress-label {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10.5px;
}

[data-theme="light"] .ya-section-progress-track {
    background: rgba(16, 24, 40, 0.08);
}

/* Card progress bar */
.ya-card-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 0.75rem;
}

.ya-card-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.ya-card-progress-count {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.ya-card-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.ya-card-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #F2B735 0%, #D97706 100%);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.ya-card-progress-fill.is-complete {
    background: linear-gradient(90deg, var(--success-soft-text) 0%, #2E7D32 100%);
}

/* Nav card status pill (top-right) */
.ya-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: auto;
}

.ya-card-status .material-symbols-rounded { font-size: 13px; }

.ya-card-status.is-complete {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
}

.ya-card-status.is-pending {
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
}

/* Light theme adjustments */
[data-theme="light"] .ya-stepper {
    background: #fff;
    border-color: #e7edf5;
}

[data-theme="light"] .ya-card-progress-track {
    background: rgba(16, 24, 40, 0.08);
}

/* ============================================================
   Application page — light-theme token overrides
   Scoped to .yacht-page so the rest of the shared shell isn't touched.
   These override the dark defaults declared at :root so section cards,
   Yes/No pill toggles, save footer, stepper, rail cards and icons all
   pick up light values automatically.
   ============================================================ */
[data-theme="light"] .yacht-page {
    --page-bg: #f4f7fb;
    --card-bg: #ffffff;
    --card-border: #e7edf5;
    --muted: #667085;
    --text-main: #243447;
    --grid-header: #f8fafc;
    --grid-border: #e7edf5;
    --primary-soft-bg: rgba(33, 150, 243, 0.10);
    --primary-soft-text: #175cd3;
    --warning-soft-bg: rgba(234, 148, 12, 0.12);
    --warning-soft-text: #B45309;
    --success-soft-bg: rgba(16, 185, 129, 0.12);
    --success-soft-text: #047857;
    --danger-soft-bg: rgba(244, 67, 54, 0.10);
    --danger-soft-text: #b42318;
}

[data-theme="light"] .yacht-page .section-title {
    color: var(--text-main);
}

/* Elevated / translucent backgrounds that were tuned for the dark canvas */
[data-theme="light"] .yacht-page .ya-card-progress-track,
[data-theme="light"] .yacht-page .ya-section-progress-track {
    background: rgba(16, 24, 40, 0.08);
}

[data-theme="light"] .yacht-page .ya-nav-card {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

[data-theme="light"] .yacht-page .ya-nav-card:hover {
    border-color: #D97706;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.18);
}

[data-theme="light"] .yacht-page .ya-save-footer {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

/* Amber accent pieces — use the deeper amber for contrast on white */
[data-theme="light"] .yacht-page .section-icon,
[data-theme="light"] .yacht-page .ya-section-pill.is-progress,
[data-theme="light"] .yacht-page .ya-step.is-active .ya-step-chip,
[data-theme="light"] .yacht-page .ya-step.is-active .ya-step-eyebrow,
[data-theme="light"] .yacht-page .ya-nav-card-icon {
    color: #D97706;
}

[data-theme="light"] .yacht-page .section-icon {
    background: rgba(217, 119, 6, 0.10);
}

[data-theme="light"] .yacht-page .ya-section-pill.is-progress {
    background: rgba(217, 119, 6, 0.10);
}

[data-theme="light"] .yacht-page .ya-step.is-active {
    background: rgba(217, 119, 6, 0.06);
}

[data-theme="light"] .yacht-page .ya-step.is-active .ya-step-chip {
    background: rgba(217, 119, 6, 0.12);
    border-color: #D97706;
}

[data-theme="light"] .yacht-page .ya-nav-card-icon {
    background: rgba(217, 119, 6, 0.10);
}

/* Yes/No pill — inactive side text; active side keeps amber gradient + dark text */
[data-theme="light"] .yacht-page .ya-yesno-btn:hover:not(.is-active) {
    color: var(--text-main);
}

/* Save button — darken the shadow halo a touch and strengthen "Saving" overlay on white */
[data-theme="light"] .yacht-page .ya-save-btn {
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

[data-theme="light"] .yacht-page .ya-save-btn .ya-save-progress-fill {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .yacht-page .ya-save-btn.is-saved {
    box-shadow: 0 8px 18px rgba(4, 120, 87, 0.25);
}

/* Inline saved-toast — the soft success bg via token is already OK;
   the dashed and blur edges just need a stronger border on white. */
[data-theme="light"] .yacht-page .ya-save-toast {
    border-color: rgba(4, 120, 87, 0.25);
}

/* ============================================================
   Vessel / Tender / Trailer — shared add-ons
   ============================================================ */

/* Label + yes/no pill group wrapper (replaces Radzen radio list for Yes/No questions) */
.ya-field-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ya-field-block .rz-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0;
}

/* Segmented control (Tender 0/1/2, Trailer No/Yes) */
.ya-segmented {
    display: inline-flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    margin-top: 6px;
}

.ya-segmented-btn {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 8px 24px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.18s ease, color 0.18s ease;
}

.ya-segmented-btn:hover:not(.is-active) {
    color: var(--text-main);
}

.ya-segmented-btn.is-active {
    background: linear-gradient(180deg, #F2B735 0%, #D97706 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(242, 183, 53, 0.22);
}

.ya-segmented-icon {
    font-size: 14px;
}

.ya-segmented-compact .ya-segmented-btn {
    min-width: 70px;
}

/* Spacer variant of the existing info note */
.ya-info-note-spaced {
    margin-top: 14px;
}

/* Amber LOA callout on the Vessel page */
.ya-loa-callout {
    padding: 14px;
    background: rgba(242, 183, 53, 0.05);
    border: 1px solid rgba(242, 183, 53, 0.33);
    border-radius: 12px;
    margin-bottom: 16px;
}

.ya-loa-callout-eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #F2B735;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ya-loa-callout-grid {
    display: grid;
    grid-template-columns: 120px 120px minmax(0, 1fr);
    gap: 14px;
    align-items: end;
}

.ya-loa-readout {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 9px 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ya-loa-readout .material-symbols-rounded {
    color: #F2B735;
    font-size: 17px;
}

.ya-loa-readout-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ya-loa-readout-value {
    flex: 1;
    text-align: right;
    color: var(--text-main);
    font-weight: 700;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    .ya-loa-callout-grid {
        grid-template-columns: 1fr;
    }
}

/* Engines callout (YATE-211): same box as the LOA one; the motor model row sits under its grid */
.ya-engine-model {
    margin-top: 12px;
}

/* Light-theme tuning for LOA callout + eyebrow + readout */
[data-theme="light"] .yacht-page .ya-loa-callout {
    background: rgba(217, 119, 6, 0.05);
    border-color: rgba(217, 119, 6, 0.30);
}

[data-theme="light"] .yacht-page .ya-loa-callout-eyebrow,
[data-theme="light"] .yacht-page .ya-loa-readout .material-symbols-rounded {
    color: #D97706;
}

/* Inherited-home-port callout used inside each Tender card */
.ya-inherited-port-callout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    background: rgba(242, 183, 53, 0.05);
    border: 1px solid rgba(242, 183, 53, 0.33);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.ya-inherited-port-callout .material-symbols-rounded {
    color: #F2B735;
    font-size: 15px;
    flex-shrink: 0;
}

[data-theme="light"] .yacht-page .ya-inherited-port-callout {
    background: rgba(217, 119, 6, 0.04);
    border-color: rgba(217, 119, 6, 0.30);
}

[data-theme="light"] .yacht-page .ya-inherited-port-callout .material-symbols-rounded {
    color: #D97706;
}

/* ============================================================
   Tender/Trailer dialogs — custom chrome (uses ShowTitle=false)
   ============================================================ */

/* Zero-out Radzen dialog chrome when we supply our own — applied via
   DialogOptions.CssClass = "ya-dialog-panel". Whether Radzen applies the
   class to the outer wrapper or the .rz-dialog element itself, both
   selector variants match so the chrome is flattened in either case. */
.ya-dialog-panel.rz-dialog,
.ya-dialog-panel .rz-dialog {
    padding: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

.ya-dialog-panel .rz-dialog-titlebar,
.ya-dialog-panel .rz-dialog-title,
.ya-dialog-panel.rz-dialog .rz-dialog-titlebar {
    display: none !important;
}

.ya-dialog-panel .rz-dialog-content,
.ya-dialog-panel.rz-dialog .rz-dialog-content {
    padding: 0 !important;
    background: transparent !important;
}

[data-theme="light"] .ya-dialog-panel.rz-dialog,
[data-theme="light"] .ya-dialog-panel .rz-dialog {
    background: #fff !important;
    border-color: rgba(16, 24, 40, 0.08) !important;
    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.14), 0 6px 16px rgba(16, 24, 40, 0.07) !important;
}

/* ---------- Resizable / movable dialogs (YATE-200; wwwroot/js/yacht-dialog-resize.js) ----------
   The script adds .ya-dialog-resizable to the Radzen frame (.rz-dialog) and appends the handles and the size
   readout to it — outside .yacht-page, so colours are set per theme here instead of through the page tokens.
   Nothing here layers above the frame: Blazor's reconnect dialog (z-index 2000) stays on top. */
.ya-dialog-resizable {
    --ya-resize-accent: #F2B735;
}

[data-theme="light"] .ya-dialog-resizable {
    --ya-resize-accent: #D97706;
}

.ya-dialog-handle {
    position: absolute;
    z-index: 5;
    touch-action: none;
}

.ya-dialog-handle.is-e { top: 22px; right: 0; bottom: 22px; width: 8px; cursor: ew-resize; }
.ya-dialog-handle.is-s { left: 22px; right: 22px; bottom: 0; height: 8px; cursor: ns-resize; }
.ya-dialog-handle.is-se { right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; }

.ya-dialog-handle.is-e::after,
.ya-dialog-handle.is-s::after {
    content: "";
    position: absolute;
    border-radius: 2px;
    background: var(--ya-resize-accent);
    opacity: 0;
    transition: opacity .15s ease;
}

.ya-dialog-handle.is-e::after { top: 0; bottom: 0; right: 2px; width: 2px; }
.ya-dialog-handle.is-s::after { left: 0; right: 0; bottom: 2px; height: 2px; }

.ya-dialog-handle.is-e:hover::after,
.ya-dialog-handle.is-s:hover::after,
.ya-dialog-handle.is-active::after {
    opacity: .9;
}

/* The corner grip: three diagonal accent ticks. */
.ya-dialog-handle.is-se::before {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 11px;
    height: 11px;
    background: linear-gradient(135deg,
        transparent 0 44%, var(--ya-resize-accent) 44% 52%,
        transparent 52% 63%, var(--ya-resize-accent) 63% 71%,
        transparent 71% 82%, var(--ya-resize-accent) 82% 90%, transparent 90%);
    opacity: .55;
    transition: opacity .15s ease;
}

.ya-dialog-handle.is-se:hover::before,
.ya-dialog-handle.is-se.is-active::before {
    opacity: 1;
}

.ya-dialog-size-readout {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 14px;
    z-index: 6;
    padding: 3px 9px;
    border-radius: 999px;
    font: 600 11px/1.4 Inter, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    color: #E6EDF7;
    background: rgba(13, 20, 33, .92);
    border: 1px solid var(--ya-resize-accent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: translate(-50%, 4px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

[data-theme="light"] .ya-dialog-size-readout {
    color: #101828;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
}

.ya-dialog-size-readout.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ya-dialog-movable {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.ya-dialog-movable :is(button, a, input, select, textarea) {
    cursor: pointer;
}

body.ya-dialog-dragging,
body.ya-dialog-dragging * {
    user-select: none !important;
}

body.ya-dialog-dragging.is-moving,
body.ya-dialog-dragging.is-moving * {
    cursor: grabbing !important;
}

body.ya-dialog-dragging.is-resizing-v,
body.ya-dialog-dragging.is-resizing-v * {
    cursor: ns-resize !important;
}

/* A sized frame: the dialog fills it, header and footer keep their height, the body takes the rest. */
.rz-dialog.ya-dialog-sized .rz-dialog-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rz-dialog.ya-dialog-sized .ya-tt-dialog {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.rz-dialog.ya-dialog-sized .ya-tt-dialog-header,
.rz-dialog.ya-dialog-sized .ya-tt-dialog-footer {
    flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
    .ya-dialog-handle::before,
    .ya-dialog-handle::after,
    .ya-dialog-size-readout {
        transition: none;
    }
}

/* ---------- TenderTrailerDialog — indigo/purple header ---------- */
.ya-tt-dialog {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-main);
}

/* Brand amber band, identical in both themes.
   INK IS DARK ON PURPOSE — do not "restore" white here. Amber is a light
   colour: white on #F2B735 is 1.8:1 and on #D97706 is 3.2:1, both failing
   AA, while #1a1a1a scores 9.5:1 and 5.4:1. Every overlay in this header
   (icon badge, close button) is therefore a black tint, not a white one.
   Same reasoning as .vr-seg-chip.on. The destructive sibling
   .ya-dtt-dialog-header stays red and keeps its white ink — that band is
   dark enough to carry it. */
.ya-tt-dialog-header {
    background: linear-gradient(135deg, #F2B735 0%, #D97706 100%);
    color: #1a1a1a;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ya-tt-dialog-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ya-tt-dialog-header-icon .material-symbols-rounded {
    font-size: 24px;
}

.ya-tt-dialog-header-text {
    flex: 1;
    min-width: 0;
}

/* 0.9, not 0.85: at 11px this is small text needing 4.5:1, and 0.85 lands
   at 4.35:1 against the dark end of the gradient. 0.9 gives 4.8:1. */
.ya-tt-dialog-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.9;
    text-transform: uppercase;
}

.ya-tt-dialog-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-top: 2px;
}

.ya-tt-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #1a1a1a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ya-tt-dialog-close:hover { background: rgba(0, 0, 0, 0.18); }

.ya-tt-dialog-close .material-symbols-rounded { font-size: 18px; }

.ya-tt-dialog-body {
    padding: 28px 30px 24px;
}

.ya-tt-dialog-heading {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.ya-tt-dialog-description {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 22px;
    line-height: 1.5;
}

.ya-tt-dialog-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.ya-tt-dialog-choice {
    flex: 1;
    max-width: 240px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ya-tt-dialog-choice:hover:not(.is-selected) {
    border-color: rgba(255, 255, 255, 0.25);
}

.ya-tt-dialog-choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ya-tt-dialog-choice.is-success .ya-tt-dialog-choice-icon { color: var(--success-soft-text); }
.ya-tt-dialog-choice.is-danger  .ya-tt-dialog-choice-icon { color: var(--danger-soft-text); }

.ya-tt-dialog-choice-icon .material-symbols-rounded { font-size: 22px; }

.ya-tt-dialog-choice-label {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--text-main);
}

.ya-tt-dialog-choice-hint {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
}

.ya-tt-dialog-choice.is-selected.is-success {
    border: 2px solid var(--success-soft-text);
    background: rgba(76, 175, 80, 0.14);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.13);
}

.ya-tt-dialog-choice.is-selected.is-success .ya-tt-dialog-choice-icon {
    background: var(--success-soft-text);
    color: #fff;
}

.ya-tt-dialog-choice.is-selected.is-success .ya-tt-dialog-choice-label {
    color: var(--success-soft-text);
}

.ya-tt-dialog-choice.is-selected.is-danger {
    border: 2px solid var(--danger-soft-text);
    background: rgba(244, 67, 54, 0.14);
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.13);
}

.ya-tt-dialog-choice.is-selected.is-danger .ya-tt-dialog-choice-icon {
    background: var(--danger-soft-text);
    color: #fff;
}

.ya-tt-dialog-choice.is-selected.is-danger .ya-tt-dialog-choice-label {
    color: var(--danger-soft-text);
}

.ya-tt-dialog-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(244, 67, 54, 0.10);
    border: 1px solid rgba(244, 67, 54, 0.33);
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

.ya-tt-dialog-warning .material-symbols-rounded {
    color: var(--danger-soft-text);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ya-tt-dialog-warning strong { color: var(--text-main); }

.ya-tt-dialog-footer {
    padding: 18px 30px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ya-tt-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ya-tt-dialog-btn:hover:not(.is-disabled) { transform: translateY(-1px); }

.ya-tt-dialog-btn .material-symbols-rounded { font-size: 17px; }

.ya-tt-dialog-btn.is-ghost {
    background: transparent;
    border-color: var(--card-border);
    color: var(--muted);
}

.ya-tt-dialog-btn.is-ghost:hover { color: var(--text-main); }

.ya-tt-dialog-btn.is-primary {
    background: linear-gradient(180deg, #F2B735 0%, #D97706 100%);
    color: #1a1a1a;
    box-shadow: 0 8px 18px rgba(242, 183, 53, 0.28);
}

.ya-tt-dialog-btn.is-danger {
    background: linear-gradient(180deg, #F44336 0%, #b42318 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(244, 67, 54, 0.28);
}

.ya-tt-dialog-btn.is-danger.is-disabled {
    background: #333;
    color: var(--muted);
    box-shadow: none;
    cursor: not-allowed;
}

[data-theme="light"] .yacht-page .ya-tt-dialog-btn.is-danger.is-disabled,
[data-theme="light"] .ya-tt-dialog-btn.is-danger.is-disabled {
    background: #d7dfe9;
    color: #667085;
}

[data-theme="light"] .ya-tt-dialog,
[data-theme="light"] .ya-dtt-dialog {
    color: #243447;
}

[data-theme="light"] .ya-tt-dialog-heading {
    color: #243447;
}

[data-theme="light"] .ya-tt-dialog-description,
[data-theme="light"] .ya-tt-dialog-choice-hint,
[data-theme="light"] .ya-tt-dialog-warning {
    color: #667085;
}

[data-theme="light"] .ya-tt-dialog-warning strong {
    color: #243447;
}

[data-theme="light"] .ya-tt-dialog-choice {
    background: #fff;
    border-color: #e7edf5;
}

[data-theme="light"] .ya-tt-dialog-choice:hover:not(.is-selected) {
    border-color: rgba(16, 24, 40, 0.16);
}

[data-theme="light"] .ya-tt-dialog-choice-icon {
    background: #f4f7fb;
}

[data-theme="light"] .ya-tt-dialog-choice-label {
    color: #243447;
}

[data-theme="light"] .ya-tt-dialog-footer {
    border-top-color: rgba(231, 237, 245, 0.7);
}

[data-theme="light"] .ya-tt-dialog-btn.is-ghost {
    border-color: #e7edf5;
    color: #475467;
}

[data-theme="light"] .ya-tt-dialog-btn.is-ghost:hover {
    color: #243447;
}

[data-theme="light"] .ya-tt-dialog-btn.is-primary {
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

[data-theme="light"] .ya-tt-dialog-btn.is-danger {
    box-shadow: 0 8px 18px rgba(180, 35, 24, 0.24);
}

/* ---------- TenderTrailerDialog v2 — two separate questions ---------- */
.ya-tt-question { margin-bottom: 16px; }

.ya-tt-question-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.ya-tt-question-onfile {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.ya-tt-dialog-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--primary-soft-bg);
    border: 1px solid rgba(33, 150, 243, 0.25);
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

.ya-tt-dialog-note .material-symbols-rounded {
    color: var(--primary-soft-text);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Dialogs render outside .yacht-page, so light-theme colors need explicit overrides
   (same pattern as the existing [data-theme="light"] .ya-tt-dialog rules above). */
[data-theme="light"] .ya-tt-question-label { color: #243447; }
[data-theme="light"] .ya-tt-question-onfile,
[data-theme="light"] .ya-tt-dialog-note { color: #475467; }

/* ---------- DeleteTenderTrailerDialog — red header + table ---------- */
.ya-dtt-dialog {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-main);
}

.ya-dtt-dialog-header {
    background: linear-gradient(135deg, #F44336 0%, #b42318 100%);
    color: #fff;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ya-dtt-dialog-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ya-dtt-dialog-header-icon .material-symbols-rounded { font-size: 24px; }

.ya-dtt-dialog-header-text {
    flex: 1;
    min-width: 0;
}

.ya-dtt-dialog-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.9;
    text-transform: uppercase;
}

.ya-dtt-dialog-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-top: 2px;
}

.ya-dtt-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ya-dtt-dialog-close:hover { background: rgba(255, 255, 255, 0.2); }

.ya-dtt-dialog-close .material-symbols-rounded { font-size: 18px; }

.ya-dtt-dialog-body {
    padding: 24px 30px;
}

.ya-dtt-loading {
    text-align: center;
    padding: 40px 0;
}

.ya-dtt-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #F2B735;
    margin: 0 auto 14px;
    animation: ya-dtt-spin 1s linear infinite;
}

@keyframes ya-dtt-spin { to { transform: rotate(360deg); } }

.ya-dtt-loading-text {
    font-size: 13.5px;
    color: var(--muted);
}

.ya-dtt-empty {
    text-align: center;
    padding: 32px 0;
}

.ya-dtt-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ya-dtt-empty-icon .material-symbols-rounded { font-size: 28px; }

.ya-dtt-empty-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.ya-dtt-empty-body {
    font-size: 12.5px;
    color: var(--muted);
    max-width: 360px;
    margin: 0 auto;
}

.ya-dtt-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.33);
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

.ya-dtt-warning .material-symbols-rounded {
    color: var(--danger-soft-text);
    font-size: 17px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ya-dtt-warning strong { color: var(--danger-soft-text); }

.ya-dtt-table {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.ya-dtt-table-header {
    display: grid;
    grid-template-columns: 44px 1.1fr 1.3fr 1.4fr 80px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid var(--card-border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--muted);
    text-transform: uppercase;
}

.ya-dtt-table-row {
    display: grid;
    grid-template-columns: 44px 1.1fr 1.3fr 1.4fr 80px;
    padding: 12px 14px;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.ya-dtt-table-row:last-child { border-bottom: none; }

.ya-dtt-table-row:hover { background: rgba(242, 183, 53, 0.04); }

.ya-dtt-table-row.is-selected {
    background: rgba(244, 67, 54, 0.06);
}

.ya-dtt-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: transparent;
    border: 1.5px solid var(--card-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ya-dtt-checkbox.is-checked {
    background: var(--danger-soft-text);
    border-color: var(--danger-soft-text);
    color: #fff;
}

.ya-dtt-checkbox .material-symbols-rounded {
    font-size: 13px;
    font-weight: 700;
}

.ya-dtt-type-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ya-dtt-type-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ya-dtt-type-icon .material-symbols-rounded { font-size: 15px; }

.ya-dtt-type-icon.is-primary {
    background: var(--primary-soft-bg);
    color: var(--primary-soft-text);
}

.ya-dtt-type-icon.is-warning {
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
}

.ya-dtt-type-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}

.ya-dtt-cell {
    font-size: 12.5px;
    color: var(--muted);
}

.ya-dtt-tabular { font-variant-numeric: tabular-nums; }

.ya-dtt-col-right { text-align: right; }

.ya-dtt-selection-count {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ya-dtt-selection-count .material-symbols-rounded { font-size: 14px; }

.ya-dtt-selection-count.is-active .material-symbols-rounded { color: var(--danger-soft-text); }

.ya-dtt-selection-count strong { color: var(--danger-soft-text); }

.ya-dtt-dialog-footer {
    padding: 16px 30px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.15);
}

/* Light-theme overrides for the delete dialog */
[data-theme="light"] .ya-dtt-dialog-body {
    color: #243447;
}

[data-theme="light"] .ya-dtt-empty-title {
    color: #243447;
}

[data-theme="light"] .ya-dtt-empty-body,
[data-theme="light"] .ya-dtt-warning,
[data-theme="light"] .ya-dtt-cell,
[data-theme="light"] .ya-dtt-selection-count {
    color: #475467;
}

[data-theme="light"] .ya-dtt-table-header {
    background: #f8fafc;
    color: #667085;
    border-bottom-color: #e7edf5;
}

[data-theme="light"] .ya-dtt-table {
    border-color: #e7edf5;
}

[data-theme="light"] .ya-dtt-table-row {
    border-bottom-color: #eef2f7;
}

[data-theme="light"] .ya-dtt-table-row:hover {
    background: rgba(217, 119, 6, 0.04);
}

[data-theme="light"] .ya-dtt-table-row.is-selected {
    background: rgba(244, 67, 54, 0.04);
}

[data-theme="light"] .ya-dtt-type-label {
    color: #243447;
}

[data-theme="light"] .ya-dtt-empty-icon {
    background: #f4f7fb;
    color: #667085;
}

[data-theme="light"] .ya-dtt-dialog-footer {
    background: transparent;
    border-top-color: #e7edf5;
}

[data-theme="light"] .ya-dtt-checkbox {
    border-color: #d7dfe9;
}

[data-theme="light"] .ya-dtt-spinner {
    border-color: rgba(16, 24, 40, 0.1);
    border-top-color: #D97706;
}

/* ---------- YachtReplyAttachmentDialog — reply attachment → Producer Files (2026-11-10) ----------
   Rendered by Radzen outside .yacht-page, so the light theme gets explicit colours (the .ya-dtt-dialog pattern). */
.ya-yra-dialog {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-main);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ya-yra-title {
    font-size: 16px;
    font-weight: 700;
}

.ya-yra-file {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.ya-yra-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.ya-yra-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
}

.ya-yra-input option {
    color: #111827;
}

.ya-yra-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.ya-yra-btn {
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ya-yra-btn.is-primary {
    background: #F2B735;
    border-color: #F2B735;
    color: #1a1300;
}

[data-theme="light"] .ya-yra-dialog {
    color: #243447;
}

[data-theme="light"] .ya-yra-file,
[data-theme="light"] .ya-yra-label {
    color: #5b6b7f;
}

[data-theme="light"] .ya-yra-input,
[data-theme="light"] .ya-yra-btn {
    background: #fff;
    border-color: rgba(16, 24, 40, 0.15);
    color: #243447;
}

[data-theme="light"] .ya-yra-btn.is-primary {
    background: #D97706;
    border-color: #D97706;
    color: #fff;
}

/* ---------- Special Policy sub-section cards ---------- */
/* Nested card used inside the Special Policy section-card to group
   coverage subsections (P&I, Personal Effects, Medical Payments,
   Temporary Substitute Yacht, Assistance and Towing). Themed via
   existing --card-bg / --card-border / --text-main tokens, which
   already have light-mode overrides under [data-theme="light"] .yacht-page. */

.yacht-page .sub-section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.yacht-page .sub-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.yacht-page .sub-section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.yacht-page .ya-section-pill.ya-section-pill-sm {
    font-size: 10.5px;
    padding: 3px 9px;
}

.yacht-page .ya-section-pill.ya-section-pill-sm .material-symbols-rounded {
    font-size: 12px;
}

/* ---------- Tender/Trailer form dialogs (opened from Limits) ----------
   The root carries .yacht-page so the [data-theme="light"] .yacht-page token
   re-declarations reach the ported form markup (Radzen dialogs render outside
   the page div). .ya-form-dialog then neutralizes .yacht-page's page chrome. */
.ya-form-dialog.yacht-page {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* The tender / trailer dialogs are taller than 65vh, and testers did not realise the body
   scrolled at all: the content stopped at a clean edge and the platform's overlay scrollbar
   stays invisible until you already know to scroll. Three affordances, all theme-aware:

   1. Scroll shadows. Two shadow gradients are painted with background-attachment:scroll
      (fixed to the viewport of the box) over two cover gradients painted with
      background-attachment:local (moving with the content). At the top of the scroll the
      cover sits over the shadow and hides it; scroll down and the cover slides away,
      revealing the shadow. Pure CSS, no JS, and self-hiding at both extremes — so a shadow
      appears ONLY on the side that actually has more content.
   2. A permanently visible slim scrollbar, scoped to this element so the rest of the app
      keeps the platform default.
   3. A soft inset edge on the body so it reads as a distinct, clipped region between the
      amber header and the footer. */
.ya-form-dialog-body {
    --ya-scroll-shade: rgba(0, 0, 0, 0.55);
    --ya-scroll-thumb: rgba(255, 255, 255, 0.22);
    --ya-scroll-thumb-hover: rgba(255, 255, 255, 0.34);

    padding: 22px 26px 10px 26px;
    max-height: 65vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--page-bg);
    background-image:
        linear-gradient(to bottom, var(--page-bg) 40%, rgba(0, 0, 0, 0)),
        linear-gradient(to top, var(--page-bg) 40%, rgba(0, 0, 0, 0)),
        linear-gradient(to bottom, var(--ya-scroll-shade), rgba(0, 0, 0, 0)),
        linear-gradient(to top, var(--ya-scroll-shade), rgba(0, 0, 0, 0));
    background-position: 0 0, 0 100%, 0 0, 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 30px, 100% 30px, 100% 14px, 100% 14px;
    background-attachment: local, local, scroll, scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--ya-scroll-thumb) transparent;
}

    .ya-form-dialog-body::-webkit-scrollbar {
        width: 10px;
    }

    .ya-form-dialog-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .ya-form-dialog-body::-webkit-scrollbar-thumb {
        background: var(--ya-scroll-thumb);
        border-radius: 10px;
        /* Transparent border + background-clip keeps the thumb slim without the track
           collapsing to a hairline the pointer cannot grab. */
        border: 3px solid transparent;
        background-clip: content-box;
    }

    .ya-form-dialog-body::-webkit-scrollbar-thumb:hover {
        background: var(--ya-scroll-thumb-hover);
        background-clip: content-box;
    }

/* Amber is a light colour, so the dark-theme shadow would vanish on white. */
[data-theme="light"] .yacht-page .ya-form-dialog-body {
    --ya-scroll-shade: rgba(15, 23, 42, 0.20);
    --ya-scroll-thumb: rgba(15, 23, 42, 0.28);
    --ya-scroll-thumb-hover: rgba(15, 23, 42, 0.42);
}

/* Autoscrolled validation targets: keeps the field clear of the scroll shadow (and of the
   sticky app header on full pages) rather than landing flush against the edge. */
.optima-field-error-flash {
    scroll-margin-block: 28px;
}

/* Send failure, shown inside the document dialogs. A toast alone can sit behind the modal
   overlay, and the failure is the one outcome the user cannot infer from the dialog closing. */
.yd-send-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--danger-soft-bg);
    color: var(--danger-soft-text);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

    .yd-send-error .material-symbols-rounded {
        font-size: 19px;
        flex-shrink: 0;
        margin-top: 1px;
    }

.yd-send-error-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

.yd-send-error-detail {
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.92;
    overflow-wrap: anywhere;
}

.ya-form-dialog .section-card {
    box-shadow: none;
}

.ya-form-dialog .ya-tt-dialog-footer {
    background: var(--page-bg);
}

/* ---------- Signed NB Application upload dialog ----------
   Global rather than scoped: the tender/trailer dialogs this is modelled on keep their
   styling here, and the dialog is rendered by DialogService outside the page's scope. */
.ysa-note { margin: 0 0 12px; }

.ysa-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1.5px dashed var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

    .ysa-drop:hover { border-color: #F2B735; }

    .ysa-drop.has-file {
        border-style: solid;
        border-color: #F2B735;
        background: var(--warning-soft-bg);
    }

    /* The input is visually hidden, so the label shows the keyboard focus ring. */
    .ysa-drop:focus-within { outline: 2px solid #F2B735; outline-offset: 2px; }

    /* The real input covers the whole box so the entire area is the click/drop target, and
       stays transparent rather than display:none so keyboard focus still reaches it. */
    .ysa-drop input[type="file"] {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .ysa-drop input[type="file"]:disabled { cursor: not-allowed; }

.ysa-drop-icon {
    font-size: 26px;
    color: var(--muted);
    flex-shrink: 0;
}

.ysa-drop.has-file .ysa-drop-icon { color: #F2B735; }

.ysa-drop-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: var(--text-main);
    min-width: 0;
    overflow-wrap: anywhere;
}

.ysa-drop-size {
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Light theme: amber deepens to #D97706 for contrast on white (see the theming rules). */
[data-theme="light"] .yacht-page .ysa-drop:hover,
[data-theme="light"] .yacht-page .ysa-drop.has-file {
    border-color: #D97706;
}

[data-theme="light"] .yacht-page .ysa-drop:focus-within { outline-color: #D97706; }

[data-theme="light"] .yacht-page .ysa-drop.has-file .ysa-drop-icon { color: #D97706; }
/* ---------- Import dialogs: whole-dialog drop target (YachtFileDropZone + YachtDropOverlay) ----------
   yacht-dropzone.js puts is-drag-ok / -unknown / -bad / -many on the dialog root (.ydz-root) while a file is held
   over it; the overlay covers the whole modal, header included, so "drop anywhere" reads at a glance. Global, like
   .ysa-drop: the dialogs are rendered by DialogService outside the page's scope. */
.ydz-root {
    position: relative;
    --ydz-accent: #F2B735;
    --ydz-accent-soft: rgba(242, 183, 53, 0.14);
    --ydz-veil: rgba(9, 13, 21, 0.82);
    --ydz-bad: #F87171;
    --ydz-bad-soft: rgba(248, 113, 113, 0.14);
}

[data-theme="light"] .yacht-page.ydz-root {
    --ydz-accent: #D97706;
    --ydz-accent-soft: rgba(217, 119, 6, 0.10);
    --ydz-veil: rgba(255, 255, 255, 0.90);
    --ydz-bad: #DC2626;
    --ydz-bad-soft: rgba(220, 38, 38, 0.08);
}

.ydz-overlay {
    position: absolute;
    inset: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 2px dashed var(--ydz-accent);
    background: var(--ydz-veil);
    backdrop-filter: blur(3px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .14s ease, visibility .14s ease;
}

.ydz-root.is-drag-ok .ydz-overlay,
.ydz-root.is-drag-unknown .ydz-overlay,
.ydz-root.is-drag-bad .ydz-overlay,
.ydz-root.is-drag-many .ydz-overlay { opacity: 1; visibility: visible; }

.ydz-root.is-drag-ok .ydz-overlay,
.ydz-root.is-drag-unknown .ydz-overlay {
    box-shadow: 0 0 0 4px var(--ydz-accent-soft), inset 0 0 70px var(--ydz-accent-soft);
    animation: ydz-glow 1.4s ease-in-out infinite;
}

.ydz-root.is-drag-bad .ydz-overlay,
.ydz-root.is-drag-many .ydz-overlay {
    border-style: solid;
    border-color: var(--ydz-bad);
    box-shadow: inset 0 0 70px var(--ydz-bad-soft);
}

.ydz-card { display: none; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px; max-width: 420px; }
.ydz-root.is-drag-ok .ydz-ok,
.ydz-root.is-drag-unknown .ydz-ok,
.ydz-root.is-drag-bad .ydz-bad,
.ydz-root.is-drag-many .ydz-many { display: flex; }

.ydz-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 46px;
    color: var(--ydz-accent);
    background: var(--ydz-accent-soft);
}

.ydz-ok .ydz-icon { animation: ydz-bob 1.4s ease-in-out infinite; }
.ydz-bad .ydz-icon, .ydz-many .ydz-icon { color: var(--ydz-bad); background: var(--ydz-bad-soft); }
.ydz-title { font-size: 18px; font-weight: 700; color: var(--text-main); letter-spacing: -.01em; }
.ydz-sub { font-size: 13px; color: var(--muted); }

/* The pick box answers too while an accepted file is over the dialog. */
.ydz-root.is-drag-ok .ysa-drop,
.ydz-root.is-drag-unknown .ysa-drop { border-color: var(--ydz-accent); background: var(--ydz-accent-soft); }

@keyframes ydz-glow { 50% { box-shadow: 0 0 0 8px var(--ydz-accent-soft), inset 0 0 90px var(--ydz-accent-soft); } }
@keyframes ydz-bob { 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
    .ydz-overlay { transition: none; }
    .ydz-root .ydz-overlay, .ydz-ok .ydz-icon { animation: none !important; }
}

/* ---------- Limits: tender/trailer detail buttons + callouts ---------- */
.li-section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.li-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    background: transparent;
    border: 1.5px solid #F2B735;
    color: #F2B735;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.li-detail-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(242, 183, 53, 0.12);
}

.li-detail-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.li-detail-btn .material-symbols-rounded { font-size: 16px; }

[data-theme="light"] .yacht-page .li-detail-btn {
    border-color: #D97706;
    color: #D97706;
}

[data-theme="light"] .yacht-page .li-detail-btn:hover:not(:disabled) {
    background: rgba(217, 119, 6, 0.10);
}

.li-details-pending {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--warning-soft-bg);
    border: 1px dashed rgba(255, 152, 0, 0.45);
    font-size: 13px;
    font-weight: 600;
    color: var(--warning-soft-text);
}

.li-details-pending .material-symbols-rounded { font-size: 18px; }

.li-details-pending-btn {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: linear-gradient(180deg, #F2B735 0%, #D97706 100%);
    color: #1a1a1a;
}

.li-details-pending-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.li-details-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}

.li-details-summary .material-symbols-rounded {
    font-size: 16px;
    color: var(--primary-soft-text);
}

.li-derived-hint {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 4px;
}

/* Live readout of the signed surcharge/discount so the sign can't be misread at entry
   (an underwriter typed 5.7 meaning "5.7% off" and got a 5.7% surcharge). Colour comes
   from the soft-text tokens, which already carry light-theme overrides. */
.li-discount-effect {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
}

.li-discount-effect.is-discount {
    background: var(--success-soft-bg);
    color: var(--success-soft-text);
}

.li-discount-effect.is-surcharge {
    background: var(--warning-soft-bg);
    color: var(--warning-soft-text);
}

/* Out-of-band advisory for a custom discount outside the workbook's -10..+10 band. The input no
   longer clamps (that silently rewrote -15 to -10), so this is the only signal that a value needs
   underwriting approval — it warns, it does not block. Danger tokens rather than warning ones so
   it does not read as the same weight as the is-surcharge chip directly above it; both token pairs
   already carry light-theme overrides. */
.li-discount-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.45;
    background: var(--danger-soft-bg);
    color: var(--danger-soft-text);
}

.li-discount-warning .material-symbols-rounded {
    font-size: 15px;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* ── Booked banner (YATE-112) ─────────────────────────────────────────────── */
.yacht-page .ya-booked-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--success-soft-bg), rgba(242, 183, 53, .10));
    border: 1px solid var(--success-soft-text);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 16px;
}
.yacht-page .ya-booked-check {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--success-soft-text); color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex: none;
}
.yacht-page .ya-booked-check .material-symbols-rounded { font-size: 20px; }
.yacht-page .ya-booked-title { font-weight: 800; color: var(--text-main); }
.yacht-page .ya-booked-number {
    font-family: Consolas, monospace;
    color: #F2B735;
    letter-spacing: .05em;
}
/* CONVERTED, not booked: a policy number exists and the documents are the bound set, but the
   work is not finished and the fields are still open. Amber rather than the booked green —
   a green tick here would read as "done" and invite the underwriter to stop. */
.yacht-page .ya-booked-banner.is-converted {
    background: linear-gradient(135deg, var(--warning-soft-bg), rgba(242, 183, 53, .10));
    border-color: var(--warning-soft-text);
}

.yacht-page .ya-booked-banner.is-converted .ya-booked-check {
    background: var(--warning-soft-text);
}

.yacht-page .ya-booked-meta { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.yacht-page .ya-booked-cta {
    margin-left: auto; flex: none; cursor: pointer;
    background: rgba(242, 183, 53, .14); color: #F2B735;
    border: 1px solid rgba(242, 183, 53, .5);
    padding: 7px 14px; border-radius: 8px; font-weight: 700; font-size: .85rem;
}
.yacht-page .ya-booked-cta:hover { background: rgba(242, 183, 53, .24); }
/* Light theme: deeper amber for WCAG contrast (theming rule #2) */
[data-theme="light"] .yacht-page .ya-booked-number { color: #D97706; }
[data-theme="light"] .yacht-page .ya-booked-cta {
    color: #D97706; border-color: rgba(217, 119, 6, .5); background: rgba(217, 119, 6, .08);
}
[data-theme="light"] .yacht-page .ya-booked-cta:hover { background: rgba(217, 119, 6, .16); }

/* ── Booking overlay (YATE-112) ───────────────────────────────────────────── */
.yacht-page .ybk-overlay {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(9, 12, 16, .72);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
}
.yacht-page .ybk-modal {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 14px; padding: 22px 26px; width: min(380px, 92vw);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}
.yacht-page .ybk-title { font-weight: 800; font-size: 1rem; color: var(--text-main); }
.yacht-page .ybk-sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.yacht-page .ybk-steps { margin-top: 14px; }
.yacht-page .ybk-step { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.yacht-page .ybk-step-label { color: var(--muted); font-size: .88rem; }
.yacht-page .ybk-step.is-active .ybk-step-label { color: var(--text-main); font-weight: 600; }
.yacht-page .ybk-step.is-done .ybk-step-label { color: var(--muted); }
.yacht-page .ybk-dot {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    border: 2px dashed var(--card-border);
}
.yacht-page .ybk-dot .material-symbols-rounded { font-size: 14px; }
.yacht-page .ybk-step.is-done .ybk-dot {
    border: none; background: var(--success-soft-bg); color: var(--success-soft-text);
}
.yacht-page .ybk-step.is-active .ybk-dot {
    border: 2px solid rgba(242, 183, 53, .25); border-top-color: #F2B735;
    animation: ybk-spin .9s linear infinite;
}
@keyframes ybk-spin { to { transform: rotate(360deg); } }
.yacht-page .ybk-bar {
    height: 4px; border-radius: 2px; background: var(--card-border);
    overflow: hidden; margin-top: 12px;
}
.yacht-page .ybk-bar > i {
    display: block; height: 100%;
    background: linear-gradient(90deg, #F2B735, #ffd97a); border-radius: 2px;
    /* Width comes inline from the dialog's real step (17/50/83/100%) — the .3s tween
       finishes inside the flow's shortest (350ms) dwell, so it never lags the steps. */
    transition: width .3s ease;
}
.yacht-page .ybk-center { text-align: center; }
.yacht-page .ybk-check {
    width: 46px; height: 46px; border-radius: 50%; margin: 4px auto 10px;
    background: var(--success-soft-text); color: #fff;
    display: flex; align-items: center; justify-content: center;
    animation: ybk-pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes ybk-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.yacht-page .ybk-number {
    font-family: Consolas, monospace; font-size: 1.15rem; font-weight: 700;
    color: #F2B735; letter-spacing: .06em; text-align: center;
    padding: 9px 12px; border: 1px dashed rgba(242, 183, 53, .5);
    border-radius: 9px; background: rgba(242, 183, 53, .07); margin: 10px 0 4px;
}
.yacht-page .ybk-chips { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.yacht-page .ybk-chip {
    font-size: .72rem; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
}
.yacht-page .ybk-chip.is-green {
    background: var(--success-soft-bg); color: var(--success-soft-text); border-color: var(--success-soft-text);
}
.yacht-page .ybk-chip.is-gold {
    background: rgba(242, 183, 53, .12); color: #F2B735; border-color: rgba(242, 183, 53, .4);
}
.yacht-page .ybk-error-icon { font-size: 40px; color: var(--danger-soft-text, #e05d5d); }
.yacht-page .ybk-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.yacht-page .ybk-btn {
    cursor: pointer; border-radius: 8px; padding: 8px 18px; font-weight: 700; font-size: .85rem;
    border: 1px solid transparent;
}
.yacht-page .ybk-btn-primary { background: #F2B735; color: #141a22; }
.yacht-page .ybk-btn-primary:hover { filter: brightness(1.06); }
.yacht-page .ybk-btn-ghost { background: none; color: var(--muted); border-color: var(--card-border); }
.yacht-page .ybk-modal:focus { outline: none; } /* container is a programmatic focus target; Tab moves to its buttons */
/* Light theme ambers */
[data-theme="light"] .yacht-page .ybk-number { color: #D97706; border-color: rgba(217, 119, 6, .5); background: rgba(217, 119, 6, .07); }
[data-theme="light"] .yacht-page .ybk-chip.is-gold { color: #D97706; background: rgba(217, 119, 6, .1); border-color: rgba(217, 119, 6, .4); }
[data-theme="light"] .yacht-page .ybk-overlay { background: rgba(30, 36, 44, .45); }

/* Reduced motion for the booking overlay — must live AFTER the ybk base rules
   (equal specificity ⇒ source order decides), unlike the main block at ~1719. */
@media (prefers-reduced-motion: reduce) {
    .yacht-page .ybk-step.is-active .ybk-dot { animation: none; }
    .yacht-page .ybk-bar > i { transition: none; } /* width is real progress now — just skip the tween */
    .yacht-page .ybk-check { animation: none; }
}

/* Booked header chips on PaymentReview (YATE-112) */
.yacht-page .pr-chip-policy {
    background: rgba(242, 183, 53, .12); color: #F2B735;
    border-color: rgba(242, 183, 53, .45);
    font-family: Consolas, monospace; font-weight: 700; letter-spacing: .04em;
}
.yacht-page .pr-chip-booked {
    background: rgba(76, 175, 80, .13); color: #7ee383;
    border-color: rgba(76, 175, 80, .4);
}
[data-theme="light"] .yacht-page .pr-chip-policy { color: #D97706; background: rgba(217, 119, 6, .1); border-color: rgba(217, 119, 6, .45); }
[data-theme="light"] .yacht-page .pr-chip-booked { color: #2e7d32; }

/* ── Booked read-only lock (YATE-112) ─────────────────────────────────────── */
/* inert on the wrapper blocks mouse + keyboard + focus (Edge/Chrome 102+);
   pointer-events is the fallback for anything older. */
.yacht-page .ya-booked-lock {
    opacity: .55;
    pointer-events: none;
    user-select: none;
}
.yacht-page .ya-booked-lock input,
.yacht-page .ya-booked-lock select,
.yacht-page .ya-booked-lock textarea,
.yacht-page .ya-booked-lock .rz-textbox,
.yacht-page .ya-booked-lock .rz-dropdown,
.yacht-page .ya-booked-lock .rz-numeric,
.yacht-page .ya-booked-lock .rz-spinner {
    border-style: dashed !important;
}
.yacht-page .ya-booked-footer {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 12px; margin-top: 16px;
}
.yacht-page .ya-booked-lock-note {
    color: var(--muted); font-style: italic; font-size: .85rem; margin-right: auto;
}

/* ==========================================================================
   Underwriter notepad — in-flow, top of page
   --------------------------------------------------------------------------
   A plain block inside .yacht-page, NOT position:fixed. Fixed positioning is
   resolved against the viewport (or any transformed ancestor), so it cannot be
   aligned to the content column from CSS alone — two attempts, one assuming the
   sidebar width and one measuring it, both left the rail sitting mid-page. In
   normal flow the component simply occupies the content column by definition.

   Collapsed it is a single strip; expanded it pushes the page down, which is
   predictable and reversible, unlike an overlay that hides what sits beneath.
   ========================================================================== */

.ya-notes {
    margin: 0 0 14px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
}

.ya-notes.is-open {
    border-color: rgba(242, 183, 53, .45);
}

/* ---- Collapsed strip / header ---- */

.ya-notes-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font: 600 13px/1.3 inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease;
}

    .ya-notes-bar:hover { background: var(--primary-soft-bg); }

.ya-notes-bar-icon { font-size: 19px; color: #F2B735; flex: none; }

.ya-notes-bar-title { font-weight: 800; flex: none; }

.ya-notes-count {
    flex: none;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--primary-soft-bg);
    color: var(--primary-soft-text);
    font-size: 10.5px;
    font-weight: 700;
}

/* One-line glimpse of the first page. min-width:0 plus ellipsis so a long note
   can never widen the strip or wrap it onto a second line. */
.ya-notes-peek {
    flex: 1;
    min-width: 0;
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ya-notes-bar-spacer { flex: 1; }

.ya-notes-flag {
    flex: none;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--warning-soft-text);
    background: var(--warning-soft-bg);
    padding: 1px 8px;
    border-radius: 20px;
}

.ya-notes-chevron {
    flex: none;
    font-size: 20px;
    color: var(--muted);
    transition: transform .18s ease;
}

.ya-notes.is-open .ya-notes-chevron { transform: rotate(180deg); }

/* ---- Expanded body ---- */

.ya-notes-body {
    border-top: 1px solid var(--card-border);
    background: var(--page-bg);
}

/* "Policy documents to upload" strip on Review & Pay (YachtPolicyDocumentsStrip): the Notes strip's
   look, hosting YachtProducerFilesSection, which used to sit inside a padded card. */
.ya-policy-docs .ya-notes-body { padding: 12px 14px 14px; }

.ya-policy-docs-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.ya-notes-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px 0;
    overflow-x: auto;
}

.ya-notes-tab {
    flex: none;
    max-width: 190px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--muted);
    font: 600 12px/1.3 inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s ease, color .15s ease;
}

    .ya-notes-tab:hover { color: var(--text-main); }

    .ya-notes-tab.is-active {
        background: var(--card-bg);
        border-color: var(--card-border);
        color: #F2B735;
    }

.ya-notes-addtab {
    flex: none;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--card-border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

    .ya-notes-addtab:hover { color: #F2B735; border-color: #F2B735; }

    .ya-notes-addtab .material-symbols-rounded { font-size: 17px; }

.ya-notes-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
}

.ya-notes-titleinput,
.ya-notes-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}

.ya-notes-titleinput {
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
}

.ya-notes-input {
    padding: 10px;
    min-height: 150px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.55;
}

    .ya-notes-titleinput:focus,
    .ya-notes-input:focus { border-color: #F2B735; }

    .ya-notes-titleinput::placeholder,
    .ya-notes-input::placeholder { color: var(--muted); }

    .ya-notes-input:disabled { opacity: .6; }

.ya-notes-foot {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ya-notes-status {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .ya-notes-status .material-symbols-rounded { font-size: 14px; }

.ya-notes-save,
.ya-notes-delete {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

.ya-notes-save {
    border: 1px solid rgba(242, 183, 53, .5);
    background: rgba(242, 183, 53, .14);
    color: #F2B735;
}

    .ya-notes-save:hover:not(:disabled) { background: rgba(242, 183, 53, .24); }

    .ya-notes-save:disabled { opacity: .45; cursor: default; }

/* Destructive, so it stays quiet until hovered rather than competing with Save. */
.ya-notes-delete {
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--muted);
}

    .ya-notes-delete:hover:not(:disabled) {
        color: var(--danger-soft-text);
        border-color: var(--danger-soft-text);
        background: var(--danger-soft-bg);
    }

.ya-notes-save .material-symbols-rounded,
.ya-notes-delete .material-symbols-rounded { font-size: 15px; }

.ya-notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 26px 16px;
    color: var(--muted);
    font-size: 12.5px;
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
}

    .ya-notes-empty .material-symbols-rounded { font-size: 26px; }

.ya-notes-spinner {
    width: 11px;
    height: 11px;
    border: 2px solid var(--muted);
    border-top-color: transparent;
    border-radius: 50%;
    animation: ya-save-spin .7s linear infinite;
}

/* Light theme: amber deepens for contrast on white (theming rule #2). */
[data-theme="light"] .yacht-page .ya-notes-bar-icon,
[data-theme="light"] .yacht-page .ya-notes-tab.is-active,
[data-theme="light"] .yacht-page .ya-notes-addtab:hover { color: #D97706; }

[data-theme="light"] .yacht-page .ya-notes.is-open { border-color: rgba(217, 119, 6, .45); }

[data-theme="light"] .yacht-page .ya-notes-titleinput:focus,
[data-theme="light"] .yacht-page .ya-notes-input:focus,
[data-theme="light"] .yacht-page .ya-notes-addtab:hover { border-color: #D97706; }

[data-theme="light"] .yacht-page .ya-notes-save {
    color: #D97706;
    border-color: rgba(217, 119, 6, .5);
    background: rgba(217, 119, 6, .08);
}

[data-theme="light"] .yacht-page .ya-notes-save:hover:not(:disabled) { background: rgba(217, 119, 6, .16); }

/* Locked while a file upload is still running (YachtNotesPanel.childBusy): say so visually
   instead of silently ignoring clicks, and keep hover from suggesting the control is live. */
.ya-notes-bar:disabled,
.ya-notes-tab:disabled,
.ya-notes-addtab:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ya-notes-bar:disabled:hover { background: transparent; }

.ya-notes-tab:disabled:not(.is-active):hover { color: var(--muted); }

.ya-notes-addtab:disabled:hover,
[data-theme="light"] .yacht-page .ya-notes-addtab:disabled:hover {
    color: var(--muted);
    border-color: var(--card-border);
}

/* ──────────────── Segmented control (.ya-seg) ────────────────
   One pill, N equal segments, and an amber thumb that glides to the active one. Used by Review
   & Pay's One PDF / Separate files switch and by Limits' option-count switch, so the two read as
   one control. Markup:
     <div class="ya-seg" role="group" style="--ya-seg-n: 2; --ya-seg-i: 0;">
         <span class="ya-seg-thumb" aria-hidden="true"></span>
         <button type="button" class="ya-seg-btn is-on" aria-pressed="true">…</button>
         <button type="button" class="ya-seg-btn" aria-pressed="false">…</button>
     </div>
   --ya-seg-n is the segment count and --ya-seg-i the active index. The thumb is exactly one
   segment wide and translates by whole segments, so changing --ya-seg-i IS the animation — no
   script, no measuring. Add .is-disabled on the pill while its buttons are disabled. */
.ya-seg {
    --ya-seg-n: 2;
    --ya-seg-i: 0;
    --ya-seg-pad: 3px;
    position: relative;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: var(--ya-seg-pad);
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    isolation: isolate;
    vertical-align: middle;
}

.ya-seg-thumb {
    position: absolute;
    top: var(--ya-seg-pad);
    bottom: var(--ya-seg-pad);
    left: var(--ya-seg-pad);
    width: calc((100% - 2 * var(--ya-seg-pad)) / var(--ya-seg-n));
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(242, 183, 53, 0.24), rgba(242, 183, 53, 0.12));
    box-shadow: inset 0 0 0 1px rgba(242, 183, 53, 0.45), 0 2px 10px rgba(242, 183, 53, 0.18);
    transform: translateX(calc(var(--ya-seg-i) * 100%));
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
    z-index: 0;
    pointer-events: none;
}

.ya-seg-btn {
    position: relative;
    z-index: 1;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    transition: color .25s ease, transform .15s ease;
}

.ya-seg-btn:hover:not(.is-on):not(:disabled) { color: var(--text-main); }

.ya-seg-btn:active:not(:disabled) { transform: scale(.97); }

.ya-seg-btn.is-on { color: #F2B735; }

.ya-seg-btn:focus-visible {
    outline: 2px solid #F2B735;
    outline-offset: 2px;
}

.ya-seg-btn:disabled { cursor: not-allowed; }

.ya-seg.is-disabled { opacity: .55; }

[data-theme="light"] .yacht-page .ya-seg-thumb {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.16), rgba(217, 119, 6, 0.08));
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.42), 0 2px 10px rgba(217, 119, 6, 0.14);
}

[data-theme="light"] .yacht-page .ya-seg-btn.is-on { color: #D97706; }

[data-theme="light"] .yacht-page .ya-seg-btn:focus-visible { outline-color: #D97706; }

@media (prefers-reduced-motion: reduce) {
    .ya-seg-thumb,
    .ya-seg-btn { transition: none; }
}

/* ---------- Import dialogs: summary (Import Excel .yxi, application import .ynq) — global since 2026-10-27 so both dialogs share it ---------- */
/* The shared shell styles disabled state through .is-disabled; these buttons use the attribute. */
.yxi .ya-tt-dialog-btn:disabled,
.ynq .ya-tt-dialog-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.yxi-hidden { display: none; }

.yxi-footer { align-items: center; }
.ya-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.yxi-progress { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.yxi-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--card-border); border-top-color: #F2B735; animation: yxi-spin .8s linear infinite; }
@keyframes yxi-spin { to { transform: rotate(360deg); } }

.yxi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.yxi-card { border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px; background: var(--card-bg); min-width: 0; }
.yxi-card-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #F2B735; margin-bottom: 6px; }
.yxi-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; padding: 3px 0; font-size: 13px; }
.yxi-label { color: var(--muted); }
.yxi-value { color: var(--text-main); overflow-wrap: anywhere; }
.yxi-value.is-empty { color: var(--muted); font-style: italic; }
.yxi-muted { color: var(--muted); font-size: 13px; }

.yxi-rating { margin-top: 14px; }
.yxi-rating-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yxi-rating-table th { text-align: right; color: var(--muted); font-weight: 600; padding: 4px 8px; }
.yxi-rating-table th:first-child, .yxi-rating-table td:first-child { text-align: left; }
.yxi-rating-table td { text-align: right; padding: 4px 8px; border-top: 1px solid var(--card-border); color: var(--text-main); font-variant-numeric: tabular-nums; }
.yxi-rating-table tr.is-total td { font-weight: 700; }

.yxi-warnings { margin-top: 14px; }
.yxi-warn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.yxi-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--primary-soft-bg); color: var(--primary-soft-text); margin-top: 6px; }
.yxi-warn.is-warning { background: var(--warning-soft-bg); color: var(--warning-soft-text); }
.yxi-warn.is-blocker { background: var(--danger-soft-bg); color: var(--danger-soft-text); }
.yxi-warn .material-symbols-rounded { font-size: 18px; flex: 0 0 auto; }
.yxi-preview { margin-top: 8px; font-size: 13px; color: var(--muted); }
/* "Check again" inside a blocker line: takes the line's own (theme-token) colour. */
.yxi-link { margin-left: auto; flex: 0 0 auto; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; cursor: pointer; }
.yxi-link:disabled { opacity: .55; cursor: not-allowed; }
.yxi-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

/* Light theme: deeper amber for contrast on white (CLAUDE.md theming rule). Written like the sibling
   components' scoped CSS: Blazor appends the scope attribute to the last compound selector only, so the
   [data-theme] on <html> and the .yacht-page root stay plain ancestor matches. */
[data-theme="light"] .yacht-page .yxi-card-title { color: #D97706; }
[data-theme="light"] .yacht-page .yxi-spinner { border-top-color: #D97706; }

@media (max-width: 640px) { .yxi-grid { grid-template-columns: 1fr; } .yxi-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .yxi-spinner { animation: none; } }
