:root {
    --primary: #0d5cab;
    --primary-dark: #083f79;
    --primary-soft: #d9e8f8;
    --accent: #12a37a;
    --accent-soft: #d9fff1;
    --bg: #edf5fb;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --text: #17324d;
    --muted: #61758a;
    --danger: #dc2626;
    --border: rgba(15, 54, 99, 0.12);
    --shadow: 0 24px 60px rgba(16, 64, 117, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #0f5ca6 0%, #0b69b8 25%, #dbedf9 55%, #eff8f4 100%);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
strong,
button,
input,
select,
textarea {
    font-family: 'Lexend', sans-serif;
}

button,
a {
    transition: 0.2s ease;
}

.app-shell {
    position: relative;
}

.app-shell__backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.35), transparent 30%),
        radial-gradient(circle at bottom right, rgba(18,163,122,0.14), transparent 25%);
    pointer-events: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(9, 69, 126, 0.95);
    backdrop-filter: blur(14px);
    color: white;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 78px;
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    overflow: hidden;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-lockup h1,
.page-hero h2,
.panel h3 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--muted);
}

.topbar .eyebrow {
    color: rgba(255,255,255,0.7);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-chip {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.12);
    border-radius: 18px;
}

.user-chip span {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #2bb24c;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 2rem 0;
    overflow-x: auto;
}

.nav-tabs a {
    padding: 0.85rem 1rem;
    border-radius: 18px 18px 0 0;
    color: #38536b;
    text-decoration: none;
    background: rgba(255,255,255,0.72);
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-tabs a.is-active {
    background: white;
    color: var(--primary);
    border-color: rgba(12, 92, 171, 0.16);
}

.page-wrap {
    padding: 1.5rem 2rem 2rem;
}

.page-hero,
.panel,
.stat-card,
.form-card,
.table-card,
.monitor-preview,
.flash,
.login-card,
.monitor-screen__card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 1.6rem 1.75rem;
    margin-bottom: 1.5rem;
}

.button {
    border: 0;
    border-radius: 16px;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.button--primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1872cc 100%);
    color: white;
}

.button--ghost {
    background: rgba(255,255,255,0.12);
    color: inherit;
    border: 1px solid rgba(255,255,255,0.16);
}

.button--block {
    width: 100%;
}

.button--danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.flash {
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.flash--success {
    border-left: 6px solid var(--accent);
}

.flash--error {
    border-left: 6px solid var(--danger);
}

.flash ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.flash p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pagination-wrap {
    padding: 0.75rem 1rem 0.25rem;
    border-top: 1px solid var(--border);
}

.paginator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.paginator__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.paginator__btn:hover:not(.paginator__btn--disabled):not(.paginator__btn--active) {
    background: var(--surface);
}

.paginator__btn--active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.paginator__btn--disabled {
    opacity: 0.4;
    cursor: default;
}

.stats-grid,
.dashboard-grid,
.module-grid,
.monitor-admin-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.stat-card strong {
    font-size: 2rem;
}

.dashboard-grid,
.monitor-admin-grid {
    grid-template-columns: 1.1fr 1fr;
}

.panel,
.form-card,
.table-card,
.monitor-preview {
    padding: 1.4rem;
}

.panel__header,
.table-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mini-cards,
.form-grid,
.table-grid,
.monitor-cards {
    display: grid;
    gap: 1rem;
}

.mini-cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mini-card {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(13,92,171,0.08), rgba(18,163,122,0.08));
    border: 1px solid rgba(13,92,171,0.1);
}

.mini-card p,
.mini-card small,
.monitor-screen__meta,
.empty-state,
.table-card small,
.login-help,
.helper-text {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: var(--badge-color, var(--primary));
    background: color-mix(in srgb, var(--badge-color, var(--primary)) 14%, white);
    font-size: 0.82rem;
    margin-bottom: 0.8rem;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline__item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 0.85rem;
}

.timeline__dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    margin-top: 0.35rem;
}

.module-grid {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start;
}

.module-grid--wide {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

.form-card form,
.filter-bar,
.login-form {
    display: grid;
    gap: 1rem;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--single {
    grid-template-columns: 1fr;
}

label {
    display: grid;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--muted);
}

input,
select,
textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(12, 92, 171, 0.14);
    padding: 0.9rem 1rem;
    background: white;
    color: var(--text);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.check-inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.check-inline input {
    width: auto;
}

.form-actions,
.row-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-card th,
.table-card td {
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid rgba(15, 54, 99, 0.08);
    text-align: left;
    vertical-align: top;
}

.table-card th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    background: rgba(15, 54, 99, 0.06);
}

.status-pill__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-card {
    width: min(100%, 420px);
    padding: 2rem;
    background: rgba(225, 240, 251, 0.88);
}

.login-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 10px 20px;
    border-radius: 24px;
    margin: 0 auto 1rem;
    background: rgba(13,92,171,0.12);
}

.login-card__logo img {
    width: 200px;
    height: 160px;
    object-fit: contain;
    display: block;
}

.login-card h1,
.login-card p {
    text-align: center;
}

.login-help {
    margin-top: 1.5rem;
    text-align: center;
    line-height: 1.7;
}

.monitor-screen {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 0.75rem;
    gap: 0.6rem;
    background: linear-gradient(180deg, #0b3f8f 0%, #1958a2 35%, #dcecff 100%);
    color: white;
    overflow: hidden;
}

.monitor-screen__header,
.monitor-screen__footer {
    background: rgba(4, 38, 94, 0.88);
    border-radius: 20px;
    padding: 1rem 2rem;
    text-align: center;
}

.monitor-screen__header h1,
.monitor-screen__header h2 {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 2.5rem);
    line-height: 1.3;
}

.monitor-screen__clock {
    font-size: clamp(2rem, 6vw, 7rem);
    font-weight: 800;
    line-height: 1.1;
}

.monitor-screen__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0.5rem;
    overflow: hidden;
    min-height: 0;
}

.monitor-screen__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.2rem 1.8rem;
    background: rgba(245, 250, 255, 0.96);
    color: var(--text);
    border-radius: 20px;
    overflow: hidden;
}

.monitor-screen__card h3 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.2rem, 3.2vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
}

.monitor-screen__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    margin-top: 0.6rem;
    font-size: clamp(0.8rem, 1.9vw, 2.2rem);
    line-height: 1.3;
}

.monitor-screen__meta strong {
    display: block;
    font-size: 0.75em;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
}

.monitor-screen__status {
    margin-top: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    color: var(--status-color, var(--primary));
    border-radius: 16px;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.4vw, 2.8rem);
    letter-spacing: 0.03em;
    background: color-mix(in srgb, var(--status-color, var(--primary)) 12%, white);
    border: 1px solid color-mix(in srgb, var(--status-color, var(--primary)) 28%, white);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.monitor-screen__status-dot {
    width: clamp(10px, 1.2vw, 18px);
    height: clamp(10px, 1.2vw, 18px);
    border-radius: 999px;
    background: var(--status-color, var(--primary));
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color, var(--primary)) 45%, transparent);
    animation: siq-live-pulse 1.6s ease-out infinite;
}

@keyframes siq-live-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.95;
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color, var(--primary)) 42%, transparent);
    }

    70% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 16px color-mix(in srgb, var(--status-color, var(--primary)) 0%, transparent);
    }

    100% {
        transform: scale(0.95);
        opacity: 0.92;
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-color, var(--primary)) 0%, transparent);
    }
}

/* ── Card Stack / Display Modes ────────────────
   Base rules (all modes)                         */
.monitor-screen__card-stack {
    position: relative;
}

.monitor-screen__card-stack.is-empty {
    visibility: hidden;
}

/* ─── GRID mode (default): show first card only ─ */
[data-display-mode="grid"] .monitor-screen__card-stack > .monitor-screen__card:not(:first-child) {
    display: none;
}

/* ─── STACK mode: full-size card rotation ────── */

/* The cards section becomes a single container for stacked cards */
[data-display-mode="stack"] .monitor-screen__cards {
    display: block;
    position: relative;
    overflow: hidden;
}

/* All cards are absolutely positioned, filling the container */
[data-display-mode="stack"] .monitor-screen__card {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    transform: translateY(30px) scale(0.92);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease;
    border-radius: 24px;
    padding: 3rem 3.5rem 3.5rem;
    justify-content: center;
    overflow: hidden;
}

/* Card underneath — visible as a "peek" shadow */
[data-display-mode="stack"] .monitor-screen__card.stack-behind-2 {
    opacity: 0.4;
    z-index: 1;
    transform: scale(0.88) translateY(28px);
}

[data-display-mode="stack"] .monitor-screen__card.stack-behind {
    opacity: 0.7;
    z-index: 2;
    transform: scale(0.94) translateY(14px);
}

/* Active card — front and center */
[data-display-mode="stack"] .monitor-screen__card.stack-active {
    opacity: 1;
    z-index: 3;
    transform: none;
}

/* Leaving card — dramatic fly-out */
[data-display-mode="stack"] .monitor-screen__card.stack-leaving {
    opacity: 0;
    z-index: 4;
    transform: translateX(-110%) rotate(-8deg) scale(0.85);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease;
}

/* Stack mode: larger text to fill the card */
[data-display-mode="stack"] .monitor-screen__card h3 {
    font-size: clamp(2rem, 5vw, 6rem);
    margin-bottom: 0.8rem;
}

[data-display-mode="stack"] .monitor-screen__meta {
    font-size: clamp(1.1rem, 2.8vw, 3.2rem);
    gap: 0.8rem 2.5rem;
    margin-top: 1rem;
}

[data-display-mode="stack"] .monitor-screen__meta strong {
    font-size: 0.75em;
}

[data-display-mode="stack"] .monitor-screen__status {
    font-size: clamp(1.3rem, 3.2vw, 3.8rem);
    padding: 0.8rem 1.8rem;
    margin-top: 1.2rem;
}

/* Progress counter for stack mode */
.stack-counter {
    position: absolute;
    bottom: 1.2rem;
    right: 1.5rem;
    z-index: 10;
    background: rgba(4, 38, 94, 0.75);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-size: clamp(0.8rem, 1.4vw, 1.4rem);
    font-weight: 600;
    backdrop-filter: blur(6px);
}

/* Progress bar at the bottom of the stack */
.stack-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    z-index: 10;
    background: rgba(0, 60, 130, 0.15);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.stack-progress__bar {
    height: 100%;
    background: var(--primary, #0b3f8f);
    border-radius: 0 0 0 24px;
    animation: stack-countdown 8s linear forwards;
}

@keyframes stack-countdown {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ─── TICKER mode: vertical dual-column scroll ── */
[data-display-mode="ticker"] .monitor-screen__cards {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow: hidden;
    align-items: flex-start;
}

/* JS creates these .ticker-col divs */
[data-display-mode="ticker"] .ticker-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

[data-display-mode="ticker"] .ticker-col.col-up {
    animation: siq-ticker-up var(--ticker-dur, 28s) linear infinite;
}

[data-display-mode="ticker"] .ticker-col.col-down {
    animation: siq-ticker-down var(--ticker-dur, 32s) linear infinite;
}

[data-display-mode="ticker"] .ticker-col:hover,
[data-display-mode="ticker"] .ticker-col:focus-within {
    animation-play-state: paused;
}

@keyframes siq-ticker-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

@keyframes siq-ticker-down {
    from { transform: translateY(-50%); }
    to   { transform: translateY(0); }
}

/* Cards inside ticker: override any absolute positioning */
[data-display-mode="ticker"] .monitor-screen__card {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: auto !important;
    flex-shrink: 0;
}

/* ─── FULLCARD mode: one card at a time ──────── */
[data-display-mode="fullcard"] .monitor-screen__cards {
    display: block;
    position: relative;
}

[data-display-mode="fullcard"] .monitor-screen__card {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1;
    opacity: 0 !important;
    transform: translateX(80px) !important;
    transition: opacity 0.7s ease, transform 0.7s ease !important;
    border-radius: 28px !important;
    padding: 3.5rem 4rem !important;
    justify-content: center !important;
}

[data-display-mode="fullcard"] .monitor-screen__card.fc-active {
    opacity: 1 !important;
    transform: none !important;
    z-index: 3;
}

[data-display-mode="fullcard"] .monitor-screen__card h3 {
    font-size: clamp(2.2rem, 5.5vw, 7rem);
    margin-bottom: 1rem;
}

[data-display-mode="fullcard"] .monitor-screen__meta {
    font-size: clamp(1.2rem, 3vw, 3.6rem);
    gap: 1rem 2.5rem;
    margin-top: 1.2rem;
}

[data-display-mode="fullcard"] .monitor-screen__meta strong {
    font-size: 0.75em;
}

[data-display-mode="fullcard"] .monitor-screen__status {
    font-size: clamp(1.4rem, 3.5vw, 4.2rem);
    padding: 1rem 2rem;
    margin-top: 1.6rem;
}

/* Progress indicator dots for fullcard mode */
.fullcard-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 10;
}

.fullcard-dot {
    width: clamp(8px, 1vw, 14px);
    height: clamp(8px, 1vw, 14px);
    border-radius: 50%;
    background: rgba(0, 60, 130, 0.2);
    border: 2px solid rgba(0, 60, 130, 0.4);
    transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.fullcard-dot.fc-dot-active {
    background: var(--primary, #0b3f8f);
    border-color: var(--primary, #0b3f8f);
    transform: scale(1.35);
}

/* ─── Admin: Display-Mode Selector ───────────── */
.display-modes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
}

.display-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 0.4rem 0.65rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface, #fff);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    text-align: center;
    width: 100%;
    color: var(--text);
    font-family: inherit;
}

.display-mode-btn:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 7%, white);
    color: var(--primary);
}

.display-mode-btn.is-active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, white);
    color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.display-mode-btn__icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.display-mode-btn__icon svg {
    width: 100%;
    height: 100%;
}

.display-mode-btn__name {
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.2;
}

.display-mode-btn__desc {
    font-size: 0.7rem;
    opacity: 0.7;
    line-height: 1.3;
    color: var(--muted);
}



.monitor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.monitor-preview iframe {
    width: 100%;
    min-height: 760px;
    border: 0;
    border-radius: 22px;
    background: white;
}

.banner-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.banner-card img {
    display: block;
    width: 100%;
    height: auto;
}

.banner-card video,
.advertisement-preview__media video,
.ad-thumb video {
    display: block;
    width: 100%;
    height: auto;
    background: #031f49;
}

.advertisement-preview {
    display: grid;
    gap: 0.85rem;
}

.advertisement-preview a {
    color: var(--primary);
}

.advertisement-preview-card {
    margin-top: 1rem;
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.advertisement-preview__media {
    background: linear-gradient(180deg, rgba(13,92,171,0.06), rgba(18,163,122,0.06));
}

.module-table-scroll {
    overflow-x: auto;
}

.ad-thumb {
    width: 96px;
    min-width: 96px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
}

.ad-thumb img {
    display: block;
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.ad-thumb video {
    height: 60px;
    object-fit: cover;
}

.text-success {
    color: var(--accent);
    font-weight: 700;
}

.text-danger {
    color: var(--danger);
    font-weight: 700;
}

.monitor-screen__banner {
    background: rgba(255,255,255,0.96);
    min-height: unset;
    max-height: 20vh;
    overflow: hidden;
}

.monitor-screen__banner img,
.monitor-screen__banner video {
    width: 100%;
    height: 20vh;
    object-fit: cover;
}

@media (max-width: 1100px) {
    .monitor-screen__banner {
        max-height: 20vh;
    }

    .monitor-screen__banner img,
    .monitor-screen__banner video {
        height: 20vh;
    }
}

@media (max-width: 1100px) {
    .dashboard-grid,
    .module-grid,
    .monitor-admin-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Keep 2-column meta on the family monitor screen */
    .monitor-screen__meta {
        grid-template-columns: 1fr;
    }

    .monitor-screen .monitor-screen__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero,
    .topbar,
    .monitor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .page-wrap,
    .nav-tabs,
    .topbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .monitor-screen__card {
        padding: 1rem;
    }
}
