/*
 * Nova v2 — Genuine premium UI
 * Philosophy: refined light admin (Linear / Vercel style), NOT just white→black.
 * Sidebar: deep navy (was always dark). Main body: crisp warm-white.
 * Front display (kiosk): stays dark + atmospheric.
 */

/* ─── Shared tokens (admin + front kiosk) ─── */
.theme-nova,
.admin-theme {
    --nv-accent:        #3b82f6;
    --nv-accent-2:      #6366f1;
    --nv-accent-glow:   rgba(59, 130, 246, 0.18);
    --nv-success:       #059669;
    --nv-warn:          #d97706;
    --nv-danger:        #dc2626;
    --nv-navy:          #0b1220;
    --nv-navy-2:        #0f1a2e;
    --nv-border:        #e4e9f0;
    --nv-border-subtle: rgba(15, 23, 42, 0.06);
    --nv-body:          #f4f6fa;
    --nv-panel:         #ffffff;
    --nv-text:          #0f172a;
    --nv-muted:         #64748b;
    --nv-sh-sm:         0 1px 3px rgba(15,23,42,0.06), 0 1px 1px rgba(15,23,42,0.03);
    --nv-sh:            0 4px 16px rgba(15,23,42,0.07), 0 1px 3px rgba(15,23,42,0.05);
    --nv-sh-lg:         0 12px 40px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.06);
}

/* ═══════════════════════════════════════════
   ADMIN — refined light shell
   ═══════════════════════════════════════════ */

/* Solo single-editor: hide multi-editor lock chrome (conflict/queue chips stay). */
body.solo-single-editor #day-print-lock-banner,
body.solo-single-editor #week-print-lock-banner,
body.solo-single-editor #week-print-lock-banner-drawer {
    display: none !important;
}

/* ── Sidebar — rich dark indigo-navy ── */
.admin-theme .admin-shell {
    background: var(--nv-body);
}

.admin-theme .admin-nav-toggle {
    display: inline-flex;
    align-items: center;
    margin-right: 0.35rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .admin-theme .admin-nav-toggle { display: none; }
}

.admin-theme .admin-shell--nav-collapsed .admin-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.admin-theme .admin-shell--nav-collapsed .admin-body {
    margin-left: 0;
}

.admin-theme .admin-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
    width: 13.5rem;
    transition: width 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
}

.admin-theme .admin-brand {
    padding: 1rem 0.85rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

.admin-theme .admin-brand-tag {
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.admin-theme .admin-brand h1 {
    color: #f8fafc;
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: 0.25rem;
    line-height: 1.35;
}

.admin-theme .admin-nav-btn {
    color: #cbd5e1;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    margin: 0.12rem 0.4rem;
    width: calc(100% - 0.8rem);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-theme .admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.admin-theme .admin-nav-active {
    background: #fff !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
}

.admin-theme .admin-sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.12);
    padding: 0.5rem 0.4rem 0.25rem;
    margin-top: 0.25rem;
}

.admin-theme .admin-footer-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-theme .admin-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.125rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
        transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-theme .admin-footer-btn:hover,
.admin-theme .admin-footer-btn:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.26);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.admin-theme .admin-footer-btn:active {
    transform: scale(0.98);
}

.admin-theme .admin-footer-btn--logout {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.admin-theme .admin-footer-btn--muted {
    color: #cbd5e1;
    font-weight: 500;
}

.admin-theme .admin-footer-btn--accent {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-color: transparent;
    color: #fff;
}

.admin-theme .admin-footer-btn--accent:hover,
.admin-theme .admin-footer-btn--accent:focus-visible {
    background: linear-gradient(135deg, #4f8ef7 0%, #7577f2 100%);
    color: #fff;
}

/* Legacy footer btn classes — keep if referenced elsewhere */
.admin-theme .admin-sidebar-footer .btn-ghost {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-theme .admin-sidebar-footer .btn-outline {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-theme .admin-sidebar-footer .btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    border-color: transparent;
}

.admin-theme .admin-sidebar-footer .btn-ghost:hover:not(:disabled),
.admin-theme .admin-sidebar-footer .btn-outline:hover:not(:disabled),
.admin-theme .admin-sidebar-footer .btn-primary:hover:not(:disabled),
.admin-theme .admin-sidebar-footer .btn-ghost:focus-visible,
.admin-theme .admin-sidebar-footer .btn-outline:focus-visible,
.admin-theme .admin-sidebar-footer .btn-primary:focus-visible {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #f0f7ff !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    transform: translateY(-1px);
}

.admin-theme .admin-sidebar-footer .btn-primary:hover:not(:disabled),
.admin-theme .admin-sidebar-footer .btn-primary:focus-visible {
    background: linear-gradient(135deg, #4f8ef7 0%, #7577f2 100%) !important;
    color: #fff !important;
}

.admin-theme .admin-sidebar-footer .admin-nav-btn:hover,
.admin-theme .admin-sidebar-footer .admin-nav-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #f0f7ff !important;
    transform: translateY(-1px);
}

/* ── Body + topbar ── */
.admin-theme .admin-body {
    background: var(--nv-body);
}

.admin-theme .admin-topbar {
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid var(--nv-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--nv-border-subtle);
    padding: 0.7rem 1.25rem;
}

.admin-theme .admin-main {
    color: var(--nv-text);
    padding: 1.5rem 1.5rem 3rem;
}

/* ── Panels & cards ── */
.admin-theme .panel {
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-sm);
    color: var(--nv-text);
    border-radius: var(--radius, 1.125rem);
}

.admin-theme .panel:hover {
    box-shadow: var(--nv-sh);
}

.admin-theme .panel-title {
    color: var(--nv-muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Typography ── */
.admin-theme .page-title {
    color: var(--nv-text);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.admin-theme .page-subtitle {
    color: var(--nv-muted);
    font-size: 0.875rem;
    margin-top: 0.3rem;
}

.admin-theme .text-slate-400 { color: #94a3b8 !important; }
.admin-theme .text-slate-500 { color: var(--nv-muted) !important; }
.admin-theme .text-slate-600 { color: #475569 !important; }
.admin-theme .text-slate-700 { color: #334155 !important; }

/* ── Forms ── */
.admin-theme .input,
.admin-theme .select,
.admin-theme textarea.input {
    background: #f8fafc;
    border-color: #dce2ea;
    color: var(--nv-text);
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.04);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.admin-theme .input:focus,
.admin-theme .select:focus,
.admin-theme textarea.input:focus {
    background: #ffffff;
    border-color: var(--nv-accent);
    box-shadow: 0 0 0 3px var(--nv-accent-glow);
    outline: none;
}

/* ── Buttons ── */
.admin-theme button.btn,
.admin-theme button.dp-tab,
.admin-theme button.dp-quick-btn,
.admin-theme button.dp-history-filter,
.admin-theme button.dp-dropdown-item {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* btn + btn-outline on native <button> blocks is-active backgrounds — force toggled state. */
.admin-theme button.btn.btn-outline.is-active,
.admin-theme button.btn.btn-outline[aria-pressed="true"] {
    background-color: #0f172a !important;
    background-image: none !important;
    border-color: #0f172a !important;
    color: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
}

.admin-theme button.btn.btn-outline.is-active:focus-visible,
.admin-theme button.btn.btn-outline[aria-pressed="true"]:focus-visible {
    background-color: #1e293b !important;
    color: #fff !important;
    outline-color: rgba(15, 23, 42, 0.35);
}

.admin-theme button.btn.btn-outline.is-active:active:not(:disabled),
.admin-theme button.btn.btn-outline[aria-pressed="true"]:active:not(:disabled) {
    background-color: #334155 !important;
    color: #fff !important;
}

/* Released toggle — reset from dark pressed state (native button retains paint otherwise). */
.admin-theme button.btn.btn-outline[aria-pressed="false"]:not(.is-active) {
    background-color: rgba(255, 255, 255, 0.78) !important;
    background-image: none !important;
    color: #0f172a !important;
}

.admin-theme .btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.admin-theme .btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* Uniform hover lift — all admin buttons (match Generate / btn-dark) */
.admin-theme .btn:hover:not(:disabled),
.admin-theme .admin-nav-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.admin-theme .btn-primary {
    background: linear-gradient(165deg, #60a5fa 0%, #3b82f6 50%, #6366f1 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.admin-theme .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.admin-theme .btn-dark {
    background: linear-gradient(165deg, #334155 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.admin-theme .btn-dark:hover:not(:disabled) {
    background: linear-gradient(165deg, #475569 0%, #1e293b 100%);
    transform: translateY(-1px);
}

.admin-theme .btn-outline {
    background: #fff;
    border-color: #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-theme .btn-outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.admin-theme .btn-outline:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
    background: #fff;
    color: #0f172a;
}

.admin-theme .btn-outline:active:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: scale(0.97);
}

.admin-theme .btn-ghost:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
    color: #0f172a;
}

.admin-theme .btn-ghost:active:not(:disabled) {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

.admin-theme .btn-ghost {
    background: rgba(15,23,42,0.04);
    border-color: transparent;
    color: #475569;
}

.admin-theme .btn-ghost:hover:not(:disabled) {
    background: rgba(15,23,42,0.08);
    color: var(--nv-text);
    transform: translateY(-1px);
}

.admin-theme .btn-success,
.admin-theme .btn-publish-week {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(5,150,105,0.28);
}

.admin-theme .btn-publish-week:hover:not(:disabled),
.admin-theme .btn-success:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.admin-theme .btn-publish-day {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
    font-weight: 600;
}

.admin-theme .btn-publish-day:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.admin-theme .btn-publish-week:disabled,
.admin-theme .btn-publish-day:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.admin-theme .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1c0a00;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

.admin-theme .btn-warning:hover:not(:disabled) {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.admin-theme .btn-danger-text {
    color: #dc2626 !important;
}

/* ── Dash stats ── */
.admin-theme .dash-stat {
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-sm);
}

.admin-theme .dash-stat:hover {
    box-shadow: var(--nv-sh);
    transform: translateY(-1px);
}

.admin-theme .dash-stat .val {
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-theme .dash-stat .lbl {
    color: var(--nv-muted);
}

/* ── Intel strip ── */
.admin-theme .intel-card {
    background: linear-gradient(165deg, var(--nv-panel), #f8fafc);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-sm);
}

.admin-theme .intel-card .value {
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-theme .intel-card.risk .value {
    background: linear-gradient(135deg, #b91c1c, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ── Badge / pill bridge (align with mobile mf-badge) ── */
.admin-theme .status-pill,
.admin-theme .mf-badge,
.admin-theme .mf-publish-badge {
    border-radius: var(--app-radius-pill, 999px);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.admin-theme .mf-badge--counter,
.admin-theme .status-pill.ok,
.admin-theme .status-pill--ok {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-theme .mf-badge--soon,
.admin-theme .status-pill.warn,
.admin-theme .status-pill--warn {
    background: #fffbeb;
    color: #b45309;
}

/* ── Roster cards ── */
.admin-theme .roster-card.premium-card {
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-sm);
    color: var(--nv-text);
}

.admin-theme .roster-card.premium-card:hover {
    border-color: #94a3b8;
    box-shadow: var(--nv-sh);
    transform: translateY(-1px);
}

.admin-theme .roster-card h3 {
    color: var(--nv-text);
}

.admin-theme .dept-badge {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ── Dropzone ── */
.admin-theme .dropzone {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.admin-theme .dropzone:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.admin-theme .dropzone.has-file,
.admin-theme .dropzone.dragover {
    border-color: var(--nv-accent);
    background: #eff6ff;
    box-shadow: 0 0 0 3px var(--nv-accent-glow);
}

/* ── Roster break editor ── */
.admin-theme .break-row {
    background: #f8fafc !important;
    border: 1px solid #eaf0f8 !important;
    border-radius: 0.625rem !important;
}

.admin-theme .break-start,
.admin-theme .break-end {
    background: #ffffff;
    border-color: #dce2ea;
    color: #0f172a;
}

.admin-theme .break-start:focus,
.admin-theme .break-end:focus {
    border-color: var(--nv-accent);
    box-shadow: 0 0 0 3px var(--nv-accent-glow);
}

.admin-theme .btn-nudge {
    background: #ffffff;
    border-color: #dce2ea;
    color: #374151;
}

.admin-theme .btn-nudge:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.admin-theme .btn-delete-break {
    border-color: #fecaca;
    color: #dc2626;
}

.admin-theme .btn-delete-break:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

.admin-theme .btn-add-break {
    color: #94a3b8;
}

.admin-theme .btn-add-break:hover {
    color: var(--nv-accent);
    transform: translateY(-1px);
}

.admin-theme .work-chip {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
}

.admin-theme .work-chip.risk {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.admin-theme .break-type-badge.bg-blue-100 {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.admin-theme .break-type-badge.bg-orange-100 {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

.admin-theme .break-row .text-blue-700 {
    color: #1d4ed8 !important;
}

.admin-theme .dept-select {
    background: #ffffff;
    border: 1px solid #dce2ea;
    color: #0f172a;
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
}

.admin-theme .dept-select:focus {
    border-color: var(--nv-accent);
    box-shadow: 0 0 0 3px var(--nv-accent-glow);
    outline: none;
}

.admin-theme .roster-card.premium-card.cover-risk {
    border-color: #fca5a5;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15), var(--nv-sh-sm);
}

/* Department chips (roster + settings) */
.dept-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.dept-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.dept-chip-remove {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.15rem;
}

.cover-schedule-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.cover-day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    user-select: none;
}

.cover-day-chip--on {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.name-list-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.settings-tab-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.settings-tab-bar::-webkit-scrollbar {
    display: none;
}

.settings-tab {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.admin-theme .settings-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.settings-tab--active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.roster-publish-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8125rem;
}

.roster-publish-status--draft {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.roster-publish-status--live {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.roster-publish-status--stale {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.roster-publish-badge--stale {
    background: #f59e0b;
    color: #fff;
}

.roster-publish-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.roster-publish-badge--draft {
    background: #fb923c;
    color: #fff;
}

.roster-publish-badge--live {
    background: #10b981;
    color: #fff;
}

.roster-publish-note {
    color: inherit;
    opacity: 0.92;
}

.settings-rule-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    margin-bottom: 0.75rem;
}

.holiday-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 600;
}


#dept-manager-panel .panel-title {
    margin-bottom: 0.25rem;
}

.dept-stats-panel {
    border-top: 1px solid var(--border, #e2e8f0);
    padding-top: 0.75rem;
}

.dept-stats-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.dept-stats-title {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text, #0f172a);
}

.dept-stats-range {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.dept-stats-empty {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.dept-stats-foot {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem;
    color: var(--text-soft, #94a3b8);
}

.dept-stats-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dept-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.dept-stats-table th,
.dept-stats-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.dept-stats-table thead th {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    background: #f8fafc;
}

.dept-stats-table .dept-stat-name {
    text-align: left;
    font-weight: 700;
    color: var(--text, #0f172a);
    max-width: 8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dept-stats-table .dept-stat-hit {
    font-weight: 800;
    color: #1d4ed8;
    background: #eff6ff;
}

.dept-stats-table .dept-stat-zero {
    color: #cbd5e1;
}

.dept-stats-table .dept-stat-total {
    font-weight: 800;
    color: var(--text, #0f172a);
    background: #f8fafc;
}

/* ── Day print review dialog ── */
/* Day print fills the viewport — default windowed mode is still large. */
.day-print-dialog {
    max-width: 96vw;
    width: min(96vw, 88rem);
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 1rem;
    padding: 0;
    box-shadow: var(--nv-sh-lg, 0 12px 40px rgba(15, 23, 42, 0.12));
}

.day-print-dialog:not(.day-print-dialog--fullscreen) {
    width: min(96vw, 88rem);
    max-height: 96dvh;
}

.day-print-dialog-inner {
    padding: 1rem 1.25rem;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 0;
}

.day-print-dialog:not(.day-print-dialog--fullscreen) .day-print-dialog-inner {
    height: min(92dvh, 92vh);
}

.day-print-dialog:not(.day-print-dialog--fullscreen) .day-print-body {
    flex: 1;
    min-height: 0;
}

.day-print-dialog:not(.day-print-dialog--fullscreen) .day-print-preview-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.day-print-dialog:not(.day-print-dialog--fullscreen) .day-print-preview {
    flex: 1;
    max-height: none;
    min-height: 12rem;
}

.day-print-dialog:not(.day-print-dialog--fullscreen) .day-print-editor {
    max-height: none;
    flex: 1;
    min-height: 0;
}

.day-print-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.day-print-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.day-print-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.day-print-header-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Day print fills the viewport (not a small centered modal). */
.day-print-dialog.day-print-dialog--fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    border-radius: 0 !important;
}

.day-print-dialog.day-print-dialog--fullscreen::backdrop {
    background: #0f172a;
}

.day-print-dialog--fullscreen .day-print-dialog-inner {
    max-height: 100dvh;
    height: 100dvh;
    padding: 0.4rem 0.55rem;
    overflow: hidden;
    gap: 0.35rem;
}

.day-print-dialog--fullscreen .day-print-header-hint {
    display: none;
}

.day-print-dialog--fullscreen .day-print-header {
    flex-shrink: 0;
}

.day-print-dialog--fullscreen .day-print-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
    flex: 1;
    min-height: 0;
    height: 0; /* flex-1 fills remaining viewport; prevents content-sized growth */
    overflow: hidden;
    align-items: stretch;
}

.day-print-dialog--fullscreen .day-print-preview-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    align-self: stretch;
}

.day-print-dialog--fullscreen .dp-preview-vue {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.day-print-dialog--fullscreen .dp-preview-vue > div {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.day-print-dialog--fullscreen .dp-a4-frame {
    flex: 1;
    min-height: 0;
    align-items: flex-start;
    overflow: auto;
}

.day-print-dialog--fullscreen .day-print-preview {
    max-height: none;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.day-print-dialog--fullscreen .day-print-editor {
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.day-print-dialog--fullscreen .day-print-footer {
    flex-shrink: 0;
}

.day-print-dialog--fullscreen.day-print-dialog--panel-hidden .day-print-body {
    grid-template-columns: 1fr;
}

.day-print-dialog--fullscreen.day-print-dialog--panel-hidden .day-print-editor {
    display: none;
}

.day-print-fs-only {
    display: none;
}

.day-print-dialog--fullscreen .day-print-fs-only {
    display: inline-flex !important;
}

.dp-side-tabs {
    display: flex;
    gap: 0.35rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding-bottom: 0.25rem;
}

.dp-side-tab {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border-radius: 0.45rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.dp-side-tab--active {
    background: var(--nv-primary, #0f172a);
    color: #fff;
    border-color: var(--nv-primary, #0f172a);
}

.dp-side-panel--week {
    padding: 0.25rem 0 0.5rem;
}

.dp-side-panel--shifts {
    padding: 0.15rem 0 0.35rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.dp-shifts-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin-bottom: 0.4rem;
}

.dp-shifts-toolbar .dp-field-hint {
    flex: 1 1 12rem;
    margin: 0;
}

.dp-shifts-root {
    flex: 1;
    min-height: min(62vh, 560px);
    height: min(72vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.5rem;
    background: #fff;
}

.dp-shifts-root .roster-report-sheet--embedded {
    padding: 0.45rem 0.55rem 0.55rem;
    box-shadow: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dp-shifts-root .roster-report-title {
    font-size: 0.95rem;
}

/* Single scroll surface — no nested scrollbar inside the side panel */
.dp-shifts-root .roster-report-scroll {
    flex: 1;
    min-height: 0;
    max-height: none !important;
    overflow: auto;
}

/* Shifts tab: editor dominates — week grid needs real width + height */
.day-print-dialog--shifts-wide.day-print-dialog--fullscreen .day-print-body,
.day-print-dialog--shifts-wide .day-print-body {
    grid-template-columns: minmax(120px, 26%) minmax(0, 1fr) !important;
}

.day-print-dialog--shifts-wide .day-print-editor {
    overflow: hidden !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.day-print-dialog--shifts-wide .day-print-form,
.day-print-dialog--shifts-wide #day-print-form,
.day-print-dialog--shifts-wide .dp-form-vue {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-print-dialog--shifts-wide .dp-side-tabs {
    flex-shrink: 0;
}

.day-print-dialog--shifts-wide .dp-side-panel--shifts {
    flex: 1 1 auto;
    min-height: 0;
}

/* Breaks tab: same wide editor treatment as Shifts */
.day-print-dialog--breaks-wide.day-print-dialog--fullscreen .day-print-body,
.day-print-dialog--breaks-wide .day-print-body {
    grid-template-columns: minmax(140px, 30%) minmax(0, 1fr) !important;
}

.day-print-dialog--breaks-wide .day-print-editor {
    overflow: hidden !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.day-print-dialog--breaks-wide .day-print-form,
.day-print-dialog--breaks-wide #day-print-form,
.day-print-dialog--breaks-wide .dp-form-vue {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-print-dialog--breaks-wide .dp-side-panel--breaks {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dp-breaks-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.dp-breaks-filters {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.dp-breaks-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #475569;
    white-space: nowrap;
}

.dp-breaks-fx-note {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: #0369a1;
}

.dp-breaks-fx-note--busy {
    color: #b45309;
}

.dp-breaks-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.dp-breaks-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.dp-breaks-grid th,
.dp-breaks-grid td {
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: middle;
}

.dp-breaks-grid thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
    font-weight: 600;
    color: #334155;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dp-breaks-col-name { min-width: 5.5rem; }
.dp-breaks-col-shift { min-width: 5rem; color: #64748b; font-variant-numeric: tabular-nums; }

.dp-breaks-name { font-weight: 600; color: #0f172a; }
.dp-breaks-shift { font-size: 0.72rem; }
.dp-breaks-warn {
    display: inline-flex;
    margin-left: 0.25rem;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.65rem;
    font-weight: 700;
}

.dp-breaks-row--focus { background: #eff6ff; }
.dp-breaks-row--warn td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }

.dp-breaks-input {
    width: 4.25rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.dp-breaks-input--active {
    outline: 2px solid #2563eb;
    outline-offset: 0;
    border-color: #2563eb;
}

.dp-breaks-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1.5rem !important;
}

.dp-empty-workspace {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #475569;
}

/* Day Print left-nav workspace (section, not modal).
 * Keep height viewport-bound — never let the tall side editor stretch the A4 column. */
section.day-print-workspace.day-print-dialog {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

section.day-print-workspace .day-print-dialog-inner {
    height: 100%;
    max-height: 100% !important;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.admin-theme.admin-section-day-print {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 !important;
}

body.admin-theme.admin-section-day-print .admin-shell,
body.admin-theme.admin-section-day-print .admin-body {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0 !important;
    overflow: hidden;
}

body.admin-theme.admin-section-day-print .admin-main {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.admin-theme.admin-section-day-print .admin-main > [data-admin-panel="day-print"] {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

body.admin-theme.admin-section-day-print .admin-tahoe-toolbar {
    display: none;
}

/*
 * Day Print — enterprise density chrome.
 * Plan / menus live in the Tahoe topbar (desktop); footer pinned to viewport bottom.
 */
body.admin-section-day-print.dp-day-print-open .admin-tahoe-topbar,
body.admin-section-day-print .admin-tahoe-topbar.admin-tahoe-topbar--minimal {
    padding: 0.18rem 0.65rem !important;
    gap: 0.2rem 0.45rem;
}

body.admin-section-day-print .admin-tahoe-topbar .admin-clock-desktop,
body.admin-section-day-print .admin-tahoe-topbar #admin-save-queue-chip,
body.admin-section-day-print .admin-tahoe-topbar .admin-save-queue-chip {
    display: none !important;
}

/* Hide date chrome row on Day Print — date already on sheet; reclaim a row */
body.admin-section-day-print.dp-day-print-open .admin-tahoe-chrome-row {
    display: none !important;
}

body.admin-section-day-print.dp-day-print-open .admin-tahoe-topbar--minimal .admin-tahoe-title-row,
body.admin-section-day-print .admin-tahoe-topbar--minimal .admin-tahoe-title-row {
    flex: 1 1 auto;
    width: 100%;
    gap: 0.3rem 0.4rem;
    align-items: center;
    flex-wrap: nowrap !important;
}

/* Immediately after Show menu — ONE compact row */
body.admin-section-day-print #day-print-topbar-tools,
body.admin-section-day-print.dp-day-print-open #day-print-topbar-tools {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    order: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    max-width: none;
    margin: 0 0.1rem;
    gap: 0.3rem 0.4rem;
    /* visible so Copy/AI/Day/Print menus are not clipped */
    overflow: visible !important;
    max-height: none;
    visibility: visible !important;
}

body.admin-section-day-print .admin-tahoe-topbar--minimal .admin-tahoe-title-row {
    overflow: visible !important;
}

body.admin-section-day-print .admin-tahoe-topbar.admin-tahoe-topbar--minimal {
    overflow: visible !important;
}

body.admin-section-day-print #day-print-topbar-tools[hidden],
body.admin-section-day-print #day-print-topbar-tools.hidden {
    display: inline-flex !important;
}

body:not(.admin-section-day-print) #day-print-topbar-tools {
    display: none !important;
}

body.admin-section-day-print .admin-tahoe-title-row > .admin-menu-toggle,
body.admin-section-day-print .admin-tahoe-title-row > .admin-nav-toggle {
    flex: 0 0 auto;
}

body.admin-section-day-print .admin-tahoe-title-row > .admin-mobile-title {
    display: none !important;
}

body.admin-section-day-print .admin-tahoe-title-row > .admin-tahoe-section-label {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 0.82rem;
    white-space: nowrap;
}

body.admin-section-day-print .admin-tahoe-title-row > #admin-cmd-trigger {
    flex: 0 0 auto;
    margin-left: 0.2rem;
}

/* Force Plan + menus + History onto one horizontal strip */
body.admin-section-day-print #day-print-topbar-tools .dp-chrome-toolbar {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.25rem 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body.admin-section-day-print #day-print-topbar-tools .dp-quick-bar {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.2rem;
    padding: 0 !important;
    margin: 0 !important;
}

body.admin-section-day-print #day-print-topbar-tools .dp-menubar {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.05rem;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body.admin-section-day-print #day-print-topbar-tools .day-print-status-right {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.2rem;
    flex: 0 0 auto;
    margin: 0;
}

body.admin-section-day-print #day-print-topbar-tools .day-print-tabs {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
    margin: 0 0.15rem 0 0.25rem;
    padding: 0.1rem;
    min-height: 1.45rem;
}

body.admin-section-day-print #day-print-topbar-tools .day-print-tabs .dp-tab,
body.admin-section-day-print #day-print-topbar-tools .day-print-tabs button {
    min-height: 1.35rem !important;
    padding: 0.1rem 0.45rem !important;
    font-size: 0.65rem !important;
    white-space: nowrap;
}

body.admin-section-day-print #day-print-topbar-tools .dp-dropdown-menu {
    z-index: 80;
}

body.admin-section-day-print #day-print-topbar-tools .dp-quick-btn {
    padding: 0.14rem 0.42rem !important;
    font-size: 0.68rem !important;
    min-height: 1.45rem !important;
    line-height: 1.1 !important;
    border-radius: 0.3rem;
    white-space: nowrap;
}

body.admin-section-day-print #day-print-topbar-tools .dp-menu-trigger {
    padding: 0.12rem 0.32rem !important;
    font-size: 0.68rem !important;
    min-height: 1.45rem !important;
    line-height: 1.1 !important;
    white-space: nowrap;
}

body.admin-section-day-print #day-print-topbar-tools .day-print-status-right .btn,
body.admin-section-day-print #day-print-topbar-tools .day-print-status-right .dp-toolbar-btn,
body.admin-section-day-print #day-print-topbar-tools .day-print-status-right .btn-xs {
    min-height: 1.45rem !important;
    padding: 0.1rem 0.35rem !important;
    font-size: 0.65rem !important;
    white-space: nowrap;
}

/* Collapse the in-dialog status strip further — date/sync only */
body.admin-section-day-print .day-print-workspace .day-print-status-bar--slim {
    min-height: 0;
    padding-bottom: 0.1rem;
    gap: 0.25rem;
}

body.admin-section-day-print .day-print-workspace .day-print-status-bar--slim .day-print-title {
    display: none !important;
}

.day-print-workspace .day-print-dialog-inner {
    padding: 0.25rem 0.55rem 0 !important;
    gap: 0.25rem !important;
}

.day-print-workspace .day-print-header {
    padding: 0;
    margin: 0;
}

.day-print-workspace .day-print-status-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    min-height: 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--nv-border, #e4e9f0);
}

/* After menus move to topbar — only date / sync chips remain */
.day-print-workspace .day-print-status-bar--slim {
    min-height: 0;
    padding-bottom: 0.15rem;
}

.day-print-workspace .day-print-status-bar--slim .day-print-title {
    display: none;
}

.day-print-workspace .day-print-status-left {
    flex: 0 1 auto;
    min-width: 0;
}

.day-print-workspace .day-print-status-right {
    flex: 0 0 auto;
    margin-left: 0;
}

.day-print-workspace .day-print-title {
    font-size: 0.95rem;
    line-height: 1.15;
    margin: 0;
}

.day-print-workspace .dp-status-date {
    font-size: 0.78rem;
}

.day-print-workspace .day-print-status-right .btn,
.day-print-workspace .day-print-status-right .dp-toolbar-btn,
.day-print-workspace .day-print-status-right .btn-xs {
    min-height: 1.7rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
}

/* Plan / menus share the status row when not relocated to topbar */
.day-print-workspace .dp-chrome-toolbar {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.day-print-workspace .dp-chrome-toolbar .dp-quick-bar {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.day-print-workspace .dp-chrome-toolbar .dp-menubar {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
    margin: 0;
    border: 0;
}

.day-print-workspace .dp-quick-btn {
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    min-height: 1.7rem;
    border-radius: 0.4rem;
}

.day-print-workspace .dp-menu-trigger {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    min-height: 1.7rem;
}

.day-print-workspace .dp-preview-hint,
.day-print-workspace .dp-preview-hint[hidden] {
    display: none !important;
}

/* Collapse Break times / debug chrome — keep footer glued to bottom */
.day-print-workspace .dp-break-collapse:not([open]) {
    margin: 0;
    border: 0;
    padding: 0;
}

.day-print-workspace .dp-break-collapse:not([open]) .dp-break-collapse-summary {
    display: none;
}

.day-print-workspace .day-print-dialog-inner {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0;
    height: 100%;
    max-height: 100%;
}

.day-print-workspace .day-print-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* Pin action bar to the browser bottom of the Day Print viewport */
.day-print-workspace .day-print-footer {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    padding: 0.45rem 0.15rem calc(0.25rem + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff;
    border-top: 1px solid var(--nv-border, #e4e9f0);
    position: sticky;
    bottom: 0;
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

body.admin-section-day-print.dp-day-print-open #day-print-dialog.day-print-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

/* Desktop: glue footer to the bottom edge of the admin content column */
@media (min-width: 768px) {
    body.admin-section-day-print.dp-day-print-open .admin-body {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    body.admin-section-day-print.dp-day-print-open .admin-main {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    body.admin-section-day-print.dp-day-print-open .day-print-workspace .day-print-dialog-inner {
        padding-bottom: 0 !important;
    }

    body.admin-section-day-print.dp-day-print-open .day-print-workspace .day-print-footer {
        position: sticky;
        bottom: 0;
        margin-top: auto !important;
        width: 100%;
    }
}

.day-print-workspace .day-print-footer-tools {
    gap: 0.35rem;
}

.day-print-workspace .day-print-footer .btn {
    min-height: 2.15rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.day-print-workspace .day-print-footer-primary .btn-primary {
    padding: 0.35rem 0.95rem;
    font-size: 0.85rem;
}

/* Publish banner is roster chrome — hide while Day Print owns the viewport */
body.admin-section-day-print #publish-sync-banner,
body.dp-day-print-open #publish-sync-banner {
    display: none !important;
}

.day-print-workspace .dp-side-tabs {
    gap: 0.25rem;
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
}

.day-print-workspace .dp-side-tab {
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
    min-height: 1.75rem;
}

.day-print-workspace .day-print-form {
    padding: 0.4rem 0.45rem !important;
}

.day-print-workspace .dp-breaks-toolbar {
    align-items: center;
    margin-bottom: 0.35rem;
    gap: 0.5rem;
}

.day-print-workspace .dp-breaks-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.day-print-workspace .dp-breaks-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

/* Breaks / Shifts: fill remaining editor height (no fixed 210px chrome guess) */
.day-print-dialog--breaks-wide .dp-breaks-grid-wrap,
.day-print-dialog--shifts-wide .dp-shifts-root {
    height: auto;
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
}

.day-print-dialog--shifts-wide .dp-shifts-root {
    height: 100% !important;
    min-height: 0 !important;
}

.day-print-dialog--shifts-wide .dp-shifts-root {
    /* Fill editor pane — chrome density handles remaining viewport */
    height: 100%;
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
}

.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-sheet--embedded {
    height: 100%;
}

.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-header,
.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-toolbar,
.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-regen {
    flex-shrink: 0;
}

.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-section {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-section-bar {
    flex-shrink: 0;
}

.day-print-dialog--shifts-wide .dp-shifts-root .roster-report-scroll {
    flex: 1 1 auto;
    min-height: 320px;
    height: auto;
    max-height: none !important;
}

.day-print-dialog--shifts-wide .day-print-preview-col {
    opacity: 0.75;
    pointer-events: none;
}

.dp-counter-mode-grid--styles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

.dp-counter-mode-grid--styles .btn {
    text-align: left;
    white-space: normal;
    line-height: 1.25;
    min-height: 2.4rem;
    padding: 0.35rem 0.5rem;
}

.dp-counter-mode-grid--styles .btn.dp-rot-style--active {
    background: var(--nv-primary, #0f172a);
    color: #fff;
    border-color: var(--nv-primary, #0f172a);
}

.dp-rot-style-meta {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 0.1rem;
}

.dp-merge-list--fields {
    margin: 0.35rem 0 0.85rem 1rem;
    padding: 0;
    list-style: none;
}

.dp-merge-field {
    margin: 0.2rem 0;
    font-size: 0.85rem;
}

.dp-merge-field--diff {
    font-weight: 600;
}

.dp-merge-diff-tag {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}

.dp-merge-brand-title {
    display: block;
    margin-top: 0.5rem;
}

.dp-week-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.dp-week-hg-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.dp-week-hg-pill--warn {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.dp-week-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.55rem;
    background: #fff;
}

.dp-week-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.dp-week-grid th,
.dp-week-grid td {
    border: 1px solid #e8edf3;
    padding: 0.35rem 0.3rem;
    text-align: center;
    vertical-align: middle;
}

.dp-week-row-label {
    text-align: left !important;
    font-weight: 700;
    white-space: nowrap;
    background: #f8fafc;
    padding-left: 0.5rem !important;
    min-width: 5.5rem;
}

.dp-week-col--today {
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.dp-week-select {
    min-width: 5.5rem;
    max-width: 7rem;
    font-size: 0.68rem;
    padding: 0.15rem 0.2rem;
}

.dp-zones-table th:nth-child(3),
.dp-zones-table td:nth-child(3) {
    min-width: 4.5rem;
}

.ds-zone-hg-note {
    font-size: 0.72em;
    color: #64748b;
    font-weight: 600;
}

.ds-zone-cover-caption {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    margin: 0 5pt 0.2rem;
    letter-spacing: 0.01em;
}

.ds-zone-lock {
    font-size: 0.7rem;
    color: #b45309;
    margin-left: 0.15rem;
}

.dp-side-panel--counter .dp-fieldset--counter-rules {
    border-color: #93c5fd;
    background: #f8fafc;
}

.dp-field-row--stack {
    flex-direction: column;
    align-items: stretch;
}

.dp-field-row--stack label {
    margin-bottom: 0.15rem;
}

.dp-web-role {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 5.5rem;
}

.ds-web-assignment {
    line-height: 1.35;
    margin: 0;
}

.ds-web-role-lines {
    display: block;
    margin-top: 2pt;
}

.ds-inline-web-role {
    white-space: pre-line;
    display: block;
    min-height: 1.2em;
}

.ds-phone-web {
    display: block;
}

.day-print-tabs {
    display: flex;
    gap: 0.35rem;
}

.dp-tab {
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
}

.dp-tab:hover {
    background: #f8fafc;
    color: #0f172a;
}

.dp-tab:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.dp-tab:active {
    background: #f1f5f9;
    color: #0f172a;
}

.dp-tab--active {
    background: var(--nv-primary, #0f172a);
    color: #fff;
    border-color: var(--nv-primary, #0f172a);
}

.day-print-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
    gap: 1rem;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.day-print-dialog--fullscreen .day-print-body {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 34%);
    gap: 1.25rem;
}

.day-print-preview {
    overflow: auto;
    max-height: 72vh;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.5rem;
    background: #e2e8f0;
    padding: 1rem;
    min-width: 0;
}

.day-print-version-chip {
    display: inline-flex;
    align-items: center;
    margin: 0.35rem 0 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.day-print-version-chip--ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.day-print-version-chip--saving {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.day-print-version-chip--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.day-print-history {
    margin-top: 0.65rem;
    padding: 0.65rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #fff;
    max-height: 220px;
    overflow: auto;
}

.day-print-history::before {
    content: 'Version history';
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.dp-history-empty {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
}

.dp-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.dp-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
}

.dp-history-item--latest {
    border-color: #93c5fd;
    background: #eff6ff;
}

.dp-history-main {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.dp-history-main strong {
    font-size: 0.78rem;
    line-height: 1.3;
}

.dp-history-meta {
    font-size: 0.72rem;
    color: #64748b;
}

.dp-history-vtag {
    display: inline-block;
    width: fit-content;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 800;
}

.dp-history-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.dp-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    margin: 0.35rem 0;
}

.dp-banner--warn {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.dp-banner--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.dp-banner.hidden { display: none; }

.day-print-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    width: 100%;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    color: #475569;
}

.dp-opt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
}

.day-print-history-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dp-bookmark-input {
    width: 9rem;
    max-width: 40vw;
}

.dp-diff-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
}

.dp-counter-rules,
.dp-counter-live,
.dp-counter-review {
    margin-top: 0.65rem;
    padding: 0.65rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #f8fafc;
}

details.dp-counter-live {
    padding: 0;
    overflow: hidden;
}

details.dp-counter-live > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.55rem 0.65rem;
    margin: 0;
}

details.dp-counter-live > summary::-webkit-details-marker {
    display: none;
}

details.dp-counter-live > summary::before {
    content: '▸ ';
    color: #64748b;
    font-size: 0.7rem;
}

details.dp-counter-live[open] > summary::before {
    content: '▾ ';
}

details.dp-counter-live[open] > summary {
    border-bottom: 1px solid #e2e8f0;
}

details.dp-counter-live > ul,
details.dp-counter-live > .dp-counter-suggestions {
    padding: 0.55rem 0.65rem;
}

details.dp-counter-live > ul {
    max-height: 10rem;
    overflow-y: auto;
}

.dp-mini-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.dp-counter-mode-grid,
.dp-template-chip-grid,
.dp-counter-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.dp-counter-live-head,
.dp-counter-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
}

.dp-counter-live-head span,
.dp-counter-review-head span {
    color: #64748b;
    font-weight: 700;
}

.dp-counter-live ul,
.dp-counter-review ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.dp-counter-live li,
.dp-counter-issue {
    display: grid;
    gap: 0.1rem;
    padding-left: 0.55rem;
    border-left: 3px solid #94a3b8;
    font-size: 0.76rem;
    line-height: 1.35;
}

.dp-counter-live li span,
.dp-counter-issue span {
    color: #64748b;
}

.dp-counter-live--error,
.dp-counter-review--error {
    border-color: #fecaca;
    background: #fff7f7;
}

.dp-counter-live--warn,
.dp-counter-review--warn {
    border-color: #fde68a;
    background: #fffbeb;
}

.dp-counter-live-item--error,
.dp-counter-issue--error { border-left-color: #dc2626; }
.dp-counter-live-item--warn,
.dp-counter-issue--warn { border-left-color: #d97706; }
.dp-counter-live-item--info,
.dp-counter-issue--info { border-left-color: #2563eb; }
.dp-counter-live-item--ok,
.dp-counter-issue--ok { border-left-color: #16a34a; }

.dp-preview-empty {
    margin: 2rem auto;
    max-width: 28rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
}

.dp-a4-frame {
    display: flex;
    justify-content: center;
    min-height: 100%;
}

.dp-a4-page {
    width: 210mm;
    min-height: 297mm;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.day-print-preview .day-sheet {
    transform: none;
    width: 100%;
    margin: 0;
}

/* On-screen A4 rendering for the week sheet so the editable preview looks like
   the printed page (the print.css rules only apply inside @media print). */
.dp-a4-page .print-sheet:not(.day-sheet) {
    padding: 14mm 12mm;
    color: #111;
    font-size: 9pt;
    line-height: 1.25;
}

.dp-a4-page .print-sheet + .print-sheet { margin-top: 12mm; }

.dp-a4-page .print-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12pt;
    margin: 0 0 8pt;
    padding: 0 0 6pt;
    border-bottom: 1pt solid #000;
}

.dp-a4-page .print-sheet-header-main { flex: 1; min-width: 0; }
.dp-a4-page .print-sheet-title { margin: 0; font-size: 13pt; font-weight: 700; line-height: 1.2; }
.dp-a4-page .print-sheet-sub { margin: 3pt 0 0; font-size: 8pt; font-weight: 500; color: #444; }
.dp-a4-page .print-sheet-printed { flex-shrink: 0; font-size: 7pt; color: #666; text-align: right; white-space: nowrap; }

.dp-a4-page .print-week-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    font-size: 9pt;
    border: 1pt solid #000;
}

.dp-a4-page .print-week-table th,
.dp-a4-page .print-week-table td {
    border: 0.5pt solid #888;
    padding: 4pt 5pt;
    vertical-align: middle;
    text-align: center;
    line-height: 1.25;
}

.dp-a4-page .print-week-table .print-col-name { width: 32%; text-align: left; font-weight: 600; padding-left: 6pt; }
.dp-a4-page .print-week-table .print-col-shift { width: 16%; font-variant-numeric: tabular-nums; }
.dp-a4-page .print-week-table .print-col-break { width: 13%; font-variant-numeric: tabular-nums; font-weight: 700; }

.dp-a4-page .print-week-table thead th {
    background: #ebebeb;
    font-size: 7.5pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #222;
    border-bottom: 1pt solid #000;
}

.dp-a4-page .print-week-table tbody tr:nth-child(even):not(.print-day-divider) td { background: #f7f7f7; }

.dp-a4-page .print-week-table .print-day-divider td {
    background: #f0f0f0;
    text-align: left;
    font-size: 8.5pt;
    font-weight: 700;
    color: #000;
    border-top: 1pt solid #000;
}

.dp-a4-page .print-week-table .print-day-divider-date { font-weight: 500; color: #666; font-size: 8pt; }
.dp-a4-page .print-week-table .print-empty { color: #999; font-style: italic; }
.dp-a4-page .print-time--empty { color: #bbb; }

/* ===================================================================
   On-screen A4 rendering for the DAY sheet so the editable preview is
   true WYSIWYG (these .ds-* rules otherwise only exist in @media print).
   Mirrors public/css/print.css so preview === printed output.
   =================================================================== */
.dp-a4-page .print-sheet.day-sheet {
    padding: 11mm 10mm;
    color: #111;
    box-sizing: border-box;
    font-size: 7.5pt;
    line-height: 1.25;
}

.dp-a4-page .day-sheet--briscoes { font-size: 7pt; }

.dp-a4-page .ds-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6pt;
    padding-bottom: 4pt;
    border-bottom: 1.5pt solid #000;
}
.dp-a4-page .ds-brand { font-size: 13pt; font-weight: 800; letter-spacing: -0.01em; }
.dp-a4-page .day-sheet--briscoes .ds-brand { font-size: 12pt; }
.dp-a4-page .ds-date {
    font-size: 9pt;
    font-weight: 600;
    border: 0.75pt solid #000;
    padding: 1.5pt 6pt;
    border-radius: 2pt;
}

.dp-a4-page .ds-grid-top,
.dp-a4-page .ds-grid-mid {
    display: flex;
    gap: 5pt;
    margin-bottom: 5pt;
    align-items: stretch;
}
.dp-a4-page .ds-grid-top > .ds-box,
.dp-a4-page .ds-grid-mid > .ds-box,
.dp-a4-page .ds-grid-mid > .ds-col { flex: 1; min-width: 0; }

.dp-a4-page .ds-col { display: flex; flex-direction: column; gap: 5pt; }
.dp-a4-page .ds-col > .ds-box { flex: 1; }
.dp-a4-page .ds-col > .ds-box.ds-recovery-box { flex: 1.55; min-height: 0; }
.dp-a4-page .ds-col > .ds-box.ds-phones { flex: 0 0 auto; }
.dp-a4-page .ds-phones .ds-free-space { display: none; min-height: 0; }
.dp-a4-page .ds-phones .ds-line { margin-top: 2pt; }

.dp-a4-page .ds-box {
    border: 0.75pt solid #000;
    border-radius: 2.5pt;
    padding: 0 0 3pt;
    background: #fff;
    overflow: hidden;
}
.dp-a4-page .ds-box-title {
    font-weight: 700;
    font-size: 7.75pt;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 3pt;
    padding: 2.5pt 5pt;
    background: #ececec;
    border-bottom: 0.5pt solid #bbb;
}
.dp-a4-page .ds-box > :not(.ds-box-title) { margin-left: 5pt; margin-right: 5pt; }
.dp-a4-page .ds-box > table { width: calc(100% - 10pt); }
.dp-a4-page .ds-box > :first-child:not(.ds-box-title) { margin-top: 4pt; }
.dp-a4-page .ds-recovery-name { text-decoration: underline; }

.dp-a4-page .ds-line {
    border-bottom: 0.5pt solid #999;
    padding: 1.5pt 0 1pt;
    min-height: 8pt;
}
.dp-a4-page .ds-yesterday-label { font-weight: 600; }
.dp-a4-page .ds-yesterday-val { font-weight: 700; }
.dp-a4-page .ds-line.ds-small { font-size: 7pt; line-height: 1.25; }

.dp-a4-page .ds-p { margin: 1.5pt 0; line-height: 1.3; }
.dp-a4-page .ds-indent { padding-left: 8pt; }
.dp-a4-page .ds-free-space { min-height: 22pt; }
.dp-a4-page .ds-phones .ds-free-space { min-height: 14pt; }
.dp-a4-page .day-sheet--briscoes .ds-free-space { min-height: 16pt; }

.dp-a4-page .ds-kv,
.dp-a4-page .ds-signup {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4pt;
}
.dp-a4-page .ds-kv td,
.dp-a4-page .ds-signup td {
    border: 0.5pt solid #888;
    padding: 2pt 3pt;
    font-size: 7pt;
    height: 10pt;
}
.dp-a4-page .ds-kv-label { font-weight: 600; width: 42%; }

.dp-a4-page .ds-break-table,
.dp-a4-page .ds-counter-table,
.dp-a4-page .ds-warden-table {
    width: 100%;
    border-collapse: collapse;
    border: 0.75pt solid #000;
}
.dp-a4-page .ds-break-table { margin-bottom: 3pt; }

.dp-a4-page .ds-break-table th, .dp-a4-page .ds-break-table td,
.dp-a4-page .ds-counter-table th, .dp-a4-page .ds-counter-table td,
.dp-a4-page .ds-warden-table th, .dp-a4-page .ds-warden-table td {
    border: 0.5pt solid #888;
    padding: 2pt 3pt;
    text-align: center;
    font-size: 7pt;
}
.dp-a4-page .ds-break-table thead th,
.dp-a4-page .ds-counter-table thead th,
.dp-a4-page .ds-warden-table thead th {
    background: #ebebeb;
    font-weight: 700;
    font-size: 6.75pt;
}
.dp-a4-page .ds-break-table .ds-name { text-align: left; font-weight: 600; }
.dp-a4-page .ds-break-table .ds-shift { width: 16%; font-variant-numeric: tabular-nums; }
.dp-a4-page .ds-break-table tbody td { font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-a4-page .ds-break-table tbody .ds-name,
.dp-a4-page .ds-break-table tbody .ds-shift { font-weight: 600; }
.dp-a4-page .ds-break-table tbody tr:nth-child(even) td { background: #f5f5f5; }
.dp-a4-page .ds-covering { font-size: 7pt; font-style: italic; font-weight: 500; color: #555; }

.dp-a4-page .ds-grid-bottom { display: flex; gap: 5pt; align-items: stretch; }
.dp-a4-page .ds-grid-bottom--stacked { flex-direction: column; gap: 4pt; }
.dp-a4-page .ds-grid-bottom--stacked > .ds-box { flex: none; width: 100%; }
.dp-a4-page .ds-grid-bottom > .ds-box { flex: 1; min-width: 0; }
.dp-a4-page .ds-grid-bottom--rebel > .ds-box:first-child { flex: 1.35; }

.dp-a4-page .ds-ct-time { width: 32%; font-variant-numeric: tabular-nums; }
.dp-a4-page .ds-ct-name { width: 22%; font-weight: 600; }
.dp-a4-page .ds-ct-reliever { width: 46%; font-weight: 600; font-size: 6.75pt; text-align: left; }
.dp-a4-page .ds-ct-caption { font-size: 6.5pt; color: #555; margin-top: 2pt; text-align: right; }
.dp-a4-page .ds-phone-web { margin-top: 3pt; }
.dp-a4-page .ds-phone-web-label { font-weight: 700; margin-right: 4pt; }
.dp-a4-page .ds-wd-label { text-align: left; font-weight: 600; width: 28%; }
.dp-a4-page .ds-wd-name { font-weight: 700; width: 22%; }
.dp-a4-page .ds-wd-reliever { font-weight: 600; font-size: 6.75pt; text-align: left; width: 50%; }
.dp-a4-page .ds-wd-row--apparel td { background: #fff8e6; }
.dp-a4-page .ds-wd-row--apparel .ds-wd-label { font-weight: 800; }

.dp-a4-page .ds-web-table { width: 100%; border-collapse: collapse; }
.dp-a4-page .ds-web-table td {
    border: 0.5pt solid #888;
    padding: 2pt 3pt;
    font-size: 7pt;
    vertical-align: middle;
}
.dp-a4-page .ds-web-label { font-weight: 700; width: 28%; text-align: left; }
.dp-a4-page .ds-web-cell { font-weight: 600; }
.dp-a4-page .ds-web-time { font-size: 7.5pt; font-weight: 500; color: #444; }

.ds-inline-edit {
    outline: none;
    border-radius: 2px;
    min-width: 0.5em;
    display: inline-block;
    cursor: text;
    caret-color: #1d4ed8;
    user-select: text;
    -webkit-user-select: text;
}

.ds-inline-edit:hover,
.ds-inline-edit--active,
.ds-inline-edit.pie-field--active {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.ds-inline-edit:focus,
.ds-inline-edit.pie-field--active {
    background: rgba(59, 130, 246, 0.14);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.55);
}

.ds-inline-edit[data-dp-placeholder].pie-empty:not(:focus):not(.pie-field--active)::before {
    content: attr(data-dp-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.ds-inline-edit[data-dp-placeholder].pie-empty:not(:focus):not(.pie-field--active) {
    min-width: 2.5em;
}

.ds-inline-bullets {
    display: block;
    white-space: pre-wrap;
    min-height: 1.2em;
}

/* PrintEditable — Word-like click-to-edit affordance on any sheet text.
   Hit area is enlarged with padding + matching negative margin so the click
   target is generous (easy to tap/aim at) while the A4 layout stays pixel-identical. */
.pe-editable {
    outline: none;
    border-radius: 3px;
    cursor: text;
    caret-color: #2563eb;
    padding: 3px 5px;
    margin: -3px -5px;
    min-height: 1.5em;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}

.pe-editable:hover {
    background: rgba(59, 130, 246, 0.10);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.30);
}

.pe-editable:focus,
.pe-editable.pie-field--active {
    background: rgba(59, 130, 246, 0.16);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.60);
    caret-color: #1d4ed8;
}

.pe-editable[data-doc-kind="break"] {
    font-variant-numeric: tabular-nums;
    min-width: 3.2em;
    display: inline-block;
    text-align: center;
}

/* Fatter caret on focus so the insertion point is easy to see while editing. */
.dp-a4-page .pe-editable:focus {
    font-feature-settings: normal;
}

@media print {
    .pe-editable {
        background: none !important;
        box-shadow: none !important;
        outline: none !important;
        /* Neutralise the on-screen hit-area padding so print matches exactly. */
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        caret-color: auto !important;
    }
}

.ds-inline-muted:empty::before {
    content: 'lead (optional)';
    color: #94a3b8;
    font-weight: normal;
}

.ds-yesterday-val--empty:empty::before {
    content: 'result';
    color: #94a3b8;
}

/* Vue 3 inline edit — Word/A4 plain text look */
.vue-inline-cell {
    cursor: text;
    border-radius: 2px;
    min-width: 2.5em;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.vue-inline-cell:hover,
.vue-inline-cell--edit {
    background: rgba(59, 130, 246, 0.08);
}

.vue-inline-display {
    display: inline;
}

.vue-inline-input {
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: inherit;
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 3em;
    font-variant-numeric: tabular-nums;
}

.vue-inline-input--time,
.vue-inline-input--24h {
    width: 5.5em;
    font-variant-numeric: tabular-nums;
}

.vue-inline-display--24h {
    font-variant-numeric: tabular-nums;
}

.vue-print-sheet .print-col-break {
    font-variant-numeric: tabular-nums;
}

.vue-day-break-bar {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px dashed var(--nv-border, #e2e8f0);
    border-radius: 0.5rem;
    background: #fafbfc;
}

.vue-day-break-bar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nv-muted, #64748b);
    margin: 0 0 0.5rem;
}

.day-print-preview-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.day-print-preview-col > .day-print-preview {
    flex: 1 1 auto;
    min-height: 12rem;
}

.day-print-counter-fairness {
    flex-shrink: 0;
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.dp-counter-summary-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.3;
}

.dp-counter-summary-chip--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.dp-counter-summary-chip:hover {
    filter: brightness(0.97);
}

.counter-fairness-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.45rem;
    background: #f8fafc;
    border: 1px solid var(--nv-border, #e2e8f0);
    font-size: 0.72rem;
}

.counter-fairness-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nv-muted, #64748b);
    margin-right: 0.25rem;
}

.counter-fairness-chip {
    display: inline-flex;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.counter-fairness-chip--warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.counter-fairness-alert {
    color: #b45309;
    font-weight: 600;
    margin-left: auto;
}

.counter-fairness-note {
    font-size: 0.72rem;
    color: #0369a1;
    font-weight: 600;
}

#day-print-confirm.dp-confirm--counter-blocked:not(:disabled) {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.35);
}

#day-print-confirm.dp-confirm--done:not(:disabled) {
    background: #0f766e !important;
    border-color: #0f766e !important;
}

.day-print-confirmed-chip {
    background: rgba(15, 118, 110, 0.12) !important;
    color: #0f766e !important;
    border: 1px solid rgba(15, 118, 110, 0.28);
    font-weight: 700;
}

.day-print-dialog--confirmed .day-print-preview {
    outline: 2px solid rgba(15, 118, 110, 0.35);
    outline-offset: 2px;
}

#day-print-print:disabled {
    opacity: 0.45;
}

.day-print-dialog--preview #day-print-confirm[disabled] {
    opacity: 0.65;
}

.counter-fairness-empty {
    font-size: 0.72rem;
    color: var(--nv-muted, #64748b);
    margin: 0.35rem 0 0;
}

.week-print-preview {
    max-height: 72vh;
    overflow: auto;
}

.day-print-editor {
    overflow-y: auto;
    max-height: 72vh;
    padding-right: 0.25rem;
}

.day-print-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Vue reactive form root (mounted inside #day-print-form) inherits the
   column spacing the fieldsets used to get from the flex parent. */
.dp-form-vue {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dp-fieldset {
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.5rem;
    padding: 0.5rem 0.65rem;
    margin: 0;
}

.dp-fieldset legend {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nv-muted, #64748b);
    padding: 0 0.25rem;
}

.dp-field-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.dp-field-row label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nv-muted, #64748b);
}

.dp-zones-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.dp-zones-table th,
.dp-zones-table td {
    border: 1px solid var(--nv-border, #e2e8f0);
    padding: 0.3rem 0.4rem;
    vertical-align: middle;
}

.dp-zones-table th {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nv-muted, #64748b);
    background: var(--nv-surface-2, #f8fafc);
}

.dp-zones-table .dp-zones-label {
    font-weight: 600;
    white-space: nowrap;
    width: 28%;
}

.dp-zones-table .dp-zones-reliever-toggle {
    width: 4.5rem;
    text-align: center;
}

.dp-zones-reliever-check {
    justify-content: center;
    margin: 0;
}

.dp-zones-row--apparel td {
    background: #fffbeb;
}

.dp-zones-row--apparel .dp-zones-label {
    font-weight: 800;
}

.dp-zones-na {
    display: inline-block;
    min-width: 1.5rem;
    color: var(--nv-muted, #94a3b8);
    font-size: 0.85rem;
    text-align: center;
}

.dp-why-today {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.75rem 0.55rem;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.dp-why-today--pinned {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.dp-why-today-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}

.dp-why-today-titles {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dp-why-today-title {
    font-size: 0.82rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dp-why-today-summary {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}

.dp-why-today-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
}

.dp-why-ready-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.dp-why-cascade {
    margin: 0 0 0.45rem;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    background: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 650;
    color: #0f172a;
    line-height: 1.4;
}

.dp-why-delta,
.dp-why-drift {
    margin: 0 0 0.4rem;
    font-size: 0.68rem;
    color: #0369a1;
    line-height: 1.35;
}

.dp-why-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dp-why-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    border: 1px solid transparent;
    border-left: 3px solid #94a3b8;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dp-why-item:hover,
.dp-why-item:focus-visible,
.dp-why-item--active {
    background: #fff;
    border-color: #cbd5e1;
    outline: none;
}

.dp-why-item--active {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.dp-why-item--ok { border-left-color: #22c55e; }
.dp-why-item--info { border-left-color: #3b82f6; }
.dp-why-item--warn { border-left-color: #f59e0b; }
.dp-why-item--block { border-left-color: #ef4444; }

.dp-why-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
}

.dp-why-item-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #0f172a;
}

.dp-why-src {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 650;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dp-why-item-detail {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}

.dp-why-timeline {
    font-size: 0.64rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #475569;
    line-height: 1.35;
}

.dp-why-fix {
    align-self: flex-start;
    margin-top: 0.15rem;
}

.dp-why-ok-toggle {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.68rem;
    color: #64748b;
}

.dp-why-whatif {
    margin-top: 0.45rem;
    font-size: 0.7rem;
    color: #475569;
}

.dp-why-whatif summary {
    cursor: pointer;
    font-weight: 650;
}

.dp-why-whatif-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dp-why-whatif-list li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.65);
}

.dp-why-whatif-list strong {
    font-size: 0.7rem;
    color: #0f172a;
}

.dp-why-whatif-list span {
    font-size: 0.66rem;
    color: #64748b;
}

.dp-why-empty {
    margin: 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

.dp-why-printcheck-hint {
    margin: 0.45rem 0 0;
    font-size: 0.62rem;
    color: #94a3b8;
    line-height: 1.35;
}

#day-print-make-ready {
    font-weight: 700;
}

.dp-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.5rem 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--nv-text, #0f172a);
    cursor: pointer;
}

.dp-check-row input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.dp-check-row--disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.dp-check-row--disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.dp-chief-counter span {
    line-height: 1.35;
}

.dp-side-input {
    caret-color: #1d4ed8;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.dp-side-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.28);
    outline: none;
}

.dp-field-row--mirror-focus {
    background: rgba(59, 130, 246, 0.08);
    border-radius: 0.35rem;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
    transition: background 0.15s ease;
}

.dp-field-row--mirror-focus .dp-side-input {
    border-color: #60a5fa;
}

.day-print-preview,
.day-print-form {
    scroll-behavior: smooth;
}

.dp-format-bar {
    flex-shrink: 0;
    margin-bottom: 0.35rem;
    padding: 0.25rem 0.35rem;
    background: #fff;
    border: 1px solid var(--nv-border, #dbe3ee);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.dp-format-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.dp-format-btn {
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    color: #0f172a;
}

.dp-format-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.dp-format-btn--active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.dp-format-sep {
    width: 1px;
    height: 1.25rem;
    background: #e2e8f0;
    margin: 0 0.15rem;
}

.ds-inline-edit b,
.ds-inline-edit strong,
.pe-editable b,
.pe-editable strong { font-weight: 800; }

.ds-inline-edit i,
.ds-inline-edit em,
.pe-editable i,
.pe-editable em { font-style: italic; }

.ds-inline-edit u,
.pe-editable u { text-decoration: underline; }

.ds-inline-edit s,
.ds-inline-edit strike,
.pe-editable s,
.pe-editable strike { text-decoration: line-through; }

.dp-format-size-select {
    max-width: 4.5rem;
    font-size: 0.7rem;
    padding: 0.1rem 0.2rem;
    height: 1.85rem;
}

.dp-format-colors {
    display: inline-flex;
    gap: 0.15rem;
    align-items: center;
}

.dp-format-color-swatch {
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.2rem;
    padding: 0;
    cursor: pointer;
}

.dp-format-color-swatch:hover {
    transform: scale(1.1);
}

.day-print-alerts-chip {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #c2410c;
    cursor: pointer;
}

.day-print-alerts-chip.dp-alerts-chip--error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.dp-side-format-hint {
    font-size: 0.65rem;
    color: #64748b;
    margin-left: 0.25rem;
}

.dp-side-input--formatted {
    border-color: #93c5fd;
    background: #f8fafc;
}

.day-print-dialog--preview .dp-format-bar {
    display: none !important;
}

.dp-counter-end-wrap {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--nv-border, #e4e9f0);
}

.dp-counter-end-wrap .dp-field-row {
    align-items: center;
}

.dp-ph-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 999px;
}

.dp-field-hint--ph {
    color: #b45309;
    font-weight: 500;
}

.dp-counter-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    align-items: center;
}

.day-print-counter--with-reliever .dp-counter-row,
.day-print-counter--rebel .dp-counter-row {
    grid-template-columns: 1fr 1fr 1.2fr auto;
}

.day-print-counter--with-reliever .dp-counter-head,
.day-print-counter--rebel .dp-counter-head {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr auto;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.25rem;
    align-items: center;
}

.dp-counter-head-actions {
    width: 3.1rem;
}

.dp-counter-row-actions {
    display: inline-flex;
    gap: 0.15rem;
    align-items: center;
    flex-shrink: 0;
}

.dp-counter-row-btn {
    box-sizing: border-box;
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 0;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    background: #fff;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dp-counter-row-btn:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.dp-counter-row-btn--add:hover:not(:disabled) {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.dp-counter-row-btn--del:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.dp-counter-row-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dp-counter-add-row {
    margin-top: 0.35rem;
}

.day-print-yesterday,
.day-print-recovery,
.day-print-focus {
    max-height: 14rem;
    overflow-y: auto;
}

.dp-focus-block {
    padding: 0.35rem 0;
    margin-bottom: 0.35rem;
    border-bottom: 1px dashed var(--nv-border, #e4e9f0);
}

.dp-focus-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.dp-focus-bullets {
    resize: vertical;
    min-height: 2.5rem;
    font-family: inherit;
    line-height: 1.35;
}

.dp-yesterday-row label {
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-tab--reviewed::after {
    content: ' ✓';
    font-size: 0.65rem;
    opacity: 0.85;
}

.dp-ai-notes {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.1rem;
    font-size: 0.72rem;
    color: var(--nv-muted, #64748b);
}

.day-print-ai-panel {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    font-size: 0.78rem;
}

.dp-ai-finding {
    margin-bottom: 0.35rem;
    list-style: none;
}

.day-print-dialog--preview .day-print-editor,
.day-print-dialog--preview .dp-break-collapse,
.day-print-dialog--preview .day-print-footer-secondary {
    display: none !important;
}
.day-print-dialog--preview .day-print-footer .btn:not(#day-print-cancel):not(#day-print-confirm) {
    display: none !important;
}

.day-print-dialog--preview .day-print-preview [contenteditable],
.day-print-dialog--preview .pe-editable {
    pointer-events: none !important;
}

.day-print-history-compare {
    margin-top: 0.5rem;
    padding: 0.65rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #fff;
    max-height: 42vh;
    overflow: auto;
}

.dp-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

.dp-compare-sheet {
    transform: scale(0.42);
    transform-origin: top left;
    width: 238%;
    pointer-events: none;
}

.week-print-counter-summary {
    margin: 0.35rem 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
}

/* Tablet/narrow desktop: keep side-by-side (do not stack A4 above the tall editor —
 * that looked like “print + mobile form” duplicated). Phone ≤767 uses admin-mobile.css. */
@media (max-width: 900px) and (min-width: 768px) {
    .day-print-dialog--fullscreen .day-print-body,
    .day-print-body:has(.dp-history-drawer:not(.hidden)),
    .day-print-dialog--history-view .day-print-body {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 38%) !important;
    }
    .day-print-editor {
        resize: none;
        max-width: none;
    }
}

.day-print-footer {
    padding-top: 0.5rem;
    border-top: 1px solid var(--nv-border, #e4e9f0);
    flex-shrink: 0;
}

.day-print-footer-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: wrap;
}

.day-print-footer-secondary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.day-print-footer-primary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.day-print-status-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.day-print-status-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.day-print-status-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.day-print-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.dp-status-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--nv-muted, #64748b);
}

.dp-status-fairness {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.dp-status-fairness .counter-fairness-bar {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
}

.dp-status-fairness .counter-fairness-alert {
    margin-left: 0;
    font-size: 0.68rem;
}

.dp-status-counter {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.dp-status-counter--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.dp-status-counter--warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.dp-alerts-panel {
    margin-top: 0.35rem;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    background: #fffbeb;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}

.dp-alerts-panel.hidden {
    display: none !important;
}

.dp-alerts-panel .dp-alerts-body {
    padding: 0.45rem 0.6rem 0.55rem;
    display: grid;
    gap: 0.4rem;
}

.dp-alerts-panel .dp-banner {
    margin: 0;
}

.dp-quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0 0.35rem;
    margin-top: 0.15rem;
}

.dp-menubar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0 0.55rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid var(--nv-border, #e4e9f0);
}

.dp-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.45rem;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}

.dp-menu-trigger:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

.dp-menu-trigger[aria-expanded="true"] {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #312e81;
}

.dp-quick-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 0.45rem;
    border: 1px solid var(--nv-border, #dbe3ee);
    background: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: #334155;
}

.dp-quick-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.dp-quick-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.dp-quick-btn:active {
    transform: scale(0.97);
    background: #f1f5f9;
}

.dp-quick-btn--active {
    background: var(--nv-primary, #0f172a);
    border-color: var(--nv-primary, #0f172a);
    color: #fff;
}

.dp-quick-btn--active:focus-visible {
    outline-color: rgba(255, 255, 255, 0.45);
}

.dp-quick-btn--active:active {
    background: #1e293b;
    color: #fff;
}

/* Day print / week print toolbar toggles — avoid btn+btn-outline on native <button>. */
.admin-theme button.dp-toolbar-btn,
button.dp-toolbar-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.dp-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dp-toolbar-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.dp-toolbar-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.dp-toolbar-btn:active:not(:disabled) {
    background: #f1f5f9;
    transform: scale(0.97);
}

.dp-toolbar-btn--active {
    background: #0f172a !important;
    color: #fff !important;
    border-color: #0f172a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.dp-toolbar-btn--active:hover:not(:disabled) {
    background: #1e293b !important;
    color: #fff !important;
    border-color: #1e293b !important;
}

.dp-toolbar-btn--active:focus-visible {
    outline-color: rgba(255, 255, 255, 0.45);
}

.dp-toolbar-btn--active:active:not(:disabled) {
    background: #334155 !important;
    color: #fff !important;
}

.dp-preview-hint {
    margin: 0 0 0.4rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 0.4rem;
    border: 1px solid #e2e8f0;
}

.day-print-editor {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.65rem;
    background: #fafbfc;
}

.day-print-form {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.65rem;
}

.dp-fieldset {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.day-print-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, #fff 24%);
    border-top: 1px solid var(--nv-border, #e4e9f0);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.day-print-footer-primary .btn-primary {
    padding: 0.55rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.dp-alerts-drawer {
    margin-top: 0.35rem;
    border: 1px solid #fde68a;
    border-radius: 0.45rem;
    background: #fffbeb;
}

.dp-alerts-drawer > summary {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.dp-alerts-drawer > summary::-webkit-details-marker { display: none; }

.dp-alerts-body {
    padding: 0.35rem 0.55rem 0.5rem;
    display: grid;
    gap: 0.35rem;
}

.dp-help-pop {
    margin: 0.35rem 0 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
    background: #f8fafc;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.45rem;
}

.dp-help-pop kbd {
    padding: 0.05rem 0.3rem;
    border-radius: 0.2rem;
    background: #e2e8f0;
    font-size: 0.68rem;
}

.dp-break-collapse {
    flex-shrink: 0;
    margin-top: 0.35rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.45rem;
    background: #f8fafc;
}

.dp-break-collapse-summary {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.dp-break-collapse > summary::-webkit-details-marker { display: none; }

.dp-break-collapse[open] .day-print-break-bar {
    padding: 0.35rem 0.55rem 0.5rem;
    max-height: 14rem;
    overflow: auto;
}

.day-print-body:has(.dp-history-drawer:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 380px) minmax(260px, 320px);
}

/* Sheets-style history: A4 + timeline only */
.day-print-dialog--history-view .day-print-body {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
}
.day-print-dialog--history-view .day-print-editor {
    display: none !important;
}
.day-print-dialog--history-view .dp-history-drawer {
    display: flex !important;
}
.day-print-dialog--history-view .dp-preview-hint,
.day-print-dialog--history-view .dp-chrome-toolbar,
.day-print-dialog--history-view .dp-quick-bar,
.day-print-dialog--history-view .dp-menubar,
.day-print-dialog--history-view .day-print-footer-secondary {
    display: none !important;
}
.day-print-dialog--history-view .day-print-preview [contenteditable],
.day-print-dialog--history-view .pe-editable {
    pointer-events: none !important;
    caret-color: transparent;
}

.day-print-history-entry {
    /* extends .dp-toolbar-btn — kept for legacy selectors */
}

.day-print-history-entry.is-active,
#day-print-history-btn.is-active,
#day-print-history-btn.dp-toolbar-btn--active {
    background: #0f172a !important;
    color: #fff !important;
    border-color: #0f172a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.day-print-version-chip {
    cursor: pointer;
    border: 1px solid transparent;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
}
.day-print-version-chip:hover {
    border-color: #94a3b8;
}

.dp-history-view-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0 0 0.55rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}
.dp-history-view-banner.hidden { display: none !important; }
.dp-history-view-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.dp-history-view-banner-meta {
    font-size: 0.72rem;
    color: #78716c;
}
.dp-history-view-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.dp-history-view-banner-changes {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: #44403c;
}
.dp-hist-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
}
.dp-hist-toggle input { accent-color: #16a34a; }
.dp-hist-select {
    height: 1.7rem;
    padding: 0 1.4rem 0 0.4rem;
    font-size: 0.72rem;
}
.dp-hist-changenav {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.1rem 0.25rem;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    background: #fff;
}
.dp-hist-changecount {
    min-width: 8.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #57534e;
}

.day-print-preview.dp-preview-readonly .ds-inline-edit {
    cursor: default;
    caret-color: transparent;
}

/* Google Sheets "Show changes": green wash on every field this version touched. */
.dp-hist-hl {
    position: relative;
    background: rgba(52, 168, 83, 0.16) !important;
    box-shadow: inset 0 0 0 2px rgba(52, 168, 83, 0.85);
    border-radius: 2px;
}
.dp-hist-hl--added {
    background: rgba(52, 168, 83, 0.22) !important;
}
.dp-hist-hl--removed {
    background: rgba(217, 48, 37, 0.12) !important;
    box-shadow: inset 0 0 0 2px rgba(217, 48, 37, 0.7);
}
.dp-hist-hl--focus {
    box-shadow: inset 0 0 0 2px #0b8043, 0 0 0 3px rgba(52, 168, 83, 0.35);
    animation: dp-hist-pulse 1s ease-out 1;
}
.dp-hist-hl[data-dp-hist-from]:hover::after {
    content: 'was: ' attr(data-dp-hist-from);
    position: absolute;
    left: 0;
    bottom: calc(100% + 4px);
    z-index: 40;
    max-width: 22rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.66rem;
    line-height: 1.25;
    white-space: pre-wrap;
    pointer-events: none;
}
@keyframes dp-hist-pulse {
    from { box-shadow: inset 0 0 0 2px #0b8043, 0 0 0 8px rgba(52, 168, 83, 0.4); }
    to { box-shadow: inset 0 0 0 2px #0b8043, 0 0 0 3px rgba(52, 168, 83, 0.35); }
}
@media print {
    .dp-hist-hl {
        background: transparent !important;
        box-shadow: none !important;
    }
}

.dp-history-item {
    cursor: pointer;
}
.dp-history-item--selected {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: inset 3px 0 0 #2563eb;
}
.dp-history-item--nested {
    margin-left: 0.65rem;
    opacity: 0.92;
}
.dp-history-cluster {
    list-style: none;
    margin: 0 0 0.35rem;
    padding: 0;
}
.dp-history-cluster-head {
    display: flex;
    align-items: center;
    padding: 0.1rem 0.15rem 0.15rem;
}
.dp-history-expand {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.1rem 0.25rem;
    border-radius: 0.25rem;
}
.dp-history-expand:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.dp-history-expand-caret {
    font-size: 0.6rem;
    width: 0.85rem;
}
.dp-history-list--cluster {
    margin: 0;
    padding: 0;
}
.dp-history-item .dp-history-more {
    position: relative;
}
.dp-history-item .dp-history-more-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 5;
    min-width: 8rem;
    padding: 0.25rem;
    background: #fff;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.4rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.dp-history-item .dp-history-more-menu.hidden { display: none; }
.dp-history-item .dp-history-more-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
    border-radius: 0.25rem;
    cursor: pointer;
}
.dp-history-item .dp-history-more-menu button:hover {
    background: #f1f5f9;
}

.dp-history-drawer {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.dp-history-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--nv-border, #e4e9f0);
    font-size: 0.82rem;
    gap: 0.5rem;
}

.dp-history-drawer-head-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dp-history-drawer-sub {
    font-size: 0.68rem;
    font-weight: 400;
    color: #64748b;
}

.dp-history-drawer-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid var(--nv-border, #e4e9f0);
}

.dp-history-drawer .day-print-history {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 0.35rem 0.45rem 0.75rem;
}

.dp-history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.45rem;
}

.dp-history-filter {
    border: 1px solid var(--nv-border, #e4e9f0);
    background: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    cursor: pointer;
    color: #475569;
}

.dp-history-filter.is-active {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.dp-history-filter:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.dp-history-filter:active {
    transform: scale(0.97);
}

.dp-history-ab {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.45rem;
    background: #f8fafc;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.4rem;
    font-size: 0.7rem;
}

.dp-history-day {
    margin-bottom: 0.65rem;
}

.dp-history-day-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0.25rem 0.15rem 0.35rem;
}

.dp-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

.dp-history-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 0.35rem 0.45rem;
    padding: 0.45rem 0.4rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.45rem;
    background: #fff;
    position: relative;
}

.dp-history-item--latest {
    border-color: #94a3b8;
    box-shadow: inset 3px 0 0 #0f172a;
}

.dp-history-item--pinned {
    background: #fffbeb;
    border-color: #fcd34d;
}

.dp-history-rail {
    width: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #cbd5e1, #e2e8f0);
    align-self: stretch;
}

.dp-history-item--latest .dp-history-rail {
    background: #0f172a;
}

.dp-history-item--pinned .dp-history-rail {
    background: #f59e0b;
}

.dp-history-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    grid-column: 2;
}

.dp-history-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
}

.dp-history-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.dp-history-meta {
    font-size: 0.66rem;
    color: #64748b;
    line-height: 1.35;
}

.dp-history-vtag {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.35rem;
    border-radius: 0.25rem;
    background: #e2e8f0;
    color: #334155;
}

.dp-history-badge {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.05rem 0.3rem;
    border-radius: 0.2rem;
    background: #e0f2fe;
    color: #075985;
}

.dp-history-badge--pin {
    background: #fef3c7;
    color: #92400e;
}

.dp-history-badge--current {
    background: #dcfce7;
    color: #166534;
}

.dp-history-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.1rem;
}

.dp-history-ops {
    margin-top: 0.75rem;
    border-top: 1px solid var(--nv-border, #e4e9f0);
    padding-top: 0.45rem;
    font-size: 0.7rem;
}

.dp-history-ops summary {
    cursor: pointer;
    color: #475569;
    font-weight: 600;
}

.dp-history-ops-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dp-history-ops-list li {
    display: grid;
    grid-template-columns: 7.5rem minmax(4rem, auto) 1fr auto;
    gap: 0.35rem;
    align-items: baseline;
    color: #334155;
}

.dp-history-ops-time {
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.dp-history-ops-action {
    font-weight: 600;
}

.dp-history-ops-actor {
    color: #64748b;
}

.dp-dropdown-wrap {
    position: relative;
}

.dp-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 40;
    min-width: 14rem;
    max-width: min(22rem, 92vw);
    margin-bottom: 0.25rem;
    padding: 0.35rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: var(--nv-sh-lg, 0 8px 24px rgba(15, 23, 42, 0.12));
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dp-dropdown-menu--down {
    top: calc(100% + 0.25rem);
    bottom: auto;
    margin-bottom: 0;
    margin-top: 0;
}

.dp-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: 0.4rem;
    background: transparent;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
}

.dp-dropdown-item:hover {
    background: #f1f5f9;
}

.dp-menu-item-label {
    font-weight: 650;
    line-height: 1.25;
}

.dp-menu-item-hint {
    font-size: 0.68rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
}

.dp-print-options-detail {
    font-size: 0.75rem;
}

.dp-options-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--nv-muted, #64748b);
    list-style: none;
}

.dp-options-summary::-webkit-details-marker { display: none; }

.dp-print-options-detail[open] .day-print-options {
    margin-top: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.45rem;
    background: #f8fafc;
}

.dp-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0.2rem 0 0.35rem;
    background: linear-gradient(180deg, #f8fafc 70%, rgba(248, 250, 252, 0));
}

.dp-anchor-btn {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--nv-border, #e4e9f0);
    background: #f8fafc;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.dp-anchor-btn:hover {
    background: #e2e8f0;
}

.dp-anchor-btn--active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}

#day-print-preview [data-dp-section] {
    transition: box-shadow 0.18s ease, outline-color 0.18s ease;
    cursor: pointer;
}

#day-print-preview [data-dp-section].ds-section--active,
#day-print-preview [data-dp-section]:hover {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.dp-fieldset--flash {
    scroll-margin-top: 2.5rem;
}

.dp-subsection-label {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nv-muted, #64748b);
}

.dp-fieldset--flash {
    animation: dp-flash 1.2s ease;
}

@keyframes dp-flash {
    0%, 100% { box-shadow: none; }
    30% { box-shadow: 0 0 0 2px #93c5fd; }
}

.day-print-editor {
    resize: horizontal;
    min-width: 220px;
    max-width: 48vw;
}

.dp-counter-table .dp-counter-row input {
    font-variant-numeric: tabular-nums;
}

.dp-preprint-dialog {
    max-width: 34rem;
    width: 96vw;
}

.dp-preprint-body {
    margin: 0.75rem 0;
    font-size: 0.82rem;
}

.dp-preprint-board {
    display: grid;
    gap: 0.75rem;
}

.dp-preprint-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid transparent;
}

.dp-preprint-hero-icon {
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.dp-preprint-hero-icon svg {
    width: 2.4rem;
    height: 2.4rem;
}

.dp-preprint-hero-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.dp-preprint-hero-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dp-preprint-hero-sub {
    font-size: 0.78rem;
    opacity: 0.85;
}

.dp-preprint-hero--ok {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: #a7f3d0;
    color: #065f46;
}

.dp-preprint-hero--warn {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
    color: #92400e;
}

.dp-preprint-hero--block {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fecaca;
    color: #991b1b;
}

.dp-preprint-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr));
    gap: 0.45rem;
}

.dp-preprint-tile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.5rem;
    border-radius: 0.7rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: left;
    font: inherit;
    color: #0f172a;
    min-height: 3.1rem;
}

button.dp-preprint-tile {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

button.dp-preprint-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.dp-preprint-tile-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    color: #64748b;
}

.dp-preprint-tile-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dp-preprint-tile-label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.dp-preprint-tile-badge {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    background: #fee2e2;
    color: #b91c1c;
}

.dp-preprint-tile-badge--ok {
    background: #d1fae5;
    color: #047857;
}

.dp-preprint-tile--ok {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.dp-preprint-tile--ok .dp-preprint-tile-icon { color: #059669; }

.dp-preprint-tile--warn {
    background: #fffbeb;
    border-color: #fcd34d;
}

.dp-preprint-tile--warn .dp-preprint-tile-icon { color: #d97706; }
.dp-preprint-tile--warn .dp-preprint-tile-badge {
    background: #fde68a;
    color: #92400e;
}

.dp-preprint-tile--block {
    background: #fef2f2;
    border-color: #fca5a5;
}

.dp-preprint-tile--block .dp-preprint-tile-icon { color: #dc2626; }

.dp-preprint-problems {
    display: grid;
    gap: 0.35rem;
}

.dp-preprint-problems-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.dp-preprint-problems-head {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.dp-preprint-autofix {
    flex: 0 0 auto;
}

.dp-preprint-problem {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
}

button.dp-preprint-problem {
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

button.dp-preprint-problem:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.dp-preprint-problem--warn {
    border-color: #fde68a;
    background: #fffbeb;
}

.dp-preprint-problem--block {
    border-color: #fecaca;
    background: #fef2f2;
}

.dp-preprint-problem-icon {
    width: 1.4rem;
    height: 1.4rem;
    color: #b45309;
}

.dp-preprint-problem--block .dp-preprint-problem-icon { color: #dc2626; }

.dp-preprint-problem-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.dp-preprint-problem-body {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.dp-preprint-problem-body strong {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
}

.dp-preprint-problem-detail {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
}

.dp-preprint-problem-go {
    font-size: 0.68rem;
    font-weight: 800;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dp-preprint-more {
    font-size: 0.72rem;
    color: #64748b;
    padding: 0.15rem 0.25rem;
}

.dp-preprint-meta {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.35rem;
}

.dp-preprint-meta > summary {
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    user-select: none;
}

.dp-preprint-meta-list {
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.3rem;
}

.dp-preprint-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #475569;
}

.dp-preprint-meta-list li span { color: #94a3b8; }
.dp-preprint-meta-list li strong { font-weight: 700; color: #0f172a; text-align: right; }

.dp-preprint-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.dp-preprint-warn {
    color: #b45309;
}

.dp-preprint-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

button.dp-preprint-issue {
    font: inherit;
    color: inherit;
}

button.dp-preprint-issue.dp-preprint-sub {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.2rem 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

button.dp-preprint-issue.dp-preprint-sub:hover {
    color: #0f172a;
    text-decoration: underline;
}

.day-print-queue-chip {
    cursor: pointer;
    border: none;
    font: inherit;
}

.day-print-queue-chip:not(.hidden):hover {
    filter: brightness(0.95);
}

.dp-opt-fieldset {
    border: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.dp-opt-legend {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.dp-merge-list { margin: 0.5rem 0 0; padding-left: 0; list-style: none; }
.dp-merge-brand { margin-bottom: 0.35rem; }
.dp-merge-brand--diff { color: #b45309; }
.dp-merge-footer { flex-wrap: wrap; gap: 0.35rem; }
.dp-preprint-loading { color: #64748b; font-size: 0.85rem; }
.dp-counter-live-item--error .dp-issue-fix,
.dp-counter-live-item--warn .dp-issue-fix { margin-left: 0.35rem; }
.week-inline-banner { display: inline-block; margin-left: 0.5rem; font-size: 0.75rem; }

.dp-mark--error,
.dp-fieldset--error {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
}

.dp-mark--warn,
.dp-fieldset--warn {
    outline: 2px solid #d97706;
    outline-offset: 1px;
}

.dp-counter-row.dp-mark--error .input,
.dp-counter-row.dp-mark--warn .input,
.input.dp-mark--error,
.input.dp-mark--warn {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.dp-counter-row.dp-mark--warn .input,
.input.dp-mark--warn {
    border-color: #d97706;
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.25);
}

.day-print-preview .ds-counter-table tr.dp-mark--error td,
.day-print-preview .ds-counter-table td.dp-mark--error {
    background: #fef2f2;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.day-print-preview .ds-counter-table tr.dp-mark--warn td,
.day-print-preview .ds-counter-table td.dp-mark--warn {
    background: #fffbeb;
    box-shadow: inset 0 0 0 1px #fde68a;
}

.dp-counter-live-item--error { color: #b91c1c; }
.dp-counter-live-item--warn { color: #b45309; }

.day-print-dialog--readonly .day-print-preview [contenteditable],
.day-print-dialog--readonly #day-print-form input,
.day-print-dialog--readonly #day-print-form textarea,
.day-print-dialog--readonly #day-print-form select {
    opacity: 0.72;
}

.dp-preprint-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.day-print-body--week {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.day-print-body--week > .week-print-preview {
    min-height: 0;
    flex: 1;
    max-height: none;
}

.day-print-body--week:has(.dp-history-drawer:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
}

/* ── AI review dialog ── */
.ai-review-dialog {
    max-width: 42rem;
    width: calc(100vw - 2rem);
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 1rem;
    padding: 0;
    box-shadow: var(--nv-sh-lg, 0 12px 40px rgba(15,23,42,0.12));
}

.ai-review-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.ai-review-dialog-inner {
    padding: 1.25rem 1.5rem 1rem;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-review-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nv-text, #0f172a);
    margin: 0;
}

.ai-review-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--nv-border, #e4e9f0);
}

.ai-review-select-all-label {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--nv-muted, #64748b);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ai-review-summary {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.ai-review-findings {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 50vh;
}

.ai-review-finding {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.ai-review-finding header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.ai-review-finding h4 {
    flex: 1 1 100%;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.25rem 0 0;
}

.ai-sev-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.ai-sev-high .ai-sev-badge { background: #fee2e2; color: #991b1b; }
.ai-sev-medium .ai-sev-badge { background: #fef3c7; color: #92400e; }
.ai-sev-low .ai-sev-badge { background: #e0f2fe; color: #0369a1; }

.ai-cat-badge {
    font-size: 0.65rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}

.ai-explanation {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.45;
}

.ai-review-fix {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #cbd5e1;
}

.ai-fix-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #0f172a;
    cursor: pointer;
}

.ai-fix-reason {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.35rem 0 0 1.5rem;
}

.ai-review-notes-list {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    padding-left: 1.2rem;
}

.ai-review-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--nv-border, #e4e9f0);
}

.ai-review-empty {
    text-align: center;
    padding: 1.5rem;
    color: #059669;
    font-weight: 600;
}

.ai-review-run-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.ai-review-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 28rem;
    overflow-y: auto;
}

.ai-review-history-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--nv-border, #e4e9f0);
    border-radius: 0.5rem;
    margin-bottom: 0.4rem;
    background: #fff;
    cursor: pointer;
    font-size: 0.8125rem;
}

.ai-review-history-row:hover,
.ai-review-history-row--active {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.ai-score-pill {
    display: inline-block;
    min-width: 2rem;
    text-align: center;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.ai-score--good { background: #dcfce7; color: #166534; }
.ai-score--ok { background: #dbeafe; color: #1e40af; }
.ai-score--warn { background: #fef3c7; color: #92400e; }

.ai-applied-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: #dcfce7;
    color: #166534;
}

.ai-review-detail-panel {
    min-height: 16rem;
    max-height: 36rem;
    overflow-y: auto;
}

/* ── Import draft ── */
.admin-theme .import-draft-banner {
    background: #fffbeb;
    border-bottom-color: #fde68a;
    color: #92400e;
}

.admin-theme .draft-panel {
    border-color: #dce2ea;
}

/* ── Clear data panel ── */
.data-panel-prominent {
    border: 1px solid rgba(245,158,11,0.3) !important;
    background: linear-gradient(135deg, #fffbeb 0%, var(--nv-panel, #fff) 55%) !important;
    margin-bottom: 1rem;
}

.data-panel-head-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.data-panel-desc {
    font-size: 0.8rem;
    color: #92400e;
    margin: 0.35rem 0 0;
    max-width: 30rem;
}

.data-panel-stats.compact .data-chip {
    min-width: 4.5rem;
    padding: 0.4rem 0.55rem;
}

.admin-theme .data-chip {
    background: #f8fafc;
    border-color: var(--nv-border);
    color: #374151;
}

.admin-theme .data-chip b {
    color: var(--nv-text);
}

.admin-theme .data-chip.active {
    border-color: rgba(245,158,11,0.4);
    background: #fffbeb;
    color: #92400e;
}

/* ── Security banner ── */
.admin-theme .security-banner {
    background: #fef2f2;
    border-bottom-color: #fecaca;
    color: #991b1b;
}

/* ── Field saved flash ── */
.admin-theme .field-saved {
    box-shadow: 0 0 0 2px rgba(5,150,105,0.4) !important;
    transition: box-shadow 0.3s ease;
}

/* ── Autosave status ── */
.admin-theme .autosave-pending { background: #fef3c7; color: #92400e; }
.admin-theme .autosave-saving  { background: #eff6ff; color: #1d4ed8; }
.admin-theme .autosave-saved   { background: #ecfdf5; color: #065f46; }
.admin-theme .autosave-error   { background: #fee2e2; color: #991b1b; }

/* ── Learning edit grid ── */
.admin-theme .learning-edit-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .admin-theme .learning-edit-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Toast (admin uses admin-tahoe.css — do not override here) ── */

/* ── Dialog ── */
.admin-theme .app-dialog {
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-lg);
}

.admin-theme .app-dialog-form p {
    color: var(--nv-text);
}

/* ── Tables (general) ── */
.admin-theme table {
    color: var(--nv-text);
}

.admin-theme thead th {
    color: var(--nv-muted) !important;
    background: #f8fafc !important;
    border-bottom: 1px solid var(--nv-border) !important;
}

.admin-theme tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.admin-theme tbody tr:hover {
    background: #f8fafc;
}

/* ── Loading overlay ── */
.admin-theme .loading-overlay {
    background: rgba(244,246,250,0.75);
    backdrop-filter: blur(8px);
}

.admin-theme .loading-card {
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    box-shadow: var(--nv-sh-lg);
    color: var(--nv-text);
}

/* ═══════════════════════════════════════════
   SNAPSHOT VERSION HISTORY
   ═══════════════════════════════════════════ */

.snap-empty {
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: var(--nv-muted);
}

.snap-empty-icon { font-size: 2.75rem; margin-bottom: 0.75rem; }
.snap-empty p { margin: 0.35rem 0; font-size: 0.875rem; }

.day-print-sync-chip--editing {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}
.day-print-sync-chip--saved {
    background: #e0f2fe;
    color: #075985;
    border-color: #38bdf8;
}
.day-print-sync-chip--synced {
    background: #dcfce7;
    color: #166534;
    border-color: #4ade80;
}
.day-print-sync-chip--published {
    background: #dbeafe;
    color: #1e40af;
    border-color: #60a5fa;
}
.day-print-sync-chip--error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #f87171;
}
.day-print-sync-chip--locked {
    background: #0f172a;
    color: #f8fafc;
    border-color: #0f172a;
}

.dp-debug-panel {
    margin: 0.5rem 0 0;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
    font-size: 0.7rem;
}
.dp-debug-summary {
    cursor: pointer;
    font-weight: 700;
    color: #475569;
}
.dp-debug-body {
    margin: 0.35rem 0 0;
    max-height: 12rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.65rem;
}
.dp-debug-hint {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.65rem;
}
.dp-publish-checklist {
    list-style: none;
    margin: 0.35rem 0 0.75rem;
    padding: 0;
}
.dp-publish-checklist li {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    padding: 0.2rem 0;
    font-size: 0.8rem;
}
.dp-check-ok .dp-check-mark { color: #16a34a; font-weight: 800; }
.dp-check-warn .dp-check-mark { color: #d97706; font-weight: 800; }
.dp-gate-banner {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
}

.dp-gate-banner ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.dp-gate-banner--hard {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.dp-gate-banner--soft {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.dp-gate-banner--ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.dp-check-block {
    color: #b91c1c;
    font-weight: 600;
}

.dp-check-blocking {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}

.dp-preprint-go--blocked,
#day-print-preprint-go:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dp-preprint-checklist-wrap {
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.day-print-sync-chip {
    display: inline-block;
    margin: 0.35rem 0 0;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 700;
}
.day-print-sync-chip.hidden { display: none; }

.admin-loading-skeleton {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    margin: 0.5rem 0 1rem;
}
.admin-loading-skeleton .skeleton-card {
    min-height: 4.5rem;
}

.snap-loading {
    padding: 1.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Group (date section) */
.snap-group {
    margin-bottom: 1.75rem;
}

.snap-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.25rem 0.5rem;
    border-bottom: 2px solid var(--nv-border);
    margin-bottom: 0.5rem;
}

.snap-date-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--nv-text);
    letter-spacing: -0.01em;
}

.snap-version-count {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Version list */
.snap-versions-list {
    border: 1px solid var(--nv-border);
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: var(--nv-sh-sm);
}

.snap-version-item {
    border-bottom: 1px solid var(--nv-border);
}

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

.snap-version-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: var(--nv-panel);
    flex-wrap: wrap;
    transition: background 0.12s;
}

.snap-version-item:first-child .snap-version-row {
    background: linear-gradient(90deg, #f0f7ff, var(--nv-panel) 60%);
}

.snap-version-item:hover .snap-version-row {
    background: #f8fafc;
}

.snap-version-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.snap-vtag {
    display: inline-block;
    background: #374151;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.45rem;
    border-radius: 0.35rem;
    flex-shrink: 0;
}

.snap-vtag-latest {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
}

/* Status badges on snapshot versions */
.snap-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    flex-shrink: 0;
}

.snap-status-published {
    background: #dcfce7;
    color: #15803d;
}

.snap-status-draft {
    background: #fef3c7;
    color: #92400e;
}

.snap-version-draft {
    opacity: 0.85;
}

.snap-vtime {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--nv-text);
}

.snap-vmeta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.snap-version-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.snap-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid var(--nv-border);
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.15s ease, box-shadow 0.15s ease;
}

.snap-btn-view:hover,
.snap-btn-view-open {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.snap-btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.12s, color 0.12s, transform 0.15s ease;
}

.snap-btn-delete:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: translateY(-1px);
}

/* Preview area */
.snap-preview-area {
    padding: 0.75rem 1rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--nv-border);
}

.snap-preview-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 0.65rem;
}

.snap-preview-loading {
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0.35rem 0;
    margin: 0;
}

.snap-preview-scroll {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--nv-border);
    background: var(--nv-panel);
}

.snap-staff-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.snap-staff-table th {
    text-align: left;
    padding: 0.45rem 0.75rem;
    color: #64748b !important;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    background: #f8fafc !important;
    border-bottom: 1px solid var(--nv-border) !important;
}

.snap-staff-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--nv-text);
}

.snap-staff-table tbody tr:last-child td { border-bottom: none; }
.snap-staff-table tbody tr:hover { background: #f8fafc; }

.snap-col-name { font-weight: 600; }

.snap-col-shift {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.78rem;
    color: #374151;
}

.snap-col-breaks { color: #64748b; }

.snap-store-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   IMPORT DRAFT — grouped date layout
   ═══════════════════════════════════════════ */

.draft-date-group {
    margin-bottom: 1rem;
}

.draft-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: #f1f5f9;
    border: 1px solid #dce2ea;
    border-bottom: none;
    border-radius: 0.625rem 0.625rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--nv-text, #0f172a);
}

.draft-date-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
}

.draft-shift-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    border: 1px solid #dce2ea;
    border-top: none;
    background: #fff;
    transition: background 0.1s;
}

.draft-shift-row:hover {
    background: #f8fafc;
}

.draft-name-input {
    flex: 1;
    min-width: 0;
}

.draft-time-input {
    width: 7.5rem !important;
    flex-shrink: 0;
}

.draft-date-input {
    width: 9rem !important;
    flex-shrink: 0;
}

.draft-arrow {
    color: #94a3b8;
    font-size: 0.72rem;
    flex-shrink: 0;
    user-select: none;
}

.btn-draft-remove {
    flex-shrink: 0;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
    padding: 0;
}

.btn-draft-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.btn-draft-add-row {
    display: block;
    width: 100%;
    padding: 0.4rem;
    text-align: center;
    border: 1px dashed #dce2ea;
    border-top: none;
    border-radius: 0 0 0.625rem 0.625rem;
    background: transparent;
    font-size: 0.72rem;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.btn-draft-add-row:hover {
    background: #f8fafc;
    color: #374151;
}

.draft-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e4e9f0;
}

.draft-stat-chip {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #e4e9f0;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   FRONT DISPLAY — atmospheric dark (kiosk)
   ═══════════════════════════════════════════ */

.theme-nova.front-shell {
    background:
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(56,189,248,0.16), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99,102,241,0.10), transparent 50%),
        #0b0f14;
    min-height: 100vh;
}

.theme-nova .front-header {
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(56,189,248,0.14);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.theme-nova .front-brand h1 {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.theme-nova .front-main {
    padding-top: 1.5rem;
}

.front-shell .intel-card {
    background: linear-gradient(160deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95));
    border: 1px solid rgba(148,163,184,0.12);
}

.front-shell .intel-card .value {
    background: linear-gradient(135deg, #f8fafc, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.front-shell .intel-card .label {
    color: #64748b;
}

.front-shell .roster-card.premium-card {
    background: linear-gradient(160deg, #1e2d45 0%, #141f33 100%);
    border: 1px solid rgba(148,163,184,0.14);
    color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.front-shell .roster-card.premium-card:hover {
    border-color: rgba(56,189,248,0.35);
    box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(56,189,248,0.1);
    transform: translateY(-2px);
}

.front-shell .roster-card h3 {
    color: #f1f5f9;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

/* Shift time line — front kiosk */
.front-shell .shift-time-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}
.front-shell .shift-time-range {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}
.front-shell .shift-hours-paid {
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56,189,248,0.1);
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
}
.front-shell .shift-hours-total {
    font-size: 0.7rem;
    color: #475569;
}

/* Admin light theme shift time */
.admin-theme .shift-time-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}
.admin-theme .shift-time-range {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}
.admin-theme .shift-hours-paid {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
}
.admin-theme .shift-hours-total {
    font-size: 0.7rem;
    color: #94a3b8;
}
.admin-theme .shift-time-line .shift-time-edit,
.admin-theme .shift-time-line .vue-inline-cell {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}
.admin-theme .shift-time-line .vue-inline-input {
    width: 5.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.admin-theme .shift-break-hint {
    line-height: 1.3;
}

/* Break rows — dark card context (front kiosk only) */
.front-shell .break-row {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(148,163,184,0.12) !important;
    border-radius: 0.625rem !important;
}

.front-shell .break-start,
.front-shell .break-end {
    background: rgba(15,23,42,0.6);
    border-color: rgba(148,163,184,0.2);
    color: #e2e8f0;
    font-weight: 600;
}

.front-shell .break-start:focus,
.front-shell .break-end:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
    outline: none;
}

.front-shell .btn-nudge {
    background: rgba(255,255,255,0.06);
    border-color: rgba(148,163,184,0.18);
    color: #94a3b8;
    font-weight: 600;
}

.front-shell .btn-nudge:hover {
    background: rgba(56,189,248,0.15);
    border-color: rgba(56,189,248,0.4);
    color: #e2e8f0;
}

.front-shell .btn-delete-break {
    background: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.25);
    color: #f87171;
}

.front-shell .btn-delete-break:hover {
    background: rgba(220,38,38,0.2);
    border-color: rgba(220,38,38,0.5);
}

.front-shell .btn-add-break {
    color: #475569;
}

.front-shell .btn-add-break:hover {
    color: #38bdf8;
}

/* Work-segment chips — dark (front kiosk) */
.front-shell .work-chip {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    font-weight: 600;
}

.front-shell .work-chip.risk {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
}

/* Break type badges — better contrast on dark */
.front-shell .break-type-badge {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
}

.front-shell .break-type-badge.bg-blue-100 {
    background: rgba(56,189,248,0.18) !important;
    color: #7dd3fc !important;
}

.front-shell .break-type-badge.bg-orange-100 {
    background: rgba(251,146,60,0.18) !important;
    color: #fdba74 !important;
}

/* "Xm floor before" label */
.front-shell .break-row .text-blue-700 {
    color: #7dd3fc !important;
}

/* Dept badge */
.front-shell .dept-badge {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.25);
}

/* Covering note badge */
.cover-note-badge {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.admin-theme .cover-note-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.front-shell .cover-note-badge {
    background: rgba(251,191,36,0.16);
    color: #fcd34d;
    border: 1px solid rgba(251,191,36,0.3);
}

/* Dept select on dark (front kiosk) */
.front-shell .dept-select {
    background: rgba(15,23,42,0.5);
    border-color: rgba(148,163,184,0.18);
    color: #cbd5e1;
}

.front-shell .dept-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56,189,248,0.18);
}

.front-shell #toast {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(56,189,248,0.25);
    color: #f1f5f9;
}

.front-shell .loading-overlay {
    background: rgba(5,8,15,0.72);
    backdrop-filter: blur(8px);
}

.front-shell .loading-card {
    background: #1a2332;
    color: #e2e8f0;
    border: 1px solid rgba(148,163,184,0.14);
}

/* Mobile floor uses mobile-floor.css only — no dark overrides */

/* ─── Responsive sidebar tweak ─── */
@media (max-width: 768px) {
    .admin-theme .admin-sidebar { width: 12rem; }
}

/* ═══════════════════════════════════════════
   WEBHOOK STATUS CARD
═══════════════════════════════════════════ */
.admin-theme .webhook-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--nv-accent, #3b82f6);
}

.admin-theme .webhook-status-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.admin-theme .webhook-status-body {
    flex: 1;
    min-width: 0;
}

.admin-theme .webhook-status-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--nv-text, #0f172a);
}

.admin-theme .webhook-status-sub {
    font-size: 0.8125rem;
    color: var(--nv-muted, #64748b);
    margin-top: 0.2rem;
}

.admin-theme .webhook-status-card.status-ok {
    border-left-color: #16a34a;
}
.admin-theme .webhook-status-card.status-ok .webhook-status-title {
    color: #166534;
}

.admin-theme .webhook-setup-steps {
    padding-left: 1.25rem;
    margin: 0.75rem 0 0;
    color: var(--nv-text);
    font-size: 0.875rem;
    line-height: 1.9;
}
.admin-theme .webhook-setup-steps ul {
    margin: 0.25rem 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--nv-muted);
}
.admin-theme .webhook-setup-steps code {
    background: #f1f5f9;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #0f172a;
}

/* ═══════════════════════════════════════════
   IMPORT TABS (admin light theme)
═══════════════════════════════════════════ */
.admin-theme .import-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--nv-border, #e4e9f0);
    margin-bottom: 1.25rem;
}

.admin-theme .import-tab {
    position: relative;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nv-muted, #64748b);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-theme .import-tab:hover {
    color: var(--nv-text, #0f172a);
    transform: translateY(-1px);
}

.admin-theme .import-tab.import-tab-active {
    color: var(--nv-accent, #3b82f6);
    border-bottom-color: var(--nv-accent, #3b82f6);
}

.admin-theme .import-tab-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: #dcfce7;
    color: #16a34a;
    padding: 0.1em 0.45em;
    border-radius: 999px;
}

.admin-theme .import-pane {
    /* just a normal block — hidden/visible via .hidden */
}

.admin-theme .import-method-intro {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-left: 3px solid var(--nv-accent, #3b82f6);
    border-radius: 0 0.5rem 0.5rem 0;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--nv-text, #0f172a);
}

/* Structured import status messages */
.admin-theme .import-status-ok {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.6rem;
    color: #166534;
    font-size: 0.875rem;
}
.admin-theme .import-status-err {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 0.6rem;
    color: #9f1239;
    font-size: 0.875rem;
}
.admin-theme .import-status-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Engine badge */
.import-engine-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    border: 1px solid currentColor;
}
.engine-ok   { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.engine-warn { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.engine-err  { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }

/* Dark front theme equivalents — kiosk only, not admin */
.front-shell.theme-nova .import-tabs,
.theme-nova.front-shell .import-tabs {
    border-bottom-color: rgba(255,255,255,0.1);
}
.front-shell.theme-nova .import-tab,
.theme-nova.front-shell .import-tab {
    color: #94a3b8;
}
.front-shell.theme-nova .import-tab:hover,
.theme-nova.front-shell .import-tab:hover {
    color: #e2e8f0;
}
.front-shell.theme-nova .import-tab.import-tab-active,
.theme-nova.front-shell .import-tab.import-tab-active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}
.front-shell.theme-nova .import-method-intro,
.theme-nova.front-shell .import-method-intro {
    background: rgba(255,255,255,0.04);
    border-left-color: #60a5fa;
    color: #e2e8f0;
}

/* Brand tabs + summary (Rebel / Briscoes) */
.roster-brand-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.roster-brand-tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--nv-border);
    background: var(--nv-panel);
    color: var(--nv-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.roster-brand-tab:hover {
    border-color: #cbd5e1;
    color: var(--nv-text);
}

.roster-brand-tab--on[data-brand-tab="rebel"] {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.roster-brand-tab--on[data-brand-tab="briscoes"] {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.brand-summary-bar,
#import-brand-summary.brand-summary-bar {
    display: block;
}

.brand-summary-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    background: var(--nv-panel);
    border: 1px solid var(--nv-border);
    border-radius: 12px;
    box-shadow: var(--nv-sh-sm);
}

.brand-summary-chip {
    display: flex;
    flex-direction: column;
    min-width: 5.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
}

.brand-summary-chip--rebel {
    background: #fff1f2;
    border-color: #fecdd3;
}

.brand-summary-chip--briscoes {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.brand-summary-num {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--nv-text);
}

.brand-summary-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nv-muted);
}

.brand-summary-sub {
    font-size: 0.6875rem;
    color: var(--nv-muted);
    margin-top: 0.1rem;
}

.brand-summary-note {
    font-size: 0.75rem;
    color: var(--nv-muted);
    margin-left: auto;
    flex: 1 1 12rem;
}

.brand-summary-warn {
    font-size: 0.75rem;
    color: var(--nv-warn);
    font-weight: 600;
}

.roster-lunch-overlap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
    margin: 0.35rem 0 0.55rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid var(--nv-border, #e2e8f0);
    background: rgba(248, 250, 252, 0.9);
}

.roster-lunch-overlap-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.roster-lunch-overlap-opt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.roster-lunch-overlap-opt input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: #1e3a5f;
}

.roster-brand-pill {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.roster-brand-pill--rebel {
    background: #ffe4e6;
    color: #be123c;
}

.roster-brand-pill--briscoes {
    background: #dbeafe;
    color: #1d4ed8;
}

.import-brand-tabs .import-tab-count {
    display: inline-block;
    min-width: 1.25rem;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.3;
}

.roster-brand-tab--on[data-import-brand-tab="rebel"] .import-tab-count {
    background: rgba(190, 18, 60, 0.15);
}

.roster-brand-tab--on[data-import-brand-tab="briscoes"] .import-tab-count {
    background: rgba(29, 78, 216, 0.15);
}

.import-brand-panel.hidden {
    display: none;
}

.import-shift-table {
    border-collapse: collapse;
}

.import-day-block + .import-day-block {
    padding-top: 0.25rem;
    border-top: 1px solid var(--nv-border-subtle);
}

.import-day-collapsible {
    border: 1px solid var(--nv-border-subtle);
    border-radius: 8px;
    padding: 0 0.5rem 0.35rem;
    background: #fafbfc;
}

.import-day-collapsible[open] {
    background: #fff;
}

.import-day-summary {
    list-style: none;
}

.import-day-summary::-webkit-details-marker {
    display: none;
}

.import-day-summary::before {
    content: '▸ ';
    color: #94a3b8;
    font-size: 0.65rem;
}

.import-day-collapsible[open] .import-day-summary::before {
    content: '▾ ';
}

.import-advanced-panel details > summary {
    list-style: none;
}

.import-advanced-panel details > summary::-webkit-details-marker {
    display: none;
}

.import-week-calendar-mount:empty {
    display: none;
}

.import-week-calendar {
    border: 1px solid var(--nv-border-subtle);
    border-radius: 12px;
    padding: 0.75rem;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.iwc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.iwc-nav-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: #475569;
}

.iwc-nav-btn:hover {
    background: #f1f5f9;
}

.iwc-week-label {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    flex: 1;
}

.iwc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.65rem;
    font-size: 0.65rem;
    color: #64748b;
}

.iwc-legend-item::before {
    content: '';
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 3px;
    margin-right: 0.25rem;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.iwc-legend-item--imported::before { background: #dbeafe; border-color: #93c5fd; }
.iwc-legend-item--draft-pending::before { background: #fef3c7; border-color: #fcd34d; }
.iwc-legend-item--generated::before { background: #ede9fe; border-color: #c4b5fd; }
.iwc-legend-item--published::before { background: #dcfce7; border-color: #86efac; }
.iwc-legend-item--empty::before { background: #f1f5f9; border-color: #e2e8f0; }
.iwc-legend-item--draft::before { background: #fffbeb; border-color: #fde68a; }
.iwc-legend-item--stale::before { background: #ffedd5; border-color: #fdba74; }

.iwc-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.iwc-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.35rem 0.2rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.62rem;
    line-height: 1.15;
    cursor: pointer;
    color: #475569;
    position: relative;
}

.iwc-day:hover { background: #f1f5f9; }

.iwc-day--active {
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: #93c5fd;
}

.iwc-day--imported { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.iwc-day--draft-pending { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.iwc-day--generated { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
.iwc-day--published { border-color: #86efac; background: #f0fdf4; color: #166534; }
.iwc-day--empty { color: #94a3b8; background: #fafafa; }

.iwc-day-dow {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.iwc-day-date {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.iwc-day-meta {
    font-size: 0.58rem;
    color: inherit;
    opacity: 0.85;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iwc-brand-bar {
    display: flex;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.iwc-brand-seg--rebel { background: #3b82f6; }
.iwc-brand-seg--briscoes { background: #f59e0b; }

.iwc-pub-badge {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #16a34a;
}

.iwc-pub-badge--draft { color: #d97706; }

.iwc-progress-line {
    font-variant-numeric: tabular-nums;
}

.roster-week-publish-days--calendar .iwc-brand-bar {
    width: 100%;
    margin: 0.08rem 0;
}

/* Admin UX v1.65 */
.publish-toolbar-hint {
    flex-basis: 100%;
    margin: 0.15rem 0 0.35rem;
}

.publish-toolbar-hint-inner a {
    font-weight: 600;
}

.admin-toolbar-more {
    flex-basis: 100%;
    margin-top: 0.25rem;
}

.admin-toolbar-more-summary {
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    list-style: none;
}

.admin-toolbar-more-summary::-webkit-details-marker {
    display: none;
}

.admin-toolbar-more-inner {
    margin-top: 0.5rem;
}

.getting-started-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}

.getting-started-item--done .gs-link {
    color: #64748b;
    text-decoration: line-through;
}

.gs-check {
    width: 1.1rem;
    font-weight: 700;
    color: #94a3b8;
}

.getting-started-item--done .gs-check {
    color: #16a34a;
}

.gs-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1d4ed8;
}

.roster-week-day--needs-review {
    box-shadow: inset 0 0 0 2px #fbbf24;
}

.roster-quality-banner {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 0.8rem;
}

.roster-quality-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.roster-mobile-actions-btn {
    margin-bottom: 0.75rem;
}

.roster-mobile-actions {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.roster-mobile-actions.hidden {
    display: none !important;
}

.roster-mobile-actions-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.roster-mobile-actions-sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 24rem);
    margin: 0 0.75rem 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
}

.data-scope-table td,
.data-scope-table th {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

#toast {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.toast-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: inherit;
}

.app-form-fields .input {
    width: 100%;
}

.roster-glossary summary {
    list-style: none;
}

.roster-glossary summary::-webkit-details-marker {
    display: none;
}

/* Accessible choose dialog (Ui.choose) */
.app-choose-dialog .app-dialog-body {
    min-width: min(20rem, 92vw);
}

.app-choose-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-choose-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.app-choose-option:hover,
.app-choose-option:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    outline: none;
}

.vue-ai-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

.solo-v189-chip {
    font-size: 0.75rem;
    color: #475569;
    margin-left: 0.35rem;
}

.solo-v189-banner {
    margin-bottom: 0.75rem;
    border: 1px solid #cbd5e1;
}

.solo-v189-banner--alert {
    border-color: #f59e0b;
    background: #fffbeb;
}

.solo-v189-banner-head {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.solo-v189-banner-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.825rem;
    color: #475569;
}

.solo-v189-overview .solo-v189-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.solo-v189-rollup {
    font-size: 0.85rem;
    color: #334155;
    display: grid;
    gap: 0.3rem;
}

.solo-v189-draggable-break {
    cursor: grab;
}

.solo-v189-break-dragging {
    opacity: 0.55;
}

.solo-v189-unavailable {
    outline: 2px solid #fca5a5;
}

.solo-v189-unavailable-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    color: #b91c1c;
    background: #fee2e2;
}

.solo-v189-print-footer {
    margin-top: 1rem;
    border-top: 1px dashed #94a3b8;
    padding-top: 0.5rem;
    font-size: 0.85rem;
}

.solo-v189-brand-tabs {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.35rem;
}

.solo-v189-mobile-alert {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #b91c1c;
    color: #fff;
    font-weight: 700;
    z-index: 90;
}

.solo-v189-break-soon {
    box-shadow: 0 0 0 2px #f59e0b inset;
}

body.solo-v189-patrol-mode .mf-card {
    font-size: 1.12rem;
    min-height: 8rem;
}

body.solo-v189-front-minimal .front-header,
body.solo-v189-front-minimal #front-board-toolbar,
body.solo-v189-front-minimal #front-on-break-row,
body.solo-v189-front-minimal #intel-strip {
    display: none !important;
}

body.solo-v189-front-minimal #front-counter-strip,
body.solo-v189-front-minimal #front-now-next {
    display: block !important;
}

/* Staff hub �� role badges */
.staff-hub .staff-role-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    background: #e2e8f0;
    color: #334155;
}
.staff-hub .staff-role-badge--casual {
    background: #dbeafe;
    color: #1d4ed8;
}
.staff-hub .staff-role-badge--store {
    background: #fef3c7;
    color: #b45309;
}
.staff-hub .staff-role-badge--office {
    background: #ede9fe;
    color: #6d28d9;
}
.staff-hub .staff-role-badge--excluded {
    background: #fee2e2;
    color: #b91c1c;
}
