/* Shared palette for the public portal, school panel and administrator screens. */
.isok-admin-shell { background: var(--isok-bg, #0f172a); color: var(--isok-text, #f1f5f9); }
html[data-isok-theme="dark"] { background: #0f172a; color-scheme: dark; }
html[data-isok-theme="light"] { background: #f3f6fb; }
html[data-isok-theme="light"] .isok-admin-shell {
    --isok-color-scheme: light;
    --isok-bg: #f3f6fb;
    --isok-surface: #fff;
    --isok-surface-soft: #f8fafc;
    --isok-input: #fff;
    --isok-border: #d7e0ec;
    --isok-text: #17263d;
    --isok-muted: #52637b;
    --isok-primary: #2563eb;
    --isok-primary-hover: #1d4ed8;
    --isok-ink: #17263d;
    --isok-ink-soft: #52637b;
    --isok-blue-ink: #1d4ed8;
    --isok-green-ink: #047857;
    --isok-purple-ink: #6d28d9;
    --isok-amber-ink: #92400e;
    --isok-red-ink: #b91c1c;
    --isok-cyan-ink: #0e7490;
    --isok-paper: #fff;
    --isok-paper-soft: #f1f5fa;
    --isok-blue-wash: #eff6ff;
    --isok-green-wash: #ecfdf5;
    --isok-purple-wash: #f5f3ff;
    --isok-amber-wash: #fffbeb;
    --isok-red-wash: #fff1f2;
    --isok-cyan-wash: #ecfeff;
    --isok-shade-soft: #eef3f9;
    --isok-line: var(--isok-border);
    --isok-shadow: #17263d18;
    --stats-bg: var(--isok-bg);
    --stats-surface: var(--isok-surface);
    --stats-border: var(--isok-border);
    --stats-text: var(--isok-text);
    --stats-muted: var(--isok-muted);
    --stats-blue: #2563eb;
    --stats-green: #047857;
    color-scheme: light;
}
.isok-theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--isok-border);
    border-radius: 10px;
    background: var(--isok-surface-soft);
    color: var(--isok-text);
    font-size: 16px;
    cursor: pointer;
}
.isok-theme-toggle[hidden] { display: none; }
.isok-theme-toggle:hover { border-color: var(--isok-primary); color: var(--isok-primary); }
.isok-theme-toggle:focus:not(:focus-visible) { outline: none; }
.isok-theme-toggle:focus-visible { outline: 2px solid var(--isok-primary); outline-offset: 3px; }
.isok-navigation-actions { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 10px; }
.isok-admin-shell .isok-navigation-actions > .isok-rsio-return { display: inline-flex; align-items: center; gap: 10px; padding: 6px 11px 6px 6px; border: 1px solid #60a5fa40; border-radius: 10px; background: linear-gradient(115deg,#3b82f621,#22d3ee12); color: var(--isok-text); font-size: 11px; font-weight: 650; text-decoration: none; }
.isok-admin-shell .isok-navigation-actions > .isok-rsio-return:hover { border-color: var(--isok-primary); }
.isok-public-brand-group { display: flex; align-items: center; gap: 10px; grid-column: 1; grid-row: 1; justify-self: start; }
html[data-isok-theme="light"] .isok-admin-shell .isok-navigation { box-shadow: 0 3px 16px #17263d08; }
html[data-isok-theme="light"] .isok-admin-shell .isok-admin-badge { background: linear-gradient(135deg,#2563eb,#7c3aed); }
html[data-isok-theme="light"] .isok-admin-shell :is(.isok-button-secondary,.isok-button-light,.btn-light,.btn-secondary,.btn-outline-secondary) { color: var(--isok-text); }
html[data-isok-theme="light"] .isok-admin-shell .alert :is(.btn-primary,.btn-success,.btn-danger,.btn-info) { color: #fff; text-decoration: none; }
html[data-isok-theme="light"] .isok-admin-shell :is(.isok-public-skip,.isok-school-skip) { color: #fff; }
.isok-admin-shell button.close:not(:disabled):not(.disabled) { color: var(--isok-ink, #fff); opacity: 1; text-shadow: none; }
html[data-isok-theme] body.isok-admin-shell select.custom-select { background-repeat: no-repeat; background-position: right .75rem center; background-size: 8px 10px; padding-right: 1.75rem; }
html[data-isok-theme="light"] .isok-admin-shell .isok-calendar-app { --cal-school: 37,99,235; --cal-regional: 4,120,87; --cal-province: 161,98,7; --cal-break: 126,34,206; --cal-special: 190,18,60; }
html[data-isok-theme="light"] .isok-admin-shell .stats-stage.is-active .stats-stage-number { color: #fff; }
html[data-isok-theme="light"] .isok-admin-shell .isok-map-host { color: #fff; }
html[data-isok-theme="light"] .isok-admin-shell .table :is(.bg-info,.bg-success,.bg-danger,.bg-warning).text-white { color: var(--isok-text) !important; }
html[data-isok-theme="light"] .isok-admin-shell .ui-datepicker .ui-icon,
html[data-isok-theme="light"] .isok-admin-shell .xdsoft_datetimepicker :is(.xdsoft_prev,.xdsoft_next,.xdsoft_today_button),
html[data-isok-theme="light"] .isok-admin-shell .xdsoft_datetimepicker .xdsoft_label i { filter: none; }
html[data-isok-theme="light"] .isok-admin-shell .custom-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%2352637b' d='M2 0L0 2h4zM2 5L0 3h4z'/%3E%3C/svg%3E"); }
@media (max-width: 500px) {
    .isok-navigation-actions { gap: 7px; }
    .isok-theme-toggle { width: 34px; height: 36px; border-radius: 8px; font-size: 14px; }
    .isok-admin-shell .isok-navigation-actions > .isok-rsio-return { gap: 7px; font-size: 10px; padding-right: 9px; }
    .isok-admin-shell .isok-navigation-actions .isok-rsio-icon { display: none; }
}
@media print {
    html[data-isok-theme] { background: #fff; color-scheme: light; }
    .isok-theme-toggle { display: none !important; }
}

html[data-isok-theme="light"] { color-scheme: light; }
html[data-isok-theme="light"] .isok-admin-shell #isok-toolbox { --bg: #fff; --ink: #17263d; --muted: #52637b; --line: #d7e0ec; --green: #047857; --light-green: #ecfdf5; }
