﻿/* =====================================================================
   THEME - the one place to change the look of the app.
   Palette follows Microsoft Fluent UI (communication blue + neutrals).
   Everything below the theme block refers to these variables only.
   ===================================================================== */
:root {
    /* Accent: navbar, primary buttons, links, selection, focus. */
    --sos-accent:             #0078d4;
    --sos-accent-hover:       #106ebe;
    --sos-accent-pressed:     #005a9e;
    /* Very light accent used for title bands, hover fills, selected rows. */
    --sos-accent-tint:        #eff6fc;
    --sos-accent-tint-border: #c7e0f4;

    /* Text. */
    --sos-text:               #323130;
    --sos-text-muted:         #605e5c;

    /* Borders and surfaces. */
    --sos-border:             #e1dfdd;   /* hairlines, dividers */
    --sos-border-strong:      #8a8886;   /* input and button outlines */
    --sos-surface-alt:        #f3f2f1;   /* tinted wells, hover, table header */

    /* Shape and depth. */
    --sos-radius:             4px;       /* cards, panels, calendars */
    --sos-radius-sm:          2px;       /* inputs, buttons, chips */
    --sos-shadow:             0 1.6px 3.6px rgba(0, 0, 0, .10), 0 .3px .9px rgba(0, 0, 0, .08);
}

/* =====================================================================
   SOS site styles.  Loaded AFTER bootstrap.min.css so these rules win.

   Layout vocabulary used by the .aspx pages (see SOS/docs/UiLayoutGuide.md):

     .page-header      title row: <h2 class="page-title"> + optional
                       .page-actions (Close / back links) on the right
     .sos-panel        white card that groups one task; first child is
                       <h3 class="sos-panel-title">
     .form-row         one label + one control, label fixed width so all
                       controls in a panel start at the same x
     .form-row.stacked label above the control (long labels, textareas)
     .form-actions     button bar; buttons get consistent spacing
     .toolbar          inline filter bar (a select + a button, etc.)
     .sos-grid         CssClass for every asp:GridView
     .sos-calendar     CssClass for every asp:Calendar
   ===================================================================== */

/* ---------- page frame ---------------------------------------------- */

.body-content {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 24px;
}

@media screen and (min-width: 768px) {
    .body-content {
        padding-left: 0;
        padding-right: 0;
    }
}

.body-content a {
    color: var(--sos-accent);
}

.body-content footer {
    color: var(--sos-text-muted);
    font-size: 0.875rem;
}

/* ---------- navbar: Fluent suite header ------------------------------ */
/* Communication blue bar (Microsoft 365 style), 48px tall, white text with
   subtle translucent hover states. */
.sos-navbar {
    background: var(--sos-accent);
    min-height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: var(--sos-shadow);
}

.sos-navbar .container-fluid {
    min-height: 48px;
    padding-left: 12px;
    padding-right: 12px;
}

.sos-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    height: 48px;
    margin: 0;
    padding: 0 12px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: #ffffff;
    border-radius: var(--sos-radius-sm);
}

.sos-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    color: #ffffff;
    border-radius: var(--sos-radius-sm);
    font-weight: 500;
    transition: background-color .1s ease-in-out;
}

.sos-navbar .navbar-brand:hover,
.sos-navbar .nav-link:hover,
.sos-navbar .nav-link:focus {
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
}

.sos-navbar .nav-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

/* User name sits as plain text between the role switcher and Sign out. */
.sos-navbar > .container-fluid > div > span {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 6px;
    color: rgba(255, 255, 255, .92);
}

/* Role switcher menu: Fluent callout. */
.sos-navbar .dropdown-menu {
    margin-top: 6px;
    padding: 6px 0;
    border: 1px solid var(--sos-border);
    border-radius: var(--sos-radius);
    box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, .13), 0 1.2px 3.6px rgba(0, 0, 0, .11);
}

.sos-navbar .dropdown-header {
    color: var(--sos-text-muted);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sos-navbar .dropdown-item {
    padding: 8px 16px;
    color: var(--sos-text);
}

.sos-navbar .dropdown-item:hover,
.sos-navbar .dropdown-item:focus {
    background: var(--sos-accent-tint);
    color: var(--sos-accent-pressed);
}

/* ---------- page header --------------------------------------------- */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sos-border);
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--sos-text-muted);
    font-size: 0.95rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- panels ---------------------------------------------------- */

/* Fluent-style card: light-blue title band with a communication-blue accent
   edge, subtle elevation shadow. The title's negative side margins pull the
   band flush to the card edges while the body keeps its padding. */
.sos-panel {
    background: #fff;
    border: 1px solid var(--sos-border);
    border-radius: var(--sos-radius);
    padding: 0 18px 18px;
    margin-bottom: 20px;
    box-shadow: var(--sos-shadow);
    overflow: hidden;
}

.sos-panel-title {
    margin: 0 -18px 14px;
    padding: 11px 18px;
    background: var(--sos-accent-tint);
    border-bottom: 1px solid var(--sos-accent-tint-border);
    border-left: 4px solid var(--sos-accent);
    color: var(--sos-text);
    font-size: 1.05rem;
    font-weight: 600;
}

.sos-panel-help {
    margin: -6px 0 12px;
    color: var(--sos-text-muted);
    font-size: 0.9rem;
}

/* ---------- forms ------------------------------------------------------ */

.form-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
}

.form-row.stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.form-row .form-label,
.form-row > label:first-child {
    flex: 0 0 150px;
    max-width: 150px;
    margin: 0;
    font-weight: 500;
    color: var(--sos-text);
    line-height: 1.3;
}

.form-row.stacked .form-label,
.form-row.stacked > label:first-child {
    flex: none;
    max-width: none;
}

.form-row.wide-label .form-label,
.form-row.wide-label > label:first-child {
    flex-basis: 220px;
    max-width: 220px;
}

/* Legacy alias kept for pages that already used it (ManageWorkshop). */
.form-input {
    vertical-align: middle;
}

/* Every text-like input, select and textarea gets a consistent Bootstrap
   look regardless of whether the .aspx set CssClass="form-control".
   Explicit selector list so checkboxes / radios / buttons are untouched. */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input:not([type]),
textarea,
select {
    display: inline-block;
    width: 100%;
    max-width: 280px;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--sos-text);
    background-color: #fff;
    border: 1px solid var(--sos-border-strong);
    border-radius: var(--sos-radius-sm);
    box-sizing: border-box;
    vertical-align: middle;
    transition: border-color .1s ease-in-out, box-shadow .1s ease-in-out;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="date"]:hover,
input:not([type]):hover,
textarea:hover,
select:hover {
    border-color: var(--sos-text);
}

select {
    /* Bootstrap's form-select chevron, so an ASP DropDownList matches. */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23323130' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 10px;
}

select[multiple],
select[size]:not([size="1"]) {
    background-image: none;
    padding-right: 10px;
    min-height: 120px;
}

textarea {
    min-height: 70px;
    max-width: 420px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 0;
    border-color: var(--sos-accent);
    box-shadow: inset 0 0 0 1px var(--sos-accent);
}

input[disabled],
select[disabled],
textarea[disabled] {
    background-color: var(--sos-border);
    color: var(--sos-text-muted);
}

/* Width modifiers for controls that should not be the default width. */
.w-short  { max-width: 120px !important; }
.w-medium { max-width: 200px !important; }
.w-long   { max-width: 420px !important; }
.w-full   { max-width: 100% !important; }

/* Inside a flex .form-row the control should grow up to its max-width. */
.form-row > input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.form-row > select,
.form-row > textarea,
.form-row > span > input,
.form-row > span > select {
    flex: 1 1 auto;
}

/* Checkboxes and radio buttons: asp:CheckBox renders <input> then <label>. */
.form-check-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
    margin: 0 0 0 4px;
    vertical-align: middle;
}

/* Message classes set from code-behind (lblError.CssClass = "error-message" etc.). */
.error-message   { display: block; margin: 8px 0; color: #b02a37; font-weight: 500; }
.warning-message { display: block; margin: 8px 0; color: #997404; font-weight: 500; }
.success-message { display: block; margin: 8px 0; color: #146c43; font-weight: 500; }

/* Inline messages under a form or grid. */
.form-message {
    display: block;
    margin: 8px 0;
    min-height: 1.2em;
}

/* ---------- buttons ---------------------------------------------------- */

/* asp:Button renders <input type="submit">. Give every one the Bootstrap
   .btn geometry so buttons line up with inputs; pages mark the primary
   action with CssClass="btn btn-primary", everything else defaults to an
   outlined secondary look. Anything that already carries .btn keeps its
   Bootstrap colour classes. */
input[type="submit"]:not(.btn),
input[type="button"]:not(.btn),
input[type="reset"]:not(.btn),
button:not(.btn) {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--sos-text);
    background-color: #fff;
    border: 1px solid var(--sos-border-strong);
    border-radius: var(--sos-radius-sm);
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    transition: background-color .12s ease-in-out, border-color .12s ease-in-out;
}

/* Bootstrap .btn keeps its own colours; just match our geometry. */
input.btn,
button.btn {
    padding: 6px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--sos-radius-sm);
    white-space: nowrap;
}

/* Primary action: Fluent accent fill (overrides Bootstrap's blue). */
.btn-primary {
    --bs-btn-bg: var(--sos-accent);
    --bs-btn-border-color: var(--sos-accent);
    --bs-btn-hover-bg: var(--sos-accent-hover);
    --bs-btn-hover-border-color: var(--sos-accent-hover);
    --bs-btn-active-bg: var(--sos-accent-pressed);
    --bs-btn-active-border-color: var(--sos-accent-pressed);
    --bs-btn-disabled-bg: var(--sos-accent);
    --bs-btn-disabled-border-color: var(--sos-accent);
    --bs-btn-focus-shadow-rgb: 0, 120, 212;
}

.btn-outline-secondary {
    --bs-btn-color: var(--sos-text);
    --bs-btn-border-color: var(--sos-border-strong);
    --bs-btn-hover-bg: var(--sos-surface-alt);
    --bs-btn-hover-border-color: var(--sos-text);
    --bs-btn-hover-color: var(--sos-text);
}

input[type="submit"]:not(.btn):hover,
input[type="button"]:not(.btn):hover,
button:not(.btn):hover {
    background-color: var(--sos-surface-alt);
    border-color: var(--sos-text);
}

input[type="submit"]:not(.btn):focus,
input[type="button"]:not(.btn):focus,
button:not(.btn):focus {
    outline: 0;
    box-shadow: 0 0 0 1px var(--sos-accent);
}

input[type="submit"][disabled],
input[type="button"][disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Button bar. */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 6px;
}

.form-actions.indent {
    /* Aligns the buttons under the controls of the .form-row above. */
    padding-left: 160px;
}

.form-actions .spacer {
    flex: 1 1 auto;
}

/* Inline filter bar (select + button on one line, wraps on phones). */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
}

.toolbar label {
    margin: 0;
    font-weight: 500;
}

/* ---------- GridView: Fluent DetailsList ------------------------------ */
/* White header with semibold neutral text and a grey rule, horizontal row
   dividers only, neutral hover, light-blue selection, blue command links. */

table.sos-grid {
    width: 100%;
    margin-bottom: 12px;
    border-collapse: collapse;
    border: 1px solid var(--sos-border) !important;
    border-radius: var(--sos-radius);
    background: #fff;
    font-size: 0.92rem;
    color: var(--sos-text);
}

table.sos-grid th,
table.sos-grid td {
    padding: 8px 12px;
    border: none !important;
    border-bottom: 1px solid var(--sos-border) !important;
    vertical-align: middle;
    text-align: left;
}

table.sos-grid th {
    background: var(--sos-surface-alt);
    color: var(--sos-text);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--sos-border-strong) !important;
}

table.sos-grid th a,
table.sos-grid th a:visited {
    color: var(--sos-text);
    text-decoration: none;
}

table.sos-grid th a:hover {
    color: var(--sos-accent);
    text-decoration: underline;
}

table.sos-grid tbody tr:nth-child(even) td {
    background: #fff;
}

table.sos-grid tbody tr:hover td {
    background: var(--sos-surface-alt);
}

/* Row chosen with the Select command (SelectedRowStyle). */
table.sos-grid tr.sos-grid-selected td,
table.sos-grid tbody tr.sos-grid-selected:hover td {
    background: var(--sos-accent-tint);
    font-weight: 600;
}

table.sos-grid tr.sos-grid-selected td:first-child {
    box-shadow: inset 3px 0 0 var(--sos-accent);
}

/* Select / Edit / Delete command links render as plain <a>. */
table.sos-grid td > a,
table.sos-grid td > input[type="submit"] {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sos-accent);
    border: 1px solid var(--sos-border-strong);
    border-radius: var(--sos-radius-sm);
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
}

table.sos-grid td > a:hover,
table.sos-grid td > input[type="submit"]:hover {
    background: var(--sos-accent-tint);
    border-color: var(--sos-accent);
    color: var(--sos-accent-pressed);
}

/* Checkbox column. */
table.sos-grid td input[type="checkbox"] {
    display: block;
    margin: 0 auto;
}

/* Text boxes and selects inside grid rows should not be full width. */
table.sos-grid td input[type="text"],
table.sos-grid td select {
    min-height: 30px;
    padding: 3px 8px;
    max-width: 100%;
}

/* Pager row (PagerStyle) renders as the last <tr> with a nested table. */
table.sos-grid tr.sos-grid-pager td {
    background: var(--sos-surface-alt);
    padding: 6px 8px;
    border-top: 1px solid var(--sos-border-strong) !important;
    border-bottom: none !important;
}

table.sos-grid tr.sos-grid-pager table {
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 4px 0;
}

table.sos-grid tr.sos-grid-pager table td {
    padding: 0;
    border: none !important;
    background: transparent;
}

table.sos-grid tr.sos-grid-pager a,
table.sos-grid tr.sos-grid-pager span {
    display: inline-block;
    min-width: 30px;
    padding: 4px 6px;
    text-align: center;
    border-radius: var(--sos-radius-sm);
    text-decoration: none;
    color: var(--sos-text);
    border: 1px solid transparent;
    font-weight: 500;
}

table.sos-grid tr.sos-grid-pager a:hover {
    background: var(--sos-accent-tint);
    border-color: var(--sos-accent-tint-border);
    color: var(--sos-accent-pressed);
}

table.sos-grid tr.sos-grid-pager span {
    background: var(--sos-accent);
    color: #fff;
    font-weight: 600;
}

/* EmptyDataText row. */
table.sos-grid tr.sos-grid-empty td {
    background: #fff4ce;
    color: var(--sos-text-muted);
    font-style: italic;
    text-align: center;
    padding: 12px;
}

/* Wide grids scroll inside their column instead of overlapping. */
.grid-scroll {
    overflow-x: auto;
    margin-bottom: 12px;
}

/* ---------- Calendar: Fluent DatePicker ------------------------------- */
/* White header with a semibold month title and blue chevrons, neutral
   day-of-week captions, light-blue selected day, blue-filled today. */

table.sos-calendar {
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid var(--sos-border) !important;
    border-radius: var(--sos-radius);
    background: #fff;
    margin-bottom: 14px;
    width: 100%;
    max-width: 340px;
    font-size: 0.9rem;
    color: var(--sos-text);
    box-shadow: var(--sos-shadow);
}

table.sos-calendar td,
table.sos-calendar th {
    border: none;
    text-align: center;
}

/* Title bar (month name + prev/next) */
table.sos-calendar td.sos-cal-title {
    background: #fff;
    color: var(--sos-text);
    border-bottom: 1px solid var(--sos-border);
    padding: 4px 4px 2px;
}

table.sos-calendar td.sos-cal-title table {
    width: 100%;
}

table.sos-calendar td.sos-cal-title td {
    padding: 6px 8px;
    font-weight: 600;
    color: var(--sos-text);
}

table.sos-calendar td.sos-cal-title a,
table.sos-calendar td.sos-cal-nav a {
    display: inline-block;
    min-width: 28px;
    padding: 2px 6px;
    color: var(--sos-accent) !important;
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--sos-radius-sm);
}

table.sos-calendar td.sos-cal-nav a:hover {
    background: var(--sos-accent-tint);
}

table.sos-calendar th.sos-cal-dayhdr {
    background: #fff;
    color: var(--sos-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 0 4px;
}

/* Day cells: DayStyle / OtherMonthDayStyle / TodayDayStyle / SelectedDayStyle
   each replace the cell's class, so target the day-cell anchors generically
   (the title bar's links live in a nested table and are excluded). */
table.sos-calendar > tbody > tr > td {
    padding: 2px;
}

table.sos-calendar > tbody > tr > td > a {
    display: block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    margin: 0 auto;
    padding: 0;
    border-radius: 50%;
    color: var(--sos-text);
    text-decoration: none;
}

table.sos-calendar > tbody > tr > td > a:hover {
    background: var(--sos-surface-alt);
}

table.sos-calendar td.sos-cal-other a {
    color: var(--sos-text-muted);
}

table.sos-calendar td.sos-cal-weekend a {
    color: var(--sos-text-muted);
}

table.sos-calendar td.sos-cal-today a {
    background: var(--sos-accent) !important;
    color: #fff !important;
    font-weight: 600;
}

table.sos-calendar td.sos-cal-selected,
table.sos-calendar td.sos-cal-selected a {
    background: var(--sos-accent-tint-border) !important;
    color: var(--sos-accent-pressed) !important;
    font-weight: 600;
}

table.sos-calendar td.sos-cal-selected {
    border-radius: 0;
}

/* Week / month selector column (SelectionMode="DayWeek"). */
table.sos-calendar td.sos-cal-selector a {
    color: var(--sos-text-muted);
    font-size: 0.8rem;
}

/* ---------- menu / landing pages -------------------------------------- */

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    padding: 4px 0;
}

.menu-list li a {
    text-decoration: none;
}

.menu-list li a:hover {
    text-decoration: underline;
}

.menu-list small {
    display: block;
    color: var(--sos-text-muted);
}

/* Vertical stack of full-width action buttons on the Teacher/Team menus. */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.menu-buttons input[type="submit"] {
    width: 100%;
    max-width: 320px;
    text-align: left;
}

/* ---------- menu / landing pages: Fluent-style cards ----------------- */
/* Scoped to <div class="row menu-page"> on Admin/Intro, Teacher/Introduction
   and Team/Introduction. Palette follows Microsoft Fluent UI neutrals and
   the default communication blue (var(--sos-accent)). */

.menu-page .sos-panel {
    padding: 0;
    height: calc(100% - 20px);
}

.menu-page .sos-panel-title {
    margin: 0;
    padding: 12px 18px;
}

.menu-page .sos-panel-help {
    margin: 0;
    padding: 10px 18px 0;
    color: var(--sos-text-muted);
}

.menu-page .sos-panel-help + .sos-panel-help,
.menu-page .menu-buttons + .sos-panel-help,
.menu-page .menu-list + .sos-panel-help {
    padding-bottom: 14px;
}

/* Tinted well that holds the buttons / links. */
.menu-page .menu-buttons,
.menu-page .menu-list {
    margin: 12px 18px 16px;
    padding: 12px;
    background: var(--sos-surface-alt);
    border: 1px solid var(--sos-border);
    border-radius: var(--sos-radius);
}

.menu-page .menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Fluent primary button. */
.menu-page .menu-buttons input[type="submit"] {
    width: 100%;
    max-width: none;
    text-align: left;
    padding: 8px 14px;
    color: #ffffff;
    background: var(--sos-accent);
    border: 1px solid var(--sos-accent);
    border-radius: var(--sos-radius-sm);
    font-weight: 600;
    white-space: normal;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.menu-page .menu-buttons input[type="submit"]:hover {
    background: var(--sos-accent-hover);
    border-color: var(--sos-accent-hover);
}

.menu-page .menu-buttons input[type="submit"]:active {
    background: var(--sos-accent-pressed);
    border-color: var(--sos-accent-pressed);
}

.menu-page .menu-buttons input[type="submit"]:focus {
    outline: 0;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sos-accent);
}

.menu-page .menu-buttons input[type="submit"][disabled] {
    background: var(--sos-surface-alt);
    border-color: var(--sos-border);
    color: var(--sos-text-muted);
    box-shadow: none;
    opacity: 1;
}

/* Admin link lists: each link rendered as a Fluent "subtle" button row. */
.menu-page .menu-list li {
    padding: 0;
    margin-bottom: 6px;
}

.menu-page .menu-list li:last-child {
    margin-bottom: 0;
}

.menu-page .menu-list li > a {
    display: block;
    padding: 7px 12px 7px 14px;
    background: #ffffff;
    border: 1px solid var(--sos-border-strong);
    border-left: 3px solid var(--sos-accent);
    border-radius: var(--sos-radius-sm);
    color: var(--sos-text);
    font-weight: 500;
    text-decoration: none;
    transition: background-color .1s ease-in-out;
}

.menu-page .menu-list li > a:hover {
    background: var(--sos-accent-tint);
    border-color: var(--sos-accent);
    color: var(--sos-accent-pressed);
    text-decoration: none;
}

.menu-page .menu-list small {
    padding: 4px 0 0 14px;
}

/* ---------- Student pages ---------------------------------------------- */

/* Workshop TreeView on SOSTime, styled as a Fluent tree. The control emits
   nested tables, so the td rules keep its line images aligned. */
.sos-tree {
    display: block;
    padding: 6px 4px;
    border: 1px solid var(--sos-border);
    border-radius: var(--sos-radius);
    background: #fff;
    font-size: 0.92rem;
}

.sos-tree td {
    height: 24px !important;
    padding: 0 !important;
    border: none !important;
}

.sos-tree table {
    border-collapse: collapse;
}

.sos-tree a.sos-tree-node,
.sos-tree a.sos-tree-hover,
.sos-tree a.sos-tree-selected {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--sos-radius-sm);
    color: var(--sos-text);
    text-decoration: none;
    border: 1px solid transparent;
}

.sos-tree a.sos-tree-hover {
    background: var(--sos-surface-alt);
    text-decoration: none;
}

.sos-tree a.sos-tree-selected {
    background: var(--sos-accent-tint);
    border-color: var(--sos-accent-tint-border);
    color: var(--sos-accent-pressed);
    font-weight: 600;
}

/* Workshop description tooltip. The page script moves each tree node's title
   into a data attribute and shows this panel once the pointer has rested on
   the node, so passing the cursor across the list stays quiet. */
.sos-tip {
    position: absolute;
    z-index: 1080;
    max-width: 320px;
    padding: 8px 10px;
    border: 1px solid var(--sos-border);
    border-radius: var(--sos-radius);
    background: #fff;
    box-shadow: var(--sos-shadow);
    color: var(--sos-text);
    font-size: 0.85rem;
    line-height: 1.35;
    white-space: pre-wrap;
    opacity: 0;
    transition: opacity .12s ease-in;
    pointer-events: none;
}

.sos-tip.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .sos-tip {
        transition: none;
    }
}

/* Hall pass countdown. The page script overrides the colours inline as the
   pass nears expiry; this is only the resting state. */
.hp-countdown {
    display: block;
    margin: 10px auto;
    padding: 6px 16px;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    color: #107c10;
    border-radius: var(--sos-radius-sm);
}

/* Bootstrap .text-primary follows the accent. */
.text-primary {
    color: var(--sos-accent) !important;
}

/* Bootstrap alerts restyled as Fluent message bars. */
.alert {
    border-radius: var(--sos-radius-sm);
    border-width: 1px;
    border-left-width: 4px;
    padding: 10px 14px;
    color: var(--sos-text);
}

.alert-info    { background: var(--sos-accent-tint); border-color: var(--sos-accent-tint-border); border-left-color: var(--sos-accent); }
.alert-success { background: #dff6dd; border-color: #c4e8c2; border-left-color: #107c10; }
.alert-warning { background: #fff4ce; border-color: #f2e2a6; border-left-color: #997404; }
.alert-danger  { background: #fde7e9; border-color: #f7c8cc; border-left-color: #b02a37; }

/* ---------- Hall Pass dashboard tabs (Fluent Pivot) ------------------- */
/* Text tabs on a hairline, active tab gets a 3px accent underline. The
   page script toggles .active / .disabled; keep those class names. */
.hp-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 4px 0 0;
    border-bottom: 1px solid var(--sos-border);
}

.hp-tab {
    position: relative;
    display: inline-block;
    padding: 10px 14px 9px;
    margin-bottom: -1px;
    color: var(--sos-text);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    border-radius: var(--sos-radius-sm) var(--sos-radius-sm) 0 0;
    cursor: pointer;
    transition: background-color .1s ease-in-out, border-color .1s ease-in-out;
}

.hp-tab:hover {
    background: var(--sos-surface-alt);
    color: var(--sos-text);
    text-decoration: none;
}

.hp-tab.active {
    color: var(--sos-accent-pressed);
    font-weight: 600;
    border-bottom-color: var(--sos-accent);
}

.hp-tab.disabled,
.hp-tab.disabled:hover {
    color: var(--sos-text-muted);
    background: transparent;
    cursor: not-allowed;
    opacity: .6;
}

.hp-tab:focus-visible {
    outline: 2px solid var(--sos-accent);
    outline-offset: -2px;
}

/* Close button sits at the right end of the tab strip. */
.hp-close {
    margin-left: auto;
    margin-bottom: 6px;
}

/* Tab content: a panel body without its own title band. */
.hp-tab-content {
    padding: 16px 18px 18px;
    background: #fff;
    border: 1px solid var(--sos-border);
    border-top: none;
    border-radius: 0 0 var(--sos-radius) var(--sos-radius);
    box-shadow: var(--sos-shadow);
}

/* Warning shown when tabs are locked by pending approvals. */
.hp-warning {
    display: none;
    margin: 6px 0 0;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #b02a37;
    background: #fde7e9;
    border: 1px solid #f7c8cc;
    border-left: 4px solid #b02a37;
    border-radius: var(--sos-radius-sm);
}

/* ---------- misc ------------------------------------------------------- */

.back-link {
    font-size: 0.9rem;
}

/* Third-party jQuery UI datepicker popup used on the date-range pages. */
.custom-datepicker {
    background-color: #fff;
    border: 1px solid var(--sos-border-strong);
    border-radius: var(--sos-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    position: absolute;
    z-index: 9999;
}

.date-picker {
    max-width: 140px !important;
}

img.ui-datepicker-trigger {
    width: 18px;
    height: 18px;
    margin-left: 6px;
    vertical-align: middle;
    cursor: pointer;
}
