:root {
    color-scheme: light;
    --fm-font-sans: "Aptos", "Bahnschrift", "Segoe UI", sans-serif;
    --fm-font-mono: "Cascadia Mono", "Consolas", monospace;
    --fm-bg: #e8edf1;
    --fm-bg-deep: #dae2e8;
    --fm-surface: #f7f9fb;
    --fm-surface-strong: #ffffff;
    --fm-surface-contrast: #132630;
    --fm-ink: #15232b;
    --fm-ink-soft: #4f626d;
    --fm-ink-inverse: #eef4f7;
    --fm-border: #c2cdd4;
    --fm-border-strong: #8fa4af;
    --fm-accent: #0f5d75;
    --fm-accent-strong: #0a4557;
    --fm-accent-soft: rgba(15, 93, 117, 0.12);
    --fm-live: #2b6e50;
    --fm-live-soft: rgba(43, 110, 80, 0.12);
    --fm-danger: #b04d38;
    --fm-danger-soft: rgba(176, 77, 56, 0.12);
    --fm-warning: #9e6d10;
    --fm-warning-soft: rgba(158, 109, 16, 0.12);
    --fm-shadow: 0 20px 40px rgba(17, 34, 43, 0.08);
    --fm-shadow-soft: 0 10px 24px rgba(17, 34, 43, 0.06);
    --fm-radius-sm: 4px;
    --fm-radius-md: 8px;
    --fm-radius-lg: 12px;
    --fm-shell-max: 1600px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
    overflow: hidden;
}

body.dashboard-body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    color: var(--fm-ink);
    font-family: var(--fm-font-sans);
    background:
        linear-gradient(135deg, rgba(15, 93, 117, 0.08), transparent 34%),
        linear-gradient(180deg, var(--fm-surface) 0%, var(--fm-bg) 56%, var(--fm-bg-deep) 100%);
    position: relative;
}

body.dashboard-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(19, 38, 48, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 38, 48, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 92%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

[hidden] {
    display: none !important;
}

body.page-register {
    background: radial-gradient(circle at 80% 20%, rgba(15, 93, 117, 0.05), transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05), transparent 50%),
                linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    color: #1e293b;
    height: 100vh;
    overflow-y: auto;
}

body.page-register::before {
    background-image:
        linear-gradient(rgba(15, 93, 117, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 93, 117, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, transparent 95%);
}

.fm-register-shell,
.fm-dashboard-shell {
    width: min(calc(100% - 48px), var(--fm-shell-max));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.fm-register-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(420px, 0.9fr);
    gap: 24px;
    align-items: center;
    padding: 40px 0;
}

.fm-register-shell.fm-register-tv {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    max-width: 560px;
    padding: 30px 20px;
    margin: 0 auto;
}

.fm-register-brand {
    text-align: center;
    margin-bottom: 8px;
}

.fm-register-brand__logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(15, 93, 117, 0.15));
    animation: fmLogoPulse 4s ease-in-out infinite;
}

.fm-register-brand__title {
    font-size: clamp(1.8rem, 3vw, 1.4rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    margin: 0;
    background: linear-gradient(135deg, #0f5d75 0%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fm-register-brand__subtitle {
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 700;
    color: #0f5d75;
    letter-spacing: 0.16em;
    margin: 6px 0 0 0;
    text-transform: uppercase;
}

@keyframes fmLogoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(15, 93, 117, 0.15));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 18px rgba(15, 93, 117, 0.35));
    }
}

.page-register .fm-register-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px rgba(15, 34, 43, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-radius: var(--fm-radius-lg);
    padding: 36px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.page-register .fm-register-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px rgba(15, 34, 43, 0.12), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fm-register-card__header,
.fm-panel__header,
.fm-device-panel__header,
.fm-scanner-panel__head,
.fm-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-register .fm-register-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f5d75;
}

.page-register .fm-register-card__title {
    margin: 6px 0 0;
    font-size: 1.5rem;
    line-height: 1.25;
    color: #1e293b;
    font-weight: 700;
}

/* --- Overrides for page-register components --- */
.page-register .fm-status-dot {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: help;
    z-index: 10;
}

.page-register .fm-status-dot__circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
    display: block;
}

.page-register .fm-status-dot.is-live .fm-status-dot__circle {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.page-register .fm-status-dot.is-live .fm-status-dot__circle::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: fmDotPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    opacity: 0.8;
}

.page-register .fm-status-dot.is-offline .fm-status-dot__circle {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.page-register .fm-status-dot.is-offline .fm-status-dot__circle::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    animation: fmDotPulse 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    opacity: 0.8;
}

@keyframes fmDotPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.page-register .fm-field span {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-register .fm-control,
.page-register .form-control.fm-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 16px 20px;
    height: auto;
    min-height: 58px;
    border-radius: var(--fm-radius-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-register .fm-control:focus,
.page-register .form-control.fm-control:focus {
    background: #ffffff;
    border-color: #0f5d75;
    box-shadow: 0 0 0 4px rgba(15, 93, 117, 0.12);
    outline: none;
}

.page-register .fm-control::placeholder {
    color: #94a3b8;
}

.page-register .fm-button {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--fm-radius-md);
    height: auto;
    min-height: 52px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-register .fm-button--primary {
    background: #0f5d75;
    border: 1.5px solid #0f5d75;
    color: #ffffff;
}

.page-register .fm-button--primary:hover {
    background: #0d4e62;
    border-color: #0d4e62;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 93, 117, 0.2);
}

.page-register .fm-button--secondary {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    color: #0f5d75;
}

.page-register .fm-button--secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.page-register .fm-button:disabled {
    opacity: 0.4;
    transform: none !important;
    box-shadow: none !important;
}

.page-register .fm-scanner-panel {
    background: rgba(248, 250, 252, 0.95);
    border: 1.5px solid rgba(15, 93, 117, 0.2);
    border-radius: var(--fm-radius-lg);
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 16px 36px rgba(15, 34, 43, 0.08);
}

.page-register .fm-scanner-panel__head {
    color: #1e293b;
    font-size: 1.1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.page-register .fm-scanner-panel__head strong {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.page-register .fm-scanner-video {
    border-radius: var(--fm-radius-md);
    border: 1.5px solid #cbd5e1;
    background: #000000;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.page-register .fm-scanner-help {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 12px;
    line-height: 1.5;
}

.page-register .fm-session-summary {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: var(--fm-radius-lg);
}

.page-register .fm-section-heading {
    color: #0f5d75;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.page-register .fm-session-grid {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--fm-radius-md);
    padding: 16px;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 24px;
}

.page-register .fm-info-block {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: var(--fm-radius-sm);
}

.page-register .fm-info-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-register .fm-info-value {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 700;
}

.page-register .fm-inline-message {
    border-radius: var(--fm-radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 18px;
    margin-top: 20px;
    line-height: 1.4;
    border-left: 4px solid transparent;
}

.page-register .fm-inline-message.is-info {
    background: #f0f9ff;
    color: #0369a1;
    border-left-color: #0284c7;
}

.page-register .fm-inline-message.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left-color: #dc2626;
}

.page-register .fm-inline-message.is-success {
    background: #f0fdf4;
    color: #15803d;
    border-left-color: #16a34a;
}

.fm-brand__meta,
.fm-device-panel__subtitle,
.fm-section-heading,
.fm-info-label,
.fm-kpi-card__label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.fm-status-badge,
.fm-badge,
.fm-live-indicator,
.fm-mode-chip,
.fm-mode-button {
    border: 1px solid var(--fm-border);
}

.fm-status-badge {
    padding: 10px 14px;
    min-width: 144px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(19, 38, 48, 0.04);
}

.fm-status-badge.is-live {
    background: var(--fm-live-soft);
    color: var(--fm-live);
    border-color: rgba(43, 110, 80, 0.3);
}

.fm-status-badge.is-offline {
    background: var(--fm-danger-soft);
    color: var(--fm-danger);
    border-color: rgba(176, 77, 56, 0.3);
}

.fm-inline-message {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--fm-accent);
    background: rgba(19, 38, 48, 0.05);
    color: var(--fm-ink);
}

.fm-inline-message.is-success {
    border-left-color: var(--fm-live);
    background: var(--fm-live-soft);
}

.fm-inline-message.is-error {
    border-left-color: var(--fm-danger);
    background: var(--fm-danger-soft);
}

.fm-inline-message.is-info {
    border-left-color: var(--fm-accent);
    background: var(--fm-accent-soft);
}

.fm-form-grid {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.fm-field {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.fm-control,
.form-control.fm-control {
    min-height: 56px;
    border-radius: 0;
    border: 1px solid var(--fm-border-strong);
    background: rgba(255, 255, 255, 0.94);
    color: var(--fm-ink);
    padding: 0 16px;
}

.fm-control:focus,
.form-control.fm-control:focus {
    border-color: var(--fm-accent);
    box-shadow: 0 0 0 0.2rem rgba(15, 93, 117, 0.15);
}

.fm-form-actions,
.fm-device-panel__actions,
.fm-topbar__actions,
.fm-mode-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fm-button,
.fm-icon-button,
.fm-mode-chip,
.fm-mode-button {
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.fm-button,
.fm-mode-chip,
.fm-mode-button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    background: var(--fm-surface-strong);
    color: var(--fm-ink);
}

.fm-button:hover,
.fm-mode-chip:hover,
.fm-mode-button:hover {
    transform: translateY(-1px);
}

.fm-button:disabled,
.fm-mode-chip:disabled,
.fm-mode-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.fm-button--primary {
    border: 1px solid var(--fm-accent-strong);
    background: linear-gradient(180deg, var(--fm-accent), var(--fm-accent-strong));
    color: var(--fm-ink-inverse);
}

.fm-button--secondary {
    border: 1px solid var(--fm-border-strong);
    background: rgba(19, 38, 48, 0.03);
    color: var(--fm-ink);
}

.fm-button--danger {
    border: 1px solid rgba(176, 77, 56, 0.34);
    background: var(--fm-danger-soft);
    color: var(--fm-danger);
}

.fm-icon-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--fm-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
}

.fm-icon-button--ghost:hover {
    border-color: var(--fm-border);
    background: rgba(19, 38, 48, 0.04);
}

.fm-scanner-panel,
.fm-session-summary {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--fm-border);
    background: rgba(255, 255, 255, 0.75);
}

.fm-scanner-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #0a1014;
    margin-top: 14px;
}

.fm-scanner-help {
    margin: 12px 0 0;
    color: var(--fm-ink-soft);
    line-height: 1.6;
}

.fm-session-grid,
.fm-meta-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.fm-session-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fm-meta-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-info-block {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(19, 38, 48, 0.08);
    background: rgba(255, 255, 255, 0.66);
}

.fm-info-label {
    color: var(--fm-ink-soft);
}

.fm-info-value {
    font-size: 1rem;
    font-weight: 700;
}

.fm-dashboard-shell {
    padding: 24px 0 40px;
}

.fm-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid rgba(19, 38, 48, 0.08);
    background: rgba(247, 249, 251, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 26px rgba(17, 34, 43, 0.08);
}

.fm-topbar__brand,
.fm-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fm-topbar__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.fm-brand {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fm-brand__mark {
    width: 18px;
    height: 18px;
    background:
        linear-gradient(180deg, transparent 0, transparent 4px, var(--fm-accent) 4px, var(--fm-accent) 14px, transparent 14px),
        linear-gradient(90deg, var(--fm-surface-contrast) 0, var(--fm-surface-contrast) 4px, transparent 4px);
    border: 1px solid var(--fm-surface-contrast);
}

.fm-brand__meta {
    color: var(--fm-ink-soft);
}

.fm-live-indicator {
    display: inline-grid;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.78);
    min-width: 148px;
}

.fm-live-indicator__label {
    color: var(--fm-warning);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    font-weight: 700;
}

.fm-live-indicator__label.is-live {
    color: var(--fm-live);
}

.fm-live-indicator__label.is-offline {
    color: var(--fm-danger);
}

.fm-live-indicator__time {
    font-family: var(--fm-font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.fm-mode-toggle,
.fm-mode-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-mode-toggle {
    justify-content: flex-end;
}

.fm-device-info {
    position: relative;
    width: 46px;
    height: 46px;
    padding: 0;
    font-size: 1.2rem;
}

.fm-device-info .fm-status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--fm-surface-strong);
    background: var(--fm-danger);
}

.fm-floating-actions {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    z-index: 40;
    width: 30px;
    height: 100vh;
    transition: width 0.18s ease;
}

.fm-floating-actions:hover,
.fm-floating-actions:focus-within {
    width: 100px;
}

.fm-floating-actions::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
}

.fm-floating-actions__panel {
    position: absolute;
    left: 0;
    top: 50%;
    display: grid;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 0 16px 16px 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(19, 38, 48, 0.12);
    box-shadow: 0 18px 40px rgba(17, 34, 43, 0.14);
    transform: translate(-100%, -50%);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease, top 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 70px;
}

.fm-floating-actions:hover .fm-floating-actions__panel,
.fm-floating-actions:focus-within .fm-floating-actions__panel {
    transform: translate(0, -50%);
    opacity: 1;
}

.fm-mode-toggle--floating {
    flex-direction: column;
    gap: 8px;
}

.fm-mode-chip {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fm-device-info.is-live .fm-status-indicator {
    background: var(--fm-live);
}

.fm-device-info.is-offline .fm-status-indicator {
    background: var(--fm-danger);
}

.fm-mode-chip,
.fm-mode-button {
    border-color: var(--fm-border-strong);
    background: rgba(255, 255, 255, 0.7);
}

.fm-mode-chip.is-active,
.fm-mode-button.is-active {
    border-color: var(--fm-accent);
    background: var(--fm-accent-soft);
    color: var(--fm-accent-strong);
}

.fm-hero-grid,
.fm-main-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.fm-hero-grid {
    grid-template-columns: 1.3fr 0.9fr;
}

.fm-main-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.fm-panel {
    padding: 24px;
}

.fm-panel--dual {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 2px solid #ced8e8;
    background: #ffffff;
    box-shadow: none;
}

.fm-panel__title {
    margin: 0;
    font-size: 1.02rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fm-hero-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    max-width: 12ch;
}

.fm-hero-title--dual {
    font-size: clamp(1.45rem, 2vw, 2.2rem);
    max-width: 14ch;
}

.fm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    background: rgba(19, 38, 48, 0.04);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fm-badge--muted {
    color: var(--fm-ink-soft);
}

.fm-product-spotlight {
    padding: 22px 0 18px;
    border-top: 1px solid rgba(19, 38, 48, 0.08);
    border-bottom: 1px solid rgba(19, 38, 48, 0.08);
    margin: 20px 0;
}

.fm-product-spotlight__code {
    display: block;
    font-family: var(--fm-font-mono);
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    letter-spacing: 0.02em;
}

.fm-product-spotlight__name {
    margin-top: 8px;
    color: var(--fm-ink-soft);
    font-size: 1rem;
}

.fm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.fm-kpi-grid--dual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.fm-kpi-card {
    padding: 18px 20px;
    display: grid;
    gap: 10px;
    border-top: 4px solid rgba(19, 38, 48, 0.12);
}

.fm-kpi-card--accent {
    border-top-color: var(--fm-accent);
    background: linear-gradient(180deg, rgba(15, 93, 117, 0.08), rgba(255, 255, 255, 0.94));
}

.fm-kpi-card__label {
    color: var(--fm-ink-soft);
}

.fm-kpi-card__value {
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.fm-timeslot-grid,
.fm-defect-list {
    display: grid;
    gap: 14px;
}

.fm-timeslot-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fm-timeslot-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fm-timeslot-grid--focus {
    grid-template-columns: 1fr;
}

.fm-timeslot-card,
.fm-defect-item,
.fm-empty-state {
    border: 1px solid rgba(19, 38, 48, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.fm-timeslot-card {
    padding: 16px;
    display: grid;
    gap: 14px;
}

.fm-timeslot-card.is-current {
    border-color: rgba(15, 93, 117, 0.42);
    background: linear-gradient(180deg, rgba(15, 93, 117, 0.12), rgba(255, 255, 255, 0.92));
}

.fm-timeslot-card.is-upcoming {
    border-color: rgba(158, 109, 16, 0.28);
    background: linear-gradient(180deg, rgba(158, 109, 16, 0.08), rgba(255, 255, 255, 0.92));
}

.fm-timeslot-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 0.84rem;
}

.fm-timeslot-card__window {
    color: var(--fm-ink-soft);
    font-family: var(--fm-font-mono);
}

.fm-timeslot-card__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(19, 38, 48, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: var(--fm-ink-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fm-timeslot-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.fm-timeslot-card__stat {
    display: grid;
    gap: 6px;
}

.fm-timeslot-card__stat-label {
    font-size: 0.72rem;
    color: var(--fm-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fm-timeslot-card__stat-value {
    font-size: 1.2rem;
    font-weight: 800;
}

.fm-defect-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

.fm-defect-item__title {
    display: grid;
    gap: 4px;
}

.fm-defect-item__title strong {
    font-size: 0.98rem;
}

.fm-defect-item__subtitle {
    color: var(--fm-ink-soft);
    font-size: 0.84rem;
}

.fm-defect-item__qty {
    min-width: 74px;
    text-align: right;
    font-family: var(--fm-font-mono);
    font-size: 1.2rem;
    font-weight: 800;
}

.fm-table-wrap {
    overflow: auto;
    margin-top: 18px;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

.fm-table th,
.fm-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(19, 38, 48, 0.08);
    vertical-align: top;
}

.fm-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--fm-ink-soft);
    background: rgba(19, 38, 48, 0.03);
}

.fm-table tbody tr:nth-child(2n) td {
    background: rgba(255, 255, 255, 0.45);
}

.fm-table__subtext {
    display: block;
    margin-top: 3px;
    color: var(--fm-ink-soft);
    font-size: 0.82rem;
}

.fm-empty-state {
    padding: 18px 16px;
    color: var(--fm-ink-soft);
    line-height: 1.6;
}

.fm-dual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fm-toast-host {
    position: fixed;
    top: 20px;
    right: 20px;
    display: grid;
    gap: 10px;
    z-index: 100;
}

.fm-toast {
    min-width: 280px;
    max-width: 380px;
    padding: 14px 16px;
    border-left: 4px solid var(--fm-accent);
    background: rgba(19, 38, 48, 0.94);
    color: var(--fm-ink-inverse);
    box-shadow: var(--fm-shadow);
    transform: translateX(0);
    opacity: 1;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.fm-toast.is-error {
    border-left-color: var(--fm-danger);
}

.fm-toast.is-success {
    border-left-color: var(--fm-live);
}

.fm-toast.is-leaving {
    opacity: 0;
    transform: translateX(16px);
}

.fm-device-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    padding: 22px;
    background: rgba(247, 249, 251, 0.98);
    border-left: 1px solid rgba(19, 38, 48, 0.12);
    box-shadow: -20px 0 40px rgba(17, 34, 43, 0.12);
    transform: translateX(100%);
    transition: transform 0.26s ease;
    z-index: 90;
}

.fm-device-panel.is-open {
    transform: translateX(0);
}

.fm-device-panel__title {
    font-size: 1.24rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fm-device-panel__subtitle {
    color: var(--fm-ink-soft);
    margin-top: 4px;
}

.fm-device-panel__body {
    display: grid;
    gap: 14px;
    padding-top: 20px;
}

.fm-device-panel__section {
    display: grid;
    gap: 12px;
    padding-top: 8px;
}

.fm-device-panel-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(17, 34, 43, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s ease, visibility 0.26s ease;
    z-index: 80;
}

.fm-device-panel-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.page-single.dashboard-body {
    background: #f4f7fb;
}

.page-single.dashboard-body::before {
    display: none;
}

.fm-dashboard-shell--single-tv,
.fm-dashboard-shell--dual {
    width: calc(100% - 10px);
    height: 100vh;
    max-width: none;
    margin: 0 auto;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.fm-single-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 4px;
}

.fm-button--compact,
.fm-single-toolbar .fm-mode-chip,
.fm-single-toolbar .fm-mode-button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
}

.fm-live-indicator--compact {
    min-width: 132px;
    padding: 8px 12px;
}

.fm-single-board {
    border: 2px solid #ced8e8;
    background: #ffffff;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-single-head,
.fm-single-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex-shrink: 0;
}

.fm-single-head__cell,
.fm-single-kpi {
    min-height: 0;
    padding: 8px 16px 6px;
    border-right: 1px solid #d2dcea;
    border-bottom: 1px solid #d2dcea;
}

.fm-single-head__cell:nth-child(2n),
.fm-single-kpi:nth-child(2n) {
    border-right: 0;
}

.fm-single-head__cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.fm-single-line-row {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
}

.fm-single-line-row .fm-single-datetime {
    position: absolute;
    right: 28px;
}

.fm-single-datetime {
    color: #476993;
    font-size: clamp(1.8rem, 2vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.fm-single-linecode,
.fm-single-plan-marker {
    color: #3e6fd6;
    font-size: clamp(2.8rem, 3.8vw, 4rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.fm-single-linename {
    margin-top: 6px;
    color: #476993;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.fm-single-meta,
.fm-single-plan {
    display: grid;
    gap: 3px;
    margin-top: 6px;
}

.fm-single-meta__row,
.fm-single-plan__row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0px;
    flex-wrap: wrap;
}

.fm-single-meta__label,
.fm-single-meta__value,
.fm-single-plan__label,
.fm-single-plan__value {
    color: #0a182d;
    font-size: clamp(1.05rem, 1.3vw, 1.4rem);
    font-weight: 800;
    line-height: 1.25;
}

.fm-single-meta__value::before,
.fm-single-plan__value::before {
    content: "\00a0";
}

.fm-single-meta__value--datetime {
    color: #476993;
}
.fm-single-kpi {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
}

.fm-single-kpi__label {
    color: #101f35;
    font-size: clamp(0.78rem, 1vw, 0.95rem);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.fm-single-kpi__value {
    font-size: clamp(2.8rem, 3.8vw, 4rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.fm-single-kpi__value--blue {
    color: #3e6fd6;
}

.fm-single-kpi__value--green {
    color: #05ba58;
}

.fm-single-slots {
    padding: 0 8px 6px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-single-slots__head {
    display: grid;
    grid-template-columns: 1.25fr 0.7fr 0.7fr;
    align-items: center;
    gap: 0;
    min-height: 32px;
    padding: 0 12px;
    border-bottom: 1px solid #d2dcea;
}

.fm-single-slots__head-cell {
    color: #506a90;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.fm-single-slots__head-cell--time {
    text-align: left;
}

.fm-single-slots__body {
    display: grid;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-content: stretch;
}

.fm-single-slot-row {
    display: grid;
    grid-template-columns: 1.25fr 0.7fr 0.7fr;
    align-items: center;
    gap: 0;
    min-height: 0;
    padding: 0 14px;
    border-bottom: 1px solid #d2dcea;
    background: #ffffff;
}

.fm-single-slot-row:last-child {
    border-bottom: 0;
}

.fm-single-slot-row.is-current {
    background: #eaf3ff;
}

.fm-single-slot-row__time {
    color: #173058;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.fm-single-slot-row.is-current .fm-single-slot-row__time {
    color: #3e6fd6;
}

.fm-single-slot-row__metric {
    color: #3e6fd6;
    font-size: clamp(2.6rem, 3.6vw, 3.8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-align: center;
}

.fm-single-slot-row__metric--dark {
    color: #192334;
}

.fm-single-slot-row.is-current .fm-single-slot-row__metric--dark {
    color: #3e6fd6;
}

.fm-single-slot-empty {
    padding: 48px 18px;
    color: #506a90;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.fm-single-plan-status {
    margin-top: 10px;
    color: #506a90;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fm-single-plan-status.is-partial {
    color: #9a6615;
}

.fm-single-plan-status.is-missing {
    color: #b03c3c;
}

.fm-dual-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.fm-dual-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(19, 38, 48, 0.12);
    background: rgba(19, 38, 48, 0.04);
    color: #506a90;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fm-dual-status.is-partial {
    border-color: rgba(154, 102, 21, 0.25);
    background: rgba(154, 102, 21, 0.08);
    color: #9a6615;
}

.fm-dual-status.is-missing {
    border-color: rgba(176, 60, 60, 0.25);
    background: rgba(176, 60, 60, 0.08);
    color: #b03c3c;
}

.fm-single-head--dual .fm-single-head__cell {
    min-height: 90px;
    padding: 8px 12px 6px;
}

.fm-single-head--dual .fm-single-meta,
.fm-single-head--dual .fm-single-plan {
    margin-top: 8px;
}

.fm-single-head--dual .fm-single-meta__label,
.fm-single-head--dual .fm-single-meta__value,
.fm-single-head--dual .fm-single-plan__label,
.fm-single-head--dual .fm-single-plan__value {
    font-size: clamp(1rem, 1.25vw, 1.3rem);
}

.fm-single-head--dual .fm-single-linecode,
.fm-single-head--dual .fm-single-plan-marker {
    font-size: clamp(2.2rem, 3vw, 3.2rem);
}

.fm-single-plan-marker--dual {
    font-size: inherit;
}

.fm-single-head--dual .fm-dual-status {
    margin-top: 8px;
}

.fm-single-head--dual .fm-single-datetime {
    font-size: clamp(1.1rem, 1.4vw, 1.5rem);
}

.fm-single-head--dual .fm-single-line-row .fm-single-datetime {
    right: 16px;
}

.fm-single-kpis--dual .fm-single-kpi {
    min-height: 64px;
    padding: 8px 12px 6px;
    gap: 3px;
}

.fm-single-kpis--dual .fm-single-kpi__label {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
}

.fm-single-kpis--dual .fm-single-kpi__value {
    font-size: clamp(2.4rem, 3.2vw, 3.5rem);
}

.fm-single-slots--mini {
    padding: 0 0 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-single-slots--mini .fm-single-slots__head {
    min-height: 28px;
    padding: 0 12px;
}

.fm-single-slots--mini .fm-single-slots__head-cell {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.fm-single-slots__body--mini {
    gap: 0;
    align-content: stretch;
}

.fm-single-slots__body--mini .fm-single-slot-row,
.fm-single-slot-row--mini {
    min-height: 0;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #d2dcea;
    background: #ffffff;
}

.fm-single-slots__body--mini .fm-single-slot-row:last-child {
    border-bottom: 0;
}

.fm-single-slots__body--mini .fm-single-slot-row__time,
.fm-single-slot-row--mini .fm-single-slot-row__time {
    font-size: clamp(1.8rem, 2.8vh, 2.8rem);
}

.fm-single-slots__body--mini .fm-single-slot-row__metric,
.fm-single-slot-row--mini .fm-single-slot-row__metric {
    font-size: clamp(2.6rem, 4.5vh, 4rem);
}

@media (max-width: 1200px) {
    .fm-register-shell,
    .fm-hero-grid,
    .fm-main-grid,
    .fm-dual-grid {
        grid-template-columns: 1fr;
    }

    .fm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fm-session-grid,
    .fm-meta-grid,
    .fm-meta-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fm-single-head__cell,
    .fm-single-kpi {
        padding-left: 18px;
        padding-right: 18px;
    }

    .fm-single-slot-row {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .fm-register-shell,
    .fm-dashboard-shell {
        width: min(calc(100% - 24px), var(--fm-shell-max));
    }

    .fm-register-shell {
        padding: 20px 0 28px;
        gap: 18px;
    }

    .fm-register-intro,
    .fm-register-card,
    .fm-panel {
        padding: 18px;
    }

    .fm-topbar {
        padding: 14px;
    }

    .fm-topbar,
    .fm-register-card__header,
    .fm-panel__header,
    .fm-device-panel__header {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-topbar__actions,
    .fm-form-actions,
    .fm-session-grid,
    .fm-meta-grid,
    .fm-meta-grid--compact,
    .fm-kpi-grid,
    .fm-kpi-grid--dual,
    .fm-timeslot-card__stats {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .fm-kpi-grid,
    .fm-kpi-grid--dual,
    .fm-topbar__actions {
        display: grid;
    }

    .fm-button,
    .fm-mode-chip,
    .fm-mode-button {
        width: 100%;
    }

    .fm-device-panel {
        width: 100vw;
        padding: 18px;
    }

    .fm-toast-host {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .fm-toast {
        min-width: 0;
        max-width: none;
    }

    .fm-dashboard-shell--single-tv {
        width: calc(100% - 10px);
        padding-top: 5px;
    }

    .fm-single-toolbar {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .fm-single-toolbar > * {
        flex: 1 1 100%;
    }

    .fm-single-head,
    .fm-single-kpis,
    .fm-single-slots__head,
    .fm-single-slot-row {
        grid-template-columns: 1fr;
    }

    .fm-single-head__cell,
    .fm-single-kpi {
        min-height: auto;
        border-right: 0;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .fm-single-slots__head {
        gap: 8px;
        padding: 12px;
    }

    .fm-single-slots__head-cell,
    .fm-single-slots__head-cell--time {
        text-align: left;
    }

    .fm-single-slot-row {
        min-height: auto;
        gap: 10px;
        padding: 18px 14px;
    }

    .fm-single-slot-row__metric {
        text-align: left;
    }

    .fm-single-line-row {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }

    .fm-single-line-row .fm-single-datetime {
        position: static;
        margin-top: 4px;
    }

}

/* ==========================================
   DARK THEME OVERRIDES FOR DASHBOARD (SINGLE & DUAL)
   ========================================== */
body.theme-dark {
    color-scheme: dark;
    --fm-bg: #0b151e;
    --fm-bg-deep: #070e14;
    --fm-surface: #101c26;
    --fm-surface-strong: #172635;
    --fm-surface-contrast: #eef4f7;
    --fm-ink: #f1f5f9;
    --fm-ink-soft: #94a3b8;
    --fm-ink-inverse: #0f172a;
    --fm-border: #2e445b;
    --fm-border-strong: #475569;
    --fm-accent: #38bdf8;
    --fm-accent-strong: #0284c7;
    --fm-accent-soft: rgba(56, 189, 248, 0.15);
    --fm-live: #34d399;
    --fm-live-soft: rgba(52, 211, 153, 0.15);
    --fm-danger: #f87171;
    --fm-danger-soft: rgba(248, 113, 113, 0.15);
    --fm-warning: #fbbf24;
    --fm-warning-soft: rgba(251, 191, 36, 0.15);
    --fm-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    --fm-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.4);
}

/* Base Body overrides for Dark Mode */
body.theme-dark.page-single.dashboard-body,
body.theme-dark.page-dual.dashboard-body {
    background: var(--fm-bg-deep);
}

body.theme-dark .fm-single-board,
body.theme-dark .fm-panel--dual {
    border-color: var(--fm-border);
    background: var(--fm-surface);
}

body.theme-dark .fm-single-head__cell,
body.theme-dark .fm-single-kpi {
    border-right-color: var(--fm-border);
    border-bottom-color: var(--fm-border);
}

body.theme-dark .fm-single-linecode,
body.theme-dark .fm-single-plan-marker {
    color: var(--fm-accent);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

body.theme-dark .fm-single-datetime {
    color: var(--fm-accent);
}

body.theme-dark .fm-single-linename {
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-single-meta__label,
body.theme-dark .fm-single-meta__value,
body.theme-dark .fm-single-plan__label,
body.theme-dark .fm-single-plan__value {
    color: var(--fm-ink);
}

body.theme-dark .fm-single-meta__value--datetime {
    color: var(--fm-accent);
}

body.theme-dark .fm-single-kpi__label {
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-single-slots__head {
    border-bottom-color: var(--fm-border);
    background: var(--fm-surface-strong);
}

body.theme-dark .fm-single-slots__head-cell {
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-single-slots__body--mini .fm-single-slot-row,
body.theme-dark .fm-single-slot-row--mini,
body.theme-dark .fm-single-slot-row {
    border-color: var(--fm-border);
    background: var(--fm-surface-strong);
    color: var(--fm-ink);
}

body.theme-dark .fm-single-slot-row__time {
    color: var(--fm-ink);
}

body.theme-dark .fm-single-slot-row__metric {
    color: var(--fm-ink);
}

body.theme-dark .fm-single-slot-empty {
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-single-plan-status {
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-single-plan-status.is-partial {
    color: var(--fm-warning);
}

body.theme-dark .fm-single-plan-status.is-missing {
    color: var(--fm-danger);
}

body.theme-dark .fm-dual-status {
    border-color: var(--fm-border);
    background: var(--fm-surface-strong);
    color: var(--fm-ink-soft);
}

body.theme-dark .fm-dual-status.is-partial {
    border-color: var(--fm-warning-soft);
    background: rgba(251, 191, 36, 0.08);
    color: var(--fm-warning);
}

body.theme-dark .fm-dual-status.is-missing {
    border-color: var(--fm-danger-soft);
    background: rgba(248, 113, 113, 0.08);
    color: var(--fm-danger);
}

/* Floating Actions Theme Style for Dark Mode Toggle button */
.fm-floating-actions__panel .fm-icon-button.fm-dark-mode-toggle {
    color: var(--fm-ink-soft);
    position: relative;
    font-size: 1.3rem;
}
.fm-floating-actions__panel .fm-icon-button.fm-dark-mode-toggle:hover {
    color: var(--fm-accent);
    background: rgba(255, 255, 255, 0.08);
}
body.theme-dark .fm-floating-actions__panel {
    background: var(--fm-surface-strong);
    border-color: var(--fm-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   PRODUCTIVITY SUMMARY DASHBOARD
   ========================================== */
body.page-summary.dashboard-body {
    overflow-y: auto;
    overflow-x: hidden;
}

body.page-summary::before {
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 92%);
}

.page-summary .summary-dashboard-shell {
    width: min(calc(100% - 36px), 1920px);
    margin: 0 auto;
    padding: 24px 0 40px;
    position: relative;
    z-index: 1;
}

.page-summary .fm-floating-actions--summary {
    z-index: 15;
}

.page-summary .summary-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.page-summary .summary-dashboard-title-block {
    display: grid;
    gap: 8px;
    max-width: 980px;
}

.page-summary .summary-dashboard-eyebrow {
    margin: 0;
    color: var(--fm-accent);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-summary .summary-dashboard-header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--fm-surface-contrast);
}

.page-summary .summary-dashboard-subtitle {
    margin: 0;
    max-width: 840px;
    color: var(--fm-ink-soft);
    font-size: 1rem;
}

.page-summary .summary-dashboard-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.page-summary .summary-card,
.page-summary .summary-surface {
    background: #fff;
    border: 1px solid var(--fm-border);
    box-shadow: 0 1px 4px rgba(10, 22, 40, 0.08);
}

.page-summary .summary-card {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 4px;
}

.page-summary .summary-card span {
    color: var(--fm-ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.page-summary .summary-card strong {
    color: var(--fm-surface-contrast);
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1;
}

.page-summary .summary-card small {
    color: var(--fm-ink-soft);
    font-size: 0.88rem;
}

.page-summary .summary-surface {
    border-radius: 4px;
    padding: 18px;
}

.page-summary .summary-surface + .summary-surface {
    margin-top: 20px;
}

.page-summary .summary-surface__head,
.page-summary .summary-calendar-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.page-summary .summary-surface__head h2 {
    margin: 0;
    font-size: 1.36rem;
    color: var(--fm-surface-contrast);
}

.page-summary .summary-surface__head p {
    margin: 4px 0 0;
    color: var(--fm-ink-soft);
}

.page-summary .summary-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    width: 100%;
}

.page-summary .summary-month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-summary .summary-month-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 4px;
    border: 1px solid var(--fm-border);
    background: #f7f9fb;
    color: var(--fm-surface-contrast);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.page-summary .summary-toolbar-field {
    display: grid;
    gap: 6px;
    min-width: 200px;
    color: var(--fm-ink-soft);
    font-size: 0.88rem;
}

.page-summary .summary-toolbar-field span {
    font-weight: 700;
}

.page-summary .summary-toolbar-field-small {
    min-width: 164px;
}

.page-summary .fm-summary-control {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 2px;
    border: 1px solid var(--fm-border);
    background: #fff;
    color: var(--fm-ink);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.page-summary .fm-summary-control:focus {
    border-color: var(--fm-accent);
    box-shadow: 0 0 0 4px rgba(15, 93, 117, 0.14);
}

.page-summary .summary-filter-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-summary .summary-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.page-summary .summary-single-calendar {
    display: grid;
    gap: 18px;
    align-content: start;
}

.page-summary .summary-single-sidebar {
    padding: 16px;
    border-radius: 4px;
    border: 1px solid rgba(159, 110, 16, 0.28);
    background: #fffdf5;
}

.page-summary .company-product-totals-head {
    margin-bottom: 12px;
}

.page-summary .company-product-totals-head h3,
.page-summary .summary-day-chart-head h3,
.page-summary .summary-day-products-head h3 {
    margin: 0;
    color: var(--fm-surface-contrast);
    font-size: 1.02rem;
}

.page-summary .company-product-totals-head p,
.page-summary .summary-day-chart-head p,
.page-summary .summary-day-products-head p {
    margin: 4px 0 0;
    color: var(--fm-ink-soft);
    font-size: 0.88rem;
}

.page-summary .summary-month-panel {
    overflow: hidden;
    border-radius: 0;
    border: 1px solid var(--fm-border);
    background: #fff;
}

.page-summary .summary-month-title {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fm-border);
    background: linear-gradient(135deg, rgba(15, 93, 117, 0.12), rgba(255, 255, 255, 0.72));
    color: var(--fm-surface-contrast);
    font-size: 1.04rem;
    font-weight: 800;
}

.page-summary .summary-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--fm-border);
    background: rgba(247, 249, 251, 0.92);
}

.page-summary .summary-calendar-weekdays span {
    padding: 10px 8px;
    color: var(--fm-ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-summary .summary-calendar-weekdays span.is-sunday {
    background: rgba(176, 77, 56, 0.08);
    color: var(--fm-danger);
}

.page-summary .summary-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: rgba(194, 205, 212, 0.72);
}

.page-summary .summary-calendar-cell {
    min-height: 148px;
    padding: 10px 10px 12px;
    background: rgba(255, 255, 255, 0.9);
    display: grid;
    align-content: start;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.page-summary .summary-calendar-cell.blank {
    background: rgba(247, 249, 251, 0.92);
}

.page-summary .summary-calendar-cell.out-range {
    background: rgba(243, 246, 248, 0.92);
    color: #94a3b8;
}

.page-summary .summary-calendar-cell.in-range.has-data {
    background: rgba(226, 244, 250, 0.92);
}

.page-summary .summary-calendar-cell.in-range.no-data {
    background: rgba(255, 255, 255, 0.9);
}

.page-summary .summary-calendar-cell.clickable {
    cursor: pointer;
}

.page-summary .summary-calendar-cell.clickable:hover {
    transform: translateY(-2px);
    background: rgba(220, 238, 245, 0.95);
}

.page-summary .summary-calendar-cell.selected {
    box-shadow: inset 0 0 0 3px var(--fm-accent);
    background: rgba(208, 233, 241, 0.96);
}

.page-summary .summary-calendar-cell.today {
    box-shadow: inset 0 0 0 3px rgba(158, 109, 16, 0.66);
    background: rgba(255, 247, 230, 0.96);
}

.page-summary .summary-calendar-cell.today.selected {
    box-shadow: inset 0 0 0 3px var(--fm-accent), inset 0 0 0 6px rgba(158, 109, 16, 0.28);
}

.page-summary .summary-calendar-cell.is-sunday {
    background: rgba(255, 247, 247, 0.94);
}

.page-summary .summary-calendar-day-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--fm-surface-contrast);
}

.page-summary .summary-calendar-product {
    min-height: 1.2em;
    color: var(--fm-accent-strong);
    font-size: 0.94rem;
    font-weight: 700;
    word-break: break-word;
}

.page-summary .summary-calendar-qty {
    color: var(--fm-surface-contrast);
    font-size: 1.92rem;
    font-weight: 800;
    line-height: 1;
}

.page-summary .summary-calendar-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--fm-ink-soft);
    font-size: 0.78rem;
}

.page-summary .table-wrap {
    overflow: auto;
}

.page-summary .table-wrap.drag-scroll-enabled {
    cursor: grab;
}

.page-summary .table-wrap.drag-scroll-enabled.is-dragging {
    cursor: grabbing;
}

.drag-scroll-active,
.drag-scroll-active * {
    user-select: none;
}

.page-summary .summary-mini-table,
.page-summary .summary-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.page-summary .summary-mini-table th,
.page-summary .summary-mini-table td,
.page-summary .summary-detail-table th,
.page-summary .summary-detail-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(194, 205, 212, 0.9);
    text-align: left;
    vertical-align: top;
}

.page-summary .summary-mini-table th,
.page-summary .summary-detail-table th {
    background: rgba(247, 249, 251, 0.92);
    color: var(--fm-ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-summary .summary-mini-table td,
.page-summary .summary-detail-table td {
    color: var(--fm-ink);
    font-size: 0.92rem;
}

.page-summary .number-cell {
    text-align: right;
}

.page-summary .summary-production-matrix-wrap {
    min-height: 120px;
    padding: 14px;
    border-radius: 4px;
    border: 1px solid var(--fm-border);
    background: #fff;
}

.page-summary .summary-production-matrix-wrap .table-wrap {
    height: auto;
    min-height: 0;
    overflow-x: auto;
}

.page-summary .summary-production-matrix-table {
    width: max-content;
    min-width: 100%;
}

.page-summary .summary-production-matrix-table th,
.page-summary .summary-production-matrix-table td {
    white-space: nowrap;
    border-right: 1px solid rgba(194, 205, 212, 0.9);
}

.page-summary .summary-production-matrix-table th:last-child,
.page-summary .summary-production-matrix-table td:last-child {
    border-right: none;
}

.page-summary .summary-production-matrix-date-head {
    min-width: 88px;
    text-align: center;
}

.page-summary .summary-production-matrix-total-head {
    min-width: 118px;
    text-align: center;
    background: rgba(15, 93, 117, 0.08);
}

.page-summary .summary-production-matrix-date-head.is-sunday {
    background: rgba(176, 77, 56, 0.08);
    color: var(--fm-danger);
}

.page-summary .summary-production-matrix-company,
.page-summary .summary-production-matrix-product {
    font-weight: 700;
    color: var(--fm-surface-contrast);
}

.page-summary .summary-production-matrix-total-row td {
    background: rgba(255, 247, 230, 0.96);
    font-weight: 800;
}

.page-summary .summary-production-matrix-total-label,
.page-summary .summary-production-matrix-total-cell {
    color: #8c5710;
}

.page-summary .summary-production-matrix-sunday-cell {
    background: rgba(255, 247, 247, 0.94);
}

.page-summary .summary-production-matrix-sticky {
    position: sticky;
    z-index: 2;
    background: #fff;
}

.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky {
    z-index: 4;
    background: #f7f9fb;
}

.page-summary .summary-production-matrix-sticky-company {
    left: 0;
    min-width: 180px;
}

.page-summary .summary-production-matrix-sticky-product {
    left: 180px;
    min-width: 140px;
}

.page-summary .summary-production-matrix-sticky-line {
    left: 320px;
    min-width: 240px;
}

.page-summary .summary-production-matrix-sticky-total {
    right: 118px;
    min-width: 118px;
    box-shadow: -2px 0 4px rgba(10, 22, 40, 0.08), -1px 0 0 var(--fm-border);
}

.page-summary .summary-production-matrix-sticky-cumulative {
    right: 0;
    min-width: 118px;
    box-shadow: -1px 0 0 var(--fm-border);
}

.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky-total,
.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky-cumulative {
    z-index: 5;
    background: #e8f3f7;
}

.page-summary .summary-day-chart-wrap {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 4px;
    border: 1px solid var(--fm-border);
    background: #fff;
}

.page-summary .summary-day-chart {
    min-height: 260px;
}

.page-summary .summary-day-chart-svg {
    display: block;
    width: 100%;
    height: auto;
}

.page-summary .summary-day-chart-area {
    fill: rgba(15, 93, 117, 0.14);
}

.page-summary .summary-day-chart-line {
    fill: none;
    stroke: var(--fm-accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-summary .summary-day-chart-grid {
    stroke: rgba(194, 205, 212, 0.9);
    stroke-width: 1;
}

.page-summary .summary-day-chart-axis-label,
.page-summary .summary-day-chart-value-label {
    fill: var(--fm-ink-soft);
    font-size: 12px;
    font-weight: 600;
}

.page-summary .summary-day-chart-axis-label.is-selected {
    fill: var(--fm-accent-strong);
    font-weight: 800;
}

.page-summary .summary-day-chart-point {
    fill: #fff;
    stroke: var(--fm-accent);
    stroke-width: 2.5;
}

.page-summary .summary-day-chart-point.is-selected {
    fill: var(--fm-accent);
    stroke: var(--fm-accent-strong);
    stroke-width: 3;
}

.page-summary .summary-empty-state {
    padding: 28px;
    text-align: center;
    color: var(--fm-ink-soft);
}

body.page-summary.summary-modal-open {
    overflow: hidden;
}

.page-summary .summary-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.page-summary .summary-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.56);
}

.page-summary .summary-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1380px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    padding: 20px 20px 22px;
    overflow: auto;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--fm-border);
    box-shadow: 0 8px 40px rgba(10, 22, 40, 0.22);
}

.page-summary .summary-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(194, 205, 212, 0.9);
}

.page-summary .summary-modal-head h2 {
    margin: 0;
    color: var(--fm-surface-contrast);
    font-size: 1.4rem;
}

.page-summary .summary-modal-head p {
    margin: 6px 0 0;
    color: var(--fm-ink-soft);
}

.page-summary .summary-modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--fm-border);
    border-radius: 4px;
    background: #f7f9fb;
    color: var(--fm-surface-contrast);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.page-summary .summary-modal-close:hover {
    background: rgba(15, 93, 117, 0.10);
    border-color: var(--fm-accent);
}

.page-summary .summary-modal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.page-summary .summary-modal-stat {
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 2px;
    border: 1px solid var(--fm-border);
    background: #f7f9fb;
    display: grid;
    gap: 4px;
}

.page-summary .summary-modal-stat span {
    color: var(--fm-ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-summary .summary-modal-stat strong {
    color: var(--fm-surface-contrast);
    font-size: 1.15rem;
}

.page-summary .summary-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.page-summary .summary-modal-section {
    padding: 16px;
    border-radius: 4px;
    border: 1px solid var(--fm-border);
    background: #f7f9fb;
}

.page-summary .summary-modal-section .table-wrap {
    max-height: 280px;
}

.page-summary .summary-modal-section-wide .table-wrap {
    max-height: none;
}

body.theme-dark.page-summary.dashboard-body {
    background: linear-gradient(180deg, var(--fm-bg-deep) 0%, #09121a 100%);
}

body.theme-dark.page-summary .summary-card,
body.theme-dark.page-summary .summary-surface,
body.theme-dark.page-summary .summary-month-panel,
body.theme-dark.page-summary .summary-production-matrix-wrap,
body.theme-dark.page-summary .summary-day-chart-wrap,
body.theme-dark.page-summary .summary-modal-dialog,
body.theme-dark.page-summary .summary-modal-section {
    border-color: var(--fm-border);
    background: rgba(16, 28, 38, 0.92);
}

body.theme-dark.page-summary .summary-dashboard-header h1,
body.theme-dark.page-summary .summary-card strong,
body.theme-dark.page-summary .summary-surface__head h2,
body.theme-dark.page-summary .summary-modal-head h2,
body.theme-dark.page-summary .summary-modal-stat strong,
body.theme-dark.page-summary .summary-day-chart-head h3,
body.theme-dark.page-summary .summary-day-products-head h3,
body.theme-dark.page-summary .company-product-totals-head h3,
body.theme-dark.page-summary .summary-month-title,
body.theme-dark.page-summary .summary-calendar-day-number,
body.theme-dark.page-summary .summary-calendar-qty,
body.theme-dark.page-summary .summary-production-matrix-company,
body.theme-dark.page-summary .summary-production-matrix-product {
    color: var(--fm-ink);
}

body.theme-dark.page-summary .summary-dashboard-subtitle,
body.theme-dark.page-summary .summary-card span,
body.theme-dark.page-summary .summary-card small,
body.theme-dark.page-summary .summary-surface__head p,
body.theme-dark.page-summary .summary-calendar-weekdays span,
body.theme-dark.page-summary .summary-calendar-meta,
body.theme-dark.page-summary .company-product-totals-head p,
body.theme-dark.page-summary .summary-day-chart-head p,
body.theme-dark.page-summary .summary-day-products-head p,
body.theme-dark.page-summary .summary-empty-state,
body.theme-dark.page-summary .summary-modal-head p,
body.theme-dark.page-summary .summary-modal-stat span,
body.theme-dark.page-summary .summary-mini-table td,
body.theme-dark.page-summary .summary-detail-table td {
    color: var(--fm-ink-soft);
}

body.theme-dark.page-summary .summary-month-chip,
body.theme-dark.page-summary .fm-summary-control,
body.theme-dark.page-summary .summary-calendar-weekdays,
body.theme-dark.page-summary .summary-calendar-cell,
body.theme-dark.page-summary .summary-mini-table th,
body.theme-dark.page-summary .summary-detail-table th,
body.theme-dark.page-summary .summary-modal-stat {
    border-color: var(--fm-border);
    background: rgba(23, 38, 53, 0.94);
    color: var(--fm-ink);
}

body.theme-dark.page-summary .summary-single-sidebar {
    border-color: rgba(251, 191, 36, 0.18);
    background: rgba(29, 39, 49, 0.96);
}

body.theme-dark.page-summary .summary-calendar-cell.blank,
body.theme-dark.page-summary .summary-calendar-cell.out-range {
    background: rgba(16, 28, 38, 0.94);
}

body.theme-dark.page-summary .summary-calendar-cell.in-range.has-data,
body.theme-dark.page-summary .summary-calendar-cell.selected {
    background: rgba(23, 52, 73, 0.96);
}

body.theme-dark.page-summary .summary-calendar-cell.today {
    background: rgba(68, 51, 14, 0.92);
}

body.theme-dark.page-summary .summary-calendar-grid,
body.theme-dark.page-summary .summary-mini-table th,
body.theme-dark.page-summary .summary-mini-table td,
body.theme-dark.page-summary .summary-detail-table th,
body.theme-dark.page-summary .summary-detail-table td,
body.theme-dark.page-summary .summary-calendar-weekdays,
body.theme-dark.page-summary .summary-modal-head,
body.theme-dark.page-summary .summary-production-matrix-wrap,
body.theme-dark.page-summary .summary-day-chart-wrap {
    border-color: var(--fm-border);
}

body.theme-dark.page-summary .summary-production-matrix-sticky {
    background: #101c26;
}

body.theme-dark.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky {
    background: #0e1a24;
}

body.theme-dark.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky-total,
body.theme-dark.page-summary .summary-production-matrix-table thead .summary-production-matrix-sticky-cumulative {
    background: #0d2233;
}

body.theme-dark.page-summary .summary-production-matrix-total-row td {
    background: rgba(88, 61, 16, 0.54);
}

body.theme-dark.page-summary .summary-day-chart-grid {
    stroke: var(--fm-border);
}

@media (max-width: 1280px) {
    .page-summary .summary-dashboard-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-summary .summary-single-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .page-summary .summary-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page-summary .summary-dashboard-shell {
        width: min(calc(100% - 16px), 1920px);
        padding-top: 16px;
    }

    .page-summary .summary-dashboard-overview {
        grid-template-columns: 1fr;
    }

    .page-summary .summary-calendar-toolbar,
    .page-summary .summary-month-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .page-summary .summary-toolbar-field,
    .page-summary .summary-toolbar-field-small {
        min-width: 0;
    }

    .page-summary .summary-filter-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .page-summary .summary-filter-buttons .fm-button {
        flex: 1 1 0;
    }

    .page-summary .summary-calendar-weekdays span {
        padding: 8px 4px;
        font-size: 0.7rem;
    }

    .page-summary .summary-calendar-cell {
        min-height: 118px;
        padding: 8px;
    }

    .page-summary .summary-calendar-day-number {
        font-size: 1.08rem;
    }

    .page-summary .summary-calendar-qty {
        font-size: 1.38rem;
    }

    .page-summary .summary-calendar-meta {
        flex-direction: column;
        gap: 4px;
    }

    .page-summary .summary-production-matrix-wrap {
        min-height: 80px;
    }

    .page-summary .summary-modal-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 16px;
    }
}
