:root {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #22363a;
    background: #f3f5f3;
    font-synthesis: none;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    background: #f3f5f3;
    font-size: 14px;
    line-height: 1.5;
}

.app-shell,
.main-column,
.content,
.panel,
.dashboard-grid > *,
.academics-grid > *,
.settings-grid > * {
    min-width: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 24px;
}

.page-header h1 {
    margin: 0 0 5px;
    color: #20383d;
    font-size: clamp(25px, 3vw, 31px);
    font-weight: 680;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.page-header p {
    margin: 0;
    color: #768580;
    font-size: 13px;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.button-primary {
    background: #1c5860;
    color: #fff;
}

.button-primary:hover {
    background: #16464d;
}

.button-secondary {
    border-color: #d8e0dc;
    background: #fff;
    color: #425651;
}

.button-secondary:hover {
    background: #f8faf8;
}

.button-danger {
    border-color: #eed2cb;
    background: #fff7f4;
    color: #9a4938;
}

.icon-button {
    min-height: 29px;
    padding: 0 8px;
    border: 1px solid #dce4e0;
    border-radius: 5px;
    background: #fff;
    color: #355e62;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.icon-button.danger-action {
    border-color: #efc7c7;
    background: #fff3f3;
    color: #a33131;
}

.icon-button.success-action {
    border-color: #bfdfc8;
    background: #eff8f1;
    color: #347247;
}

.panel {
    overflow: hidden;
    border: 1px solid #e0e6e2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px #153a3208;
}

.panel-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 19px;
    border-bottom: 1px solid #edf0ee;
}

.panel-heading h2 {
    margin: 0;
    color: #294146;
    font-size: 14px;
    font-weight: 700;
}

.panel-heading p {
    margin: 3px 0 0;
    color: #87938e;
    font-size: 11px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 11px 16px;
    background: #fafbf9;
    color: #8a9690;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-top: 1px solid #eff2ef;
    color: #42524e;
    font-size: 12px;
    vertical-align: middle;
}

tbody tr:hover {
    background: #fbfcfb;
}

.primary-cell {
    color: #253b3f;
    font-weight: 650;
}

.secondary-cell {
    display: block;
    margin-top: 2px;
    color: #87938e;
    font-size: 10px;
    font-weight: 400;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 99px;
    background: #eef7ef;
    color: #3f7650;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-badge.status-muted {
    background: #f1f3f2;
    color: #77837e;
}

.status-badge.status-success {
    background: #eef7ef;
    color: #3f7650;
}

.status-badge.status-warning {
    background: #fff4e1;
    color: #9b702a;
}

.status-badge.status-error {
    background: #fdeeee;
    color: #a33434;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.search-input {
    width: min(100%, 330px);
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #dce4df;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: #294047;
    font-size: 12px;
}

.search-input:focus,
.form-control:focus {
    border-color: #56858a;
    box-shadow: 0 0 0 3px #1c586014;
}

.form-panel {
    margin-bottom: 17px;
    padding: 20px;
}

.form-panel h2 {
    margin: 0 0 4px;
    color: #294146;
    font-size: 15px;
}

.form-panel > p {
    margin: 0 0 16px;
    color: #82908a;
    font-size: 11px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 16px;
}

.form-field {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    color: #52615c;
    font-size: 11px;
    font-weight: 650;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-control {
    width: 100%;
    min-height: 37px;
    padding: 8px 10px;
    border: 1px solid #dce4df;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: #253b40;
    font-size: 12px;
    font-weight: 400;
}

textarea.form-control {
    min-height: 74px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 17px;
}

.message-modal-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgb(14 31 35 / 48%);
}

.message-modal {
    width: min(440px, 100%);
    overflow: hidden;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    background: #fff;
    color: #17353d;
    box-shadow: 0 24px 70px rgb(10 31 35 / 25%);
}

.message-modal header,
.message-modal footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
}

.message-modal header { border-bottom: 1px solid #e4ebe7; }
.message-modal header h2 { margin: 0; font-size: 18px; }
.message-modal-title { display: flex; align-items: center; gap: 10px; }
.notification-success-icon { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: #e7f5eb; color: #23834b; }
.notification-success-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.message-modal > p { margin: 0; padding: 20px 18px; line-height: 1.55; }
.message-modal footer { justify-content: flex-end; border-top: 1px solid #e4ebe7; }
.message-modal-error header h2 { color: #914637; }
.app-notification-action { display: flex; justify-content: flex-start; padding: 0 18px 14px; }
.invitation-guidance { margin: 0 0 12px; color: #687b75; font-size: 13px; }
.invitation-guidance-error { color: #914637; }

@media (max-width: 520px) {
    .message-modal-backdrop { padding: 16px; }
    .message-modal header,
    .message-modal footer { padding: 13px 15px; }
    .message-modal > p { padding: 18px 15px; }
}

/* Responsive foundations shared by the administrator, staff, and family portals. */
img,
video,
canvas,
svg {
    max-width: 100%;
}

.app-shell,
.portal-shell,
.main-column,
.content,
.portal-content,
.auth-shell,
.panel,
.panel-heading,
.form-panel,
.form-grid,
.settings-grid,
.dashboard-grid,
.academics-grid {
    min-width: 0;
}

.table-wrap,
.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.message-modal-backdrop {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    overflow-y: auto;
}

.message-modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
}

.portal-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.portal-header {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
}

.portal-bottom-nav {
    right: env(safe-area-inset-right);
    left: env(safe-area-inset-left);
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.portal-content > *,
.content > * {
    min-width: 0;
}

@media (max-width: 800px) {
    .content {
        padding-top: clamp(18px, 3vw, 26px);
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }

    .page-header { gap: 14px; }
    .metric-grid { gap: clamp(9px, 2vw, 14px); }
    .panel-heading { gap: 10px; }
    .form-panel { padding: clamp(15px, 3vw, 20px); }
}

@media (max-width: 640px) {
    .button,
    .icon-button,
    .form-control,
    .search-input,
    .status-select,
    .note-input {
        min-height: 44px;
    }

    .button { padding-right: 13px; padding-left: 13px; }
    .icon-button { padding-right: 10px; padding-left: 10px; }
    .form-control,
    .search-input,
    .status-select,
    .note-input { font-size: 16px; }

    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid > *,
    .form-field,
    .form-control { min-width: 0; }
    .form-actions { flex-wrap: wrap; }
    .form-actions .button { flex: 1 1 150px; }
    .toolbar,
    .toolbar-inline { width: 100%; min-width: 0; }
    .toolbar-inline .search-input { min-width: 0; }
    .row-actions { flex-wrap: wrap; white-space: normal; }

    .message-modal-backdrop { place-items: safe center; }
    .message-modal { width: min(100%, 440px); border-radius: 13px; }
    .message-modal header h2 { font-size: 17px; }

    .portal-content { padding-top: 18px; padding-right: max(14px, env(safe-area-inset-right)); padding-left: max(14px, env(safe-area-inset-left)); }
    .chat-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .chat-thread-panel { min-height: min(68dvh, 580px); }
    .chat-messages { max-height: 46dvh; min-height: 200px; padding: 12px; }
    .chat-compose { padding: 10px; }
}

.migration-panel { margin-bottom: 16px; }
.migration-panel .panel-header { display: flex; justify-content: space-between; gap: 12px; padding: 17px 19px; border-bottom: 1px solid #edf0ee; }
.migration-panel .panel-header h2 { margin: 0; color: #294146; font-size: 15px; }
.migration-panel .panel-header p { margin: 4px 0 0; color: #748680; font-size: 12px; }
.migration-panel .panel-body { display: grid; gap: 16px; padding: 18px; min-width: 0; }
.migration-map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.migration-map-grid small { color: #71817a; font-weight: 400; overflow-wrap: anywhere; }
.migration-template, .migration-safety-note { padding: 12px 14px; border: 1px solid #dce9e4; border-radius: 8px; background: #f6faf8; color: #53665f; font-size: 12px; }
.migration-template { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.migration-template p { margin: 0; }
.migration-file-name { margin: -6px 0 0; color: #52635e; font-size: 12px; }
.required-indicator { margin-left: 6px; color: #75847e; font-size: 10px; font-weight: 500; }
.migration-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.migration-summary span { padding: 9px 12px; border: 1px solid #e0e8e4; border-radius: 7px; background: #f8faf9; color: #52635e; font-size: 12px; }
.migration-error-count { color: #a8442c !important; border-color: #f0d2c9 !important; background: #fff8f6 !important; }
.migration-panel .alert { padding: 11px 13px; border-radius: 7px; font-size: 12px; }
.migration-panel .alert-warning { border: 1px solid #f0d9ad; background: #fff9ee; color: #815414; }
.migration-panel .alert-success { border: 1px solid #c9e5d2; background: #f1faf4; color: #286b3d; }
@media (max-width: 760px) {
    .migration-map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .migration-template { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
    .migration-map-grid { grid-template-columns: 1fr; }
    .migration-panel .panel-body { padding: 14px; }
    .migration-panel .panel-header { padding: 14px; }
}

/* Shared searchable, filterable data grid used by portal list tables. */
.portal-list-grid { min-width: 0; }
.portal-list-grid-toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) repeat(auto-fit, minmax(150px, 190px)); gap: 10px; align-items: end; padding: 13px 18px; border-bottom: 1px solid #edf0ee; }
.portal-list-grid > .portal-list-grid-toolbar, .portal-list-grid > .portal-list-grid-summary, .portal-list-grid > .portal-list-grid-pagination { grid-column: 1 / -1; }
.portal-list-grid.backup-list { grid-template-columns: minmax(0, 1fr); }
.portal-list-grid-field { display: grid; min-width: 0; gap: 4px; color: #687a74; font-size: 10px; font-weight: 700; }
.portal-list-grid-field input, .portal-list-grid-field select { min-width: 0; width: 100%; }
.portal-list-grid-clear { min-height: 38px; white-space: nowrap; }
.portal-list-grid-summary, .portal-list-grid-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; color: #82908a; font-size: 11px; }
.portal-list-grid-pagination { border-top: 1px solid #edf0ee; }
.portal-list-grid-summary[hidden], .portal-list-grid-pagination[hidden] { display: none; }
/* Server-rendered pager (Parents, Students). */
.pagination-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; color: #82908a; font-size: 11px; }
.pagination-controls label { display: flex; align-items: center; gap: 7px; margin-right: auto; }
.pagination-controls select { min-height: 34px; width: 74px; padding: 0 8px; border: 1px solid #dbe2df; border-radius: 8px; background: #fff; font: inherit; }
.pagination-controls button { min-height: 34px; }
.panel > .pagination-controls { padding: 10px 18px; border-top: 1px solid #edf0ee; }
.portal-list-grid-pages { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.portal-list-grid-pages button, .portal-list-grid-pages select { min-height: 34px; }
.portal-list-grid-pages select { width: 74px; }
.portal-list-grid-sort { display: inline-flex; gap: 5px; align-items: center; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.portal-list-grid-sort:hover { color: #315b5f; }
.portal-list-grid-sort span { color: #315b5f; }
.portal-list-grid table tr[hidden] { display: none !important; }
.portal-list-grid-empty { padding: 24px !important; color: #82908a; text-align: center; }
@media (max-width: 700px) {
    .portal-list-grid-toolbar { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
    .portal-list-grid-summary, .portal-list-grid-pagination { align-items: stretch; flex-direction: column; padding: 10px 14px; }
    .portal-list-grid-pages { justify-content: space-between; }
    .portal-list-grid-pages button { flex: 1 1 80px; }
}

@media (max-width: 480px) {
    .page-header { margin-bottom: 17px; }
    .page-header h1 { font-size: clamp(23px, 7vw, 29px); }
    .panel { border-radius: 9px; }
    .panel-heading { padding: 13px; }
    .panel-heading .button { width: 100%; }
    .form-panel { padding: 14px; }

    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { min-width: 0; padding: 12px; }
    .metric-value { font-size: clamp(20px, 7vw, 25px); }
    .dashboard-panel { padding: 14px; }

    .attendance-controls { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
    .attendance-totals { grid-column: auto; }
    .attendance-controls .form-field { min-width: 0; }
    .status-select,
    .note-input,
    .attendance-figure .button { width: 100%; max-width: none; }
    .welcome-panel { align-items: flex-start; padding: 14px; }
    .welcome-panel > div { min-width: 0; flex: 1 1 calc(100% - 54px); }
    .welcome-panel .button { width: 100%; margin: 0; }

    table { min-width: 560px; }
    .students-table,
    .attendance-table,
    .gradebook-table { min-width: 0; }
    .students-table tbody tr,
    .attendance-table tbody tr,
    .gradebook-table tbody tr { grid-template-columns: minmax(0, 1fr); }
    .students-table td,
    .attendance-table td,
    .gradebook-table td { grid-column: 1 / -1; }
    .row-actions .button,
    .row-actions .icon-button { flex: 1 1 auto; }

    .portal-child-heading { gap: 10px; }
    .portal-record-card { grid-template-columns: minmax(0, 1fr); }
    .portal-score { justify-self: start; }
    .portal-chat-link { width: calc(100% - 56px); margin-left: 56px; }
    .portal-tabs { top: 0; }
    .chat-message { max-width: 92%; }
    .chat-compose-footer .button { min-width: 125px; }
    .backup-content { padding: 14px; }
    .backup-content code { max-width: 100%; overflow-wrap: anywhere; }
    .backup-list { padding-right: 14px; padding-left: 14px; }

    .app-footer { line-height: 1.7; }
}

@media (max-height: 620px) and (orientation: landscape) {
    .portal-header { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.empty-state {
    padding: 30px 20px;
    color: #82908a;
    text-align: center;
    font-size: 12px;
}

.empty-state strong {
    display: block;
    margin-bottom: 4px;
    color: #3f5552;
    font-size: 13px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 19px;
}

.metric-card {
    padding: 17px 18px;
    border: 1px solid #e0e6e2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px #153a3208;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-label {
    color: #7e8b86;
    font-size: 11px;
    font-weight: 600;
}

.metric-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: #eff5f0;
    color: #497a58;
    font-size: 15px;
    font-weight: 700;
}

.metric-value {
    margin: 9px 0 1px;
    color: #203a3e;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.2;
}

.metric-foot {
    color: #99a29e;
    font-size: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .9fr);
    gap: 16px;
}

.dashboard-panel {
    padding: 19px;
}

.dashboard-panel h2 {
    margin: 0 0 4px;
    color: #294146;
    font-size: 14px;
}

.dashboard-panel > p {
    margin: 0 0 17px;
    color: #87938e;
    font-size: 11px;
}

.quick-links {
    display: grid;
    gap: 8px;
}

.quick-link {
    display: flex;
    min-height: 51px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e6ebe7;
    border-radius: 8px;
    color: #30494b;
    text-decoration: none;
}

.quick-link:hover {
    border-color: #c8d9d2;
    background: #f8fbf8;
}

.quick-link-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 8px;
    background: #f2f6ed;
    color: #59835c;
    font-weight: 700;
}

.quick-link-copy strong {
    display: block;
    font-size: 11px;
}

.quick-link-copy {
    min-width: 0;
}

.quick-link-copy small {
    color: #8b9892;
    font-size: 10px;
}

.quick-link-arrow {
    margin-left: auto;
    color: #97a49e;
}

@media (max-width: 1040px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 24px clamp(16px, 4vw, 24px) 30px;
    }

    .topbar {
        padding-right: clamp(16px, 4vw, 24px);
        padding-left: clamp(16px, 4vw, 24px);
    }
}

@media (max-width: 520px) {
    .page-header {
        flex-direction: column;
    }

    .page-header > .button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: stretch;
        padding: 14px;
    }

    .panel-heading .search-input {
        width: 100%;
        max-width: none;
    }

    .toolbar,
    .toolbar-inline {
        flex-wrap: wrap;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 6px 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .topbar-meta {
        flex-wrap: wrap;
    }

    table {
        min-width: 600px;
    }

    .attendance-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .attendance-totals {
        grid-column: auto;
    }

    .attendance-figure {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-figure .button {
        width: 100%;
    }

    .form-panel {
        padding: 16px;
    }

    .form-field.full {
        grid-column: auto;
    }

    .metric-grid {
        gap: 9px;
    }

    .metric-card {
        padding: 13px;
    }

    .metric-value {
        font-size: 23px;
    }
}

/* Mobile-first family portal and touch workflows. */
.portal-shell {
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.portal-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px clamp(14px, 4vw, 32px);
    border-bottom: 1px solid #e2e7e4;
    background: #fff;
}

.portal-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: #20383d;
    text-decoration: none;
}

.portal-brand img,
.portal-brand .brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    object-fit: contain;
}

.portal-brand > span:last-child { display: grid; min-width: 0; }
.portal-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.portal-brand small { color: #82908a; font-size: 10px; }

.portal-content {
    width: min(100%, 880px);
    margin: 0 auto;
    padding: 24px clamp(14px, 4vw, 28px) 90px;
}

.portal-content .page-header { margin-bottom: 18px; }
.portal-content .page-header p:not(.eyebrow) { font-size: 13px; }

.portal-learner-list,
.portal-card-list,
.portal-record-list { display: grid; gap: 12px; }
.portal-announcements { display: grid; gap: 12px; margin-top: 28px; }
.portal-announcements .page-header { margin: 0; }
.portal-announcements .page-header h2 { margin: 0; color: #294146; font-size: 17px; }
.announcement-card { padding: 16px; }
.announcement-card h2 { margin: 0 0 7px; color: #294146; font-size: 14px; }
.announcement-card .eyebrow { margin: 0 0 5px; color: #52805d; font-size: 10px; font-weight: 700; }
.announcement-body { margin: 0; color: #62716b; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-card .form-actions { margin-top: 12px; }

.portal-learner-card {
    display: flex;
    min-height: 84px;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid #e0e6e2;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 3px 12px #153a3208;
}

.portal-learner-card:active { transform: scale(.99); }
.portal-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 50%; background: #e6f0e8; color: #2d6a4d; font-size: 15px; font-weight: 750; }
.portal-learner-copy { display: grid; min-width: 0; gap: 2px; }
.portal-learner-copy strong { color: #243d40; font-size: 14px; }
.portal-learner-copy small { color: #7d8a85; font-size: 11px; }
.portal-card-arrow { margin-left: auto; color: #86948e; font-size: 24px; }

.portal-child-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.portal-child-heading h1 { margin: 0; color: #20383d; font-size: clamp(22px, 6vw, 30px); }
.portal-child-heading p { margin: 3px 0 0; color: #7d8a85; font-size: 11px; }
.portal-child-heading .eyebrow { margin: 0; color: #52805d; font-weight: 750; letter-spacing: .07em; }
.portal-back { display: inline-flex; min-height: 42px; align-items: center; margin: -7px 0 10px; color: #2c6564; font-size: 12px; font-weight: 650; text-decoration: none; }

.portal-tabs { position: sticky; z-index: 5; top: 64px; display: flex; gap: 5px; overflow-x: auto; margin: 0 -14px 15px; padding: 8px 14px; border-bottom: 1px solid #e2e7e4; background: #f3f5f3; scrollbar-width: none; }
.portal-tabs::-webkit-scrollbar { display: none; }
.portal-tabs button { min-height: 42px; flex: 0 0 auto; padding: 0 13px; border: 1px solid #e0e6e2; border-radius: 9px; background: #fff; color: #5e716c; font: inherit; font-size: 11px; font-weight: 650; }
.portal-tabs button.active { border-color: #1c5860; background: #1c5860; color: white; }
.portal-record-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 16px; }
.portal-record-card h2 { margin: 0 0 3px; color: #294146; font-size: 14px; }
.portal-record-card p { margin: 0; color: #74827d; font-size: 12px; }
.portal-record-card .eyebrow { margin-bottom: 5px; color: #52805d; font-size: 10px; font-weight: 700; }
.portal-score { align-self: center; color: #2c684d; font-size: 18px; white-space: nowrap; }
.portal-score small { color: #81908a; font-size: 11px; font-weight: 500; }
.portal-record-note { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid #edf0ee; }
.portal-list-row { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid #edf0ee; }
.portal-list-row > div { display: grid; min-width: 0; gap: 2px; }
.portal-list-row strong { color: #2e4547; font-size: 12px; }
.portal-list-row small { color: #85918c; font-size: 10px; }
.portal-balance { display: grid; flex: 0 0 auto; color: #355f4b; font-size: 12px; font-weight: 700; text-align: right; }
.portal-balance small { color: #87928d; font-size: 9px; font-weight: 500; }
.portal-chat-link { margin-left: auto; white-space: nowrap; }
.chat-layout { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.5fr); gap: 16px; align-items: stretch; }
.chat-teacher-panel, .chat-thread-panel { min-width: 0; overflow: hidden; }
.colleague-chat-start { display: grid; gap: 10px; padding: 14px; }
.colleague-chat-start .form-field { margin: 0; }
.colleague-chat-inbox-heading { border-top: 1px solid #edf0ee; }
.teacher-directory-panel, .pinned-chat-panel { margin-bottom: 18px; }
.teacher-chat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; padding: 16px; }
.teacher-chat-card { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 12px; border: 1px solid #e4ebe7; border-radius: 11px; background: #fff; }
.teacher-chat-person, .pinned-chat-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.teacher-chat-person strong, .pinned-chat-copy strong { overflow: hidden; color: #294146; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-chat-person small, .pinned-chat-copy small { color: #82908a; font-size: 11px; }
.teacher-chat-card .button { flex: 0 0 auto; }
.pinned-chat-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; }
.pinned-chat-item { display: flex; min-width: min(100%, 260px); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e3eae6; border-radius: 10px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.pinned-chat-item:hover { border-color: #a9c6bb; background: #f6faf7; }
.pinned-chat-open { color: #1d5b61; font-size: 12px; font-weight: 700; }
.chat-modal-backdrop { position: fixed; z-index: 1250; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(14 31 35 / 52%); }
.chat-modal { display: flex; width: min(720px, 100%); max-height: min(760px, calc(100dvh - 40px)); min-height: 420px; flex-direction: column; overflow: hidden; border: 1px solid #d8e2dd; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgb(10 31 35 / 25%); }
.chat-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #e4ebe7; }
.chat-modal-header .eyebrow { margin: 0 0 4px; }
.chat-modal-header h2 { margin: 0; color: #294146; font-size: 18px; }
.chat-modal-actions { display: flex; align-items: center; gap: 9px; }
.chat-modal-close { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #dce5e0; border-radius: 9px; background: #fff; color: #294146; font-size: 25px; cursor: pointer; }
.chat-modal .chat-messages { max-height: none; }
.chat-person { display: flex; width: 100%; min-height: 68px; align-items: center; gap: 11px; padding: 10px 14px; border: 0; border-top: 1px solid #edf0ee; background: #fff; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.chat-person:hover, .chat-person.selected { background: #f1f7f4; }
.chat-person > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.chat-person strong { overflow: hidden; color: #294146; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-person small { color: #82908a; font-size: 10px; }
.chat-unread { width: 9px; height: 9px; flex: 0 0 9px; margin-left: auto; border-radius: 50%; background: #2d9b62; }
.chat-thread-panel { display: flex; min-height: 520px; flex-direction: column; }
.chat-thread-panel > .panel-heading { flex: 0 0 auto; }
.chat-messages { display: flex; min-height: 280px; max-height: 55vh; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; background: #f7f9f7; }
.chat-message { max-width: min(82%, 560px); padding: 10px 13px; border: 1px solid #e4eae6; border-radius: 14px; background: #fff; }
.chat-message.mine { align-self: flex-end; border-color: #d4e9db; background: #eaf5ed; }
.chat-message.theirs { align-self: flex-start; }
.chat-message p { margin: 0; color: #314747; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message small { display: block; margin-top: 5px; color: #82908a; font-size: 9px; }
.chat-compose { display: grid; gap: 7px; padding: 12px; border-top: 1px solid #e8eeea; }
.chat-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-compose-footer small { color: #82908a; }
@media (max-width: 760px) { .chat-layout { grid-template-columns: 1fr; } .chat-thread-panel { min-height: 430px; } .portal-child-heading { flex-wrap: wrap; } .portal-chat-link { margin-left: 59px; } .chat-modal-backdrop { padding: 10px; } .chat-modal { max-height: calc(100dvh - 20px); min-height: min(520px, calc(100dvh - 20px)); } .chat-modal-header { align-items: flex-start; padding: 13px; } .chat-modal-actions { gap: 6px; } }
.portal-bottom-nav { position: fixed; z-index: 12; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #dfe6e1; background: #fff; box-shadow: 0 -5px 18px #17353d0a; }
.portal-bottom-nav a { display: grid; min-width: 110px; min-height: 48px; place-items: center; gap: 1px; border-radius: 10px; color: #28636a; font-size: 10px; font-weight: 700; text-decoration: none; }
.portal-bottom-nav a span { font-size: 17px; }
.portal-bottom-nav a.active { background: #eaf4f1; color: #174e55; box-shadow: inset 0 -3px #e6b566; }

@media (max-width: 640px) {
    .button, .icon-button, .form-control, .search-input { min-height: 44px; }
    .icon-button { padding: 0 10px; }
    .form-control, .search-input { font-size: 16px; }
    .content { padding-top: 18px; }
    .page-header { gap: 12px; }
    .page-header p { max-width: 38ch; }
    .panel-heading .button { width: 100%; }
    .students-table, .attendance-table, .gradebook-table { display: block; width: 100%; min-width: 0; }
    .students-table thead, .attendance-table thead, .gradebook-table thead { display: none; }
    .students-table tbody, .attendance-table tbody, .gradebook-table tbody { display: grid; gap: 10px; padding: 10px; }
    .students-table tbody tr, .attendance-table tbody tr, .gradebook-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 13px; border: 1px solid #e5ebe7; border-radius: 10px; background: #fff; }
    .students-table td, .attendance-table td, .gradebook-table td { display: grid; min-width: 0; gap: 3px; padding: 0; border: 0; font-size: 11px; }
    .students-table td::before, .attendance-table td::before, .gradebook-table td::before { color: #82908a; content: attr(data-label); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    .students-table .student-name-cell, .students-table .row-actions, .attendance-table td:first-child, .gradebook-table td:first-child { grid-column: 1 / -1; }
    .students-table .row-actions { display: flex; flex-wrap: wrap; }
    .attendance-table .form-control, .gradebook-table .form-control { width: 100%; min-width: 0; }
    .attendance-table .note-input, .gradebook-table .note-input { max-width: none; }
    .attendance-table .primary-cell, .gradebook-table .primary-cell { font-size: 13px; }
    .gradebook-table td:nth-child(2) { display: none; }
    .students-table tbody tr:hover, .attendance-table tbody tr:hover, .gradebook-table tbody tr:hover { background: #fff; }
    .portal-tabs { margin-right: -14px; margin-left: -14px; }
}
.toolbar-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guardian-invite-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
}

.guardian-invite-summary p,
.guardian-invitation-result p {
    margin: 4px 0 0;
}

.guardian-invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guardian-select {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--muted, #687b75);
    font-size: 12px;
}

.guardian-invitation-result {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line, #dbe4df);
}

.guardian-invitation-result:last-child { border-bottom: 0; }
.guardian-invitation-result .form-field { width: 100%; }
.guardian-invitation-result input,
.guardian-invitation-result textarea { width: 100%; }

.guardian-invitation-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
}

.guardian-invitation-heading span {
    color: var(--muted, #687b75);
    font-size: 13px;
}

@media (max-width: 620px) {
    .guardian-invite-actions,
    .guardian-invite-actions .button { width: 100%; }
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.class-section {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    margin-left: 5px;
    border-radius: 6px;
    background: #f1f5f1;
    color: #50765a;
    font-size: 10px;
}

.attendance-controls {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(170px, 220px) minmax(130px, auto);
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
    padding: 17px 18px;
}

.attendance-controls .form-field {
    margin: 0;
}

.attendance-totals {
    display: grid;
    gap: 2px;
    padding: 0 4px 6px;
    color: #89958f;
    font-size: 10px;
}

.attendance-totals strong {
    color: #345d4a;
    font-size: 19px;
    line-height: 1.2;
}

.status-select {
    width: 125px;
}

.note-input {
    width: min(100%, 220px);
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #dce4df;
    border-radius: 5px;
    outline: none;
    font-size: 11px;
}

.note-input:focus {
    border-color: #56858a;
    box-shadow: 0 0 0 3px #1c586014;
}

.attendance-figure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 15px;
}

.attendance-figure strong {
    display: block;
    color: #2d6547;
    font-size: 34px;
    line-height: 1.1;
}

.attendance-figure span,
.small-muted {
    color: #84918b;
    font-size: 11px;
}

.progress-track {
    overflow: hidden;
    height: 9px;
    border-radius: 10px;
    background: #e8eee9;
}

.progress-value {
    height: 100%;
    border-radius: inherit;
    background: #5a9a6a;
}

.small-muted {
    margin: 9px 0 0;
}

.welcome-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 17px;
    padding: 16px 18px;
}

.welcome-mark {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: #f6f0e5;
    color: #986d2f;
    font-weight: 800;
}

.welcome-panel h2 {
    margin: 0 0 3px;
    color: #294146;
    font-size: 13px;
}

.welcome-panel p {
    margin: 0;
    color: #7f8c86;
    font-size: 11px;
}

.welcome-panel .button {
    margin-left: auto;
    flex: 0 0 auto;
}

.academics-grid {
    display: grid;
    grid-template-columns: minmax(230px, .7fr) minmax(0, 1.5fr);
    align-items: start;
    gap: 15px;
    margin-bottom: 16px;
}

.subject-form {
    display: flex;
    gap: 8px;
    padding: 15px;
    border-bottom: 1px solid #edf0ee;
}

.subject-form .form-control {
    min-width: 0;
}

.subject-list {
    display: grid;
    gap: 1px;
    margin: 0;
    padding: 8px 15px 13px;
    list-style: none;
}

.subject-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    color: #455753;
    font-size: 12px;
}

.subject-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #79a37d;
}

.exam-form {
    padding: 16px;
    border-bottom: 1px solid #edf0ee;
    background: #fbfcfa;
}

.selected-row {
    background: #f4f8f4;
}

.marks-panel {
    margin-top: 15px;
}

.score-input {
    width: 110px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.settings-grid .form-panel {
    margin-bottom: 0;
}

.settings-grid .form-grid {
    align-items: end;
}

.settings-current {
    grid-column: 1 / -1;
    margin: 0;
}

.settings-years,
.backup-panel {
    margin-bottom: 15px;
}

.backup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 19px;
}

.backup-content strong,
.backup-content code {
    display: block;
}

.backup-content strong,
.backup-list > strong {
    color: #40534e;
    font-size: 11px;
}

.backup-content code {
    margin-top: 4px;
    color: #3c6c5a;
    font-size: 11px;
}

.backup-list {
    display: grid;
    gap: 5px;
    padding: 0 19px 16px;
    color: #8a9690;
    font-size: 10px;
}

.backup-list > strong {
    margin-bottom: 2px;
}

@media (max-width: 900px) {
    .academics-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .toolbar-inline {
        width: 100%;
    }

    .toolbar-inline .search-input {
        flex: 1;
        min-width: 0;
    }

    .attendance-controls {
        grid-template-columns: 1fr 1fr;
    }

    .attendance-totals {
        grid-column: 1 / -1;
    }

    .welcome-panel {
        flex-wrap: wrap;
    }

    .welcome-panel .button {
        margin-left: 50px;
    }

    .backup-content {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* Authentication screens */
.auth-shell { width: 100%; min-height: 100vh; min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: clamp(14px, 2.7vh, 22px); padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: #f4f7f7; }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #20383d; text-decoration: none; }
.auth-brand .brand-mark { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 12px; background: #edb85e; color: #17353d; font-size: 19px; font-weight: 850; }
.auth-brand .brand-logo { width: 48px; height: 48px; flex: 0 0 48px; }
.auth-brand .brand-copy { display: grid; gap: 1px; line-height: 1.2; }
.auth-brand .brand-copy strong { font-size: 17px; font-weight: 750; }
.auth-brand .brand-copy small { color: #71817c; font-size: 12px; }
.auth-card { width: min(100%, 440px); min-width: 0; flex: 0 1 440px; padding: clamp(20px, 5vw, 32px); border: 1px solid #e3e8e8; border-radius: 14px; background: white; box-shadow: 0 16px 44px #152d3510; }
.auth-card h1 { margin: 0 0 8px; font-size: clamp(23px, 5vw, 26px); }
.auth-card .login-title { text-align: center; }
.auth-card .login-subtitle { text-align: center; }
.auth-card > p { margin: 0 0 24px; color: #68787b; }
.auth-card form { display: grid; gap: 16px; min-width: 0; }
.auth-card .form-control { min-height: 48px; font-size: 16px; }
.login-challenge { min-width: 0; margin: 0; padding: clamp(12px, 3vw, 16px); border: 1px solid #d8e2e2; border-radius: 10px; background: #f7faf9; }
.login-challenge legend { padding: 0 6px; color: #31565b; font-weight: 700; }
.login-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.auth-submit { width: 100%; min-height: 46px; justify-content: center; margin-top: 4px; }
.public-entry-links { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.public-entry-links .button { flex: 0 1 auto; }
.auth-shell > .auth-footnote { max-width: 100%; margin: 0; color: #758487; font-size: 13px; text-align: center; text-wrap: pretty; }
.auth-shell:not(:has(.public-page-wrap)) > .auth-brand { max-width: 100%; }
.auth-shell:not(:has(.public-page-wrap)) > .auth-card { width: min(100%, 440px); }
@media (max-width: 560px) {
    .auth-shell:not(:has(.public-page-wrap)) { gap: 16px; padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card { padding: clamp(18px, 6vw, 26px); border-radius: 13px; }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card > p { margin-bottom: 20px; }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card form { gap: 14px; }
    .auth-shell:not(:has(.public-page-wrap)) .public-entry-links { margin-top: 16px; }
    .auth-shell:not(:has(.public-page-wrap)) .public-entry-links .button { width: 100%; }
}
@media (max-height: 620px) and (orientation: landscape) {
    .auth-shell:not(:has(.public-page-wrap)) { justify-content: flex-start; gap: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card { padding-block: 18px; }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card form { gap: 10px; }
    .auth-shell:not(:has(.public-page-wrap)) .auth-card > p { margin-bottom: 14px; }
}
.logout-form { display: inline; margin-left: 10px; }
.topbar-meta { display:flex; align-items:center; }
.brand-logo {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
}

.logo-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e7e4;
}

.logo-settings p {
    max-width: 460px;
    margin: 6px 0 12px;
    color: #788681;
    font-size: 12px;
    line-height: 1.5;
}

.logo-preview {
    display: grid;
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed #c7d1cd;
    border-radius: 12px;
    background: #f4f7f5;
    color: #17353d;
    font-size: 24px;
    font-weight: 800;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.logo-remove {
    margin-left: 10px;
}

/* Public partner and product pages */
.auth-shell:has(.public-page-wrap) { align-items: stretch; justify-content: flex-start; padding: 24px clamp(16px, 4vw, 64px); }
.auth-shell:has(.public-page-wrap) > .auth-brand { align-self: flex-start; margin: 0 auto 16px; }
.public-page-wrap { width: min(1320px, 100%); margin: 0 auto; }
.public-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.partner-kicker, .video-side-note > span { color: #71827e; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.public-split-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr); align-items: start; gap: clamp(28px, 5vw, 72px); }
.public-copy-column > .eyebrow { margin: 0 0 10px; color: #ae741d; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.public-copy-column h1 { max-width: 680px; margin: 0 0 12px; color: #17353d; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; line-height: 1.06; }
.public-lead { max-width: 640px; margin: 0 0 22px; color: #68787b; font-size: 16px; line-height: 1.65; }
.partner-steps { display: grid; gap: 12px; margin: 24px 0; }
.partner-steps article, .demo-feature-list article { display: flex; align-items: flex-start; gap: 13px; }
.partner-steps article > span { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 50%; background: #fff2d8; color: #946019; font-size: 11px; font-weight: 800; }
.partner-steps strong, .demo-feature-list strong { color: #20383d; font-size: 13px; }
.partner-steps p, .demo-feature-list p { margin: 3px 0 0; color: #6b7b78; font-size: 12px; line-height: 1.5; }
.partner-guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 2px 0 22px; }
.partner-guide-link { margin: 0; }
.guide-download-link { color: #315b5f; font-size: 11px; font-weight: 700; }
.partner-application-card { margin-top: 6px; padding: 23px; border: 1px solid #e0e8e3; border-radius: 13px; background: #fff; box-shadow: 0 12px 34px #152d3509; }
.partner-application-card h2 { margin: 0 0 5px; font-size: 20px; }
.partner-application-card > p { margin: 0 0 16px; color: #70807c; font-size: 12px; line-height: 1.55; }
.partner-application-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.partner-wide { grid-column: 1 / -1; }
.partner-application-form textarea { resize: vertical; }
.partner-file-input { padding: 8px; }
.field-hint { display: block; color: #758580; font-size: 10px; font-weight: 400; }
.partner-file-list { margin: -5px 0 0; color: #54706a; font-size: 11px; }
.partner-submit { width: 100%; }
.public-video-column { position: sticky; top: 24px; }
.explainer-player { margin: 2px 0 14px; padding: 12px; border: 1px solid #dce5df; border-radius: 15px; background: #fff; box-shadow: 0 20px 55px #17353d12; }
.explainer-video-frame { overflow: hidden; border-radius: 10px; background: #17353d; }
.explainer-video-top { display: flex; align-items: center; gap: 8px; height: 35px; padding: 0 12px; color: #d2dfdb; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.video-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #efbd64; box-shadow: 0 0 10px #efbd6480; }
.explainer-scene { position: relative; height: clamp(310px, 35vw, 430px); overflow: hidden; background: linear-gradient(180deg, #cce8e9 0%, #e5f0dd 74%, #97bb83 74%, #84a96e 100%); }
.scene-sun { position: absolute; top: 26px; right: 38px; width: 46px; height: 46px; border-radius: 50%; background: #ffd37a; box-shadow: 0 0 34px #ffda8b9c; }
.scene-cloud { position: absolute; top: 65px; width: 74px; height: 18px; border-radius: 20px; background: #fffdf3; opacity: .8; }
.scene-cloud::before, .scene-cloud::after { position: absolute; bottom: 4px; width: 30px; height: 25px; border-radius: 50%; background: inherit; content: ""; }
.scene-cloud::before { left: 12px; }.scene-cloud::after { right: 10px; width: 24px; height: 21px; }
.cloud-one { left: 9%; animation: cloud-drift 18s linear infinite; }.cloud-two { top: 112px; left: 57%; transform: scale(.7); animation: cloud-drift 24s linear infinite reverse; }
.scene-school { position: absolute; right: 9%; bottom: 23%; width: 45%; height: 43%; animation: school-arrive 1s ease-out both; }
.school-building { position: absolute; right: 0; bottom: 0; width: 100%; height: 76%; border: 3px solid #fff8e9; border-radius: 5px 5px 0 0; background: #f0bc69; box-shadow: 0 9px 0 #bb8750; }
.school-roof { position: absolute; z-index: 1; top: 0; right: -6%; width: 112%; height: 28%; background: #c66d53; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.school-sign { position: absolute; top: 15%; left: 23%; padding: 3px 8px; border-radius: 3px; background: #fff6de; color: #405f57; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.school-windows { position: absolute; right: 9%; bottom: 14%; left: 9%; display: flex; justify-content: space-between; }
.school-windows i { width: 22px; height: 25px; border: 3px solid #fff5dd; background: #7db8ba; }
.school-door { position: absolute; bottom: 0; left: 43%; width: 20%; height: 38%; border-radius: 9px 9px 0 0; background: #1e6266; }
.cartoon-person { position: absolute; bottom: 22%; width: 58px; height: 128px; animation: person-bob 2.5s ease-in-out infinite; }
.person-agent { left: 17%; animation-delay: -.7s; }.person-school { left: 47%; animation-delay: -1.5s; }
.person-head { position: absolute; top: 2px; left: 10px; width: 40px; height: 42px; border: 2px solid #253c40; border-radius: 47% 48% 45% 45%; background: #d99569; }
.person-head::before, .person-head::after { position: absolute; top: 17px; width: 3px; height: 4px; border-radius: 50%; background: #21363b; content: ""; }
.person-head::before { left: 11px; }.person-head::after { right: 11px; }
.person-hair { position: absolute; top: -4px; left: 1px; width: 35px; height: 16px; border-radius: 16px 16px 5px 5px; background: #42352e; }
.person-smile { position: absolute; bottom: 6px; left: 15px; width: 10px; height: 5px; border-bottom: 2px solid #693f35; border-radius: 50%; }
.person-body { position: absolute; top: 42px; left: 5px; display: grid; width: 50px; height: 50px; place-items: center; border: 2px solid #253c40; border-radius: 14px 14px 5px 5px; background: #1e6870; }
.person-school .person-body { background: #c87256; }.person-badge { color: white; font-size: 6px; font-weight: 900; }
.person-leg { position: absolute; top: 88px; width: 12px; height: 37px; border-radius: 0 0 7px 7px; background: #32444a; }.leg-left { left: 15px; transform: rotate(3deg); }.leg-right { right: 14px; transform: rotate(-3deg); }
.speech-bubble { position: absolute; top: 18%; left: 7%; display: grid; max-width: 54%; gap: 4px; padding: 12px 15px; border: 2px solid #fff; border-radius: 13px 13px 13px 3px; background: #fffdf5; color: #344c4b; box-shadow: 0 5px 16px #27484320; animation: bubble-pop .35s ease-out both; }
.speech-bubble strong { font-size: clamp(13px, 1.7vw, 18px); }.speech-bubble span { color: #697973; font-size: clamp(10px, 1.1vw, 12px); line-height: 1.4; }
.scene-caption { position: absolute; right: 13px; bottom: 12px; left: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; border: 1px solid #ffffff85; border-radius: 8px; background: #163941d9; color: white; }
.scene-caption span { color: #d2dfdb; font-size: 8px; font-weight: 800; letter-spacing: .1em; }.scene-caption strong { font-size: 10px; }
.explainer-controls { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px; color: #d6e1dc; }
.video-control { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 14px; }
.video-control:hover { background: #ffffff18; }.video-timeline { height: 5px; flex: 1; overflow: hidden; border-radius: 8px; background: #526d70; }.video-timeline span { display: block; height: 100%; border-radius: inherit; background: #efbd64; transition: width .3s linear; }
.video-time { color: #e1e8e5; font-variant-numeric: tabular-nums; font-size: 9px; }.video-volume { font-size: 11px; }
.explainer-note { margin: 7px 2px 0; color: #7b8985; font-size: 10px; }
.video-side-note { display: grid; gap: 5px; padding: 14px 4px; }.video-side-note strong { max-width: 420px; color: #36504e; font-size: 14px; line-height: 1.45; }
.demo-feature-list { display: grid; gap: 16px; margin: 24px 0; }
.demo-feature-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: #e7f0eb; color: #1e6266; font-size: 15px; }
.demo-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }.demo-note { margin: 14px 0; color: #7b8985; font-size: 11px; }
.partner-review-list { display: grid; gap: 12px; padding: 16px; }.partner-review-card { padding: 18px; border: 1px solid #e1e8e4; border-radius: 10px; background: #fff; }
.partner-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid #edf0ee; }.partner-review-heading h3 { margin: 0 0 2px; font-size: 16px; }.partner-review-heading span, .partner-review-details span { color: #7b8985; font-size: 10px; }
.partner-review-details { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 14px 0; }.partner-review-details div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }.partner-review-details a, .partner-review-details strong { font-size: 12px; }
.partner-experience > span { color: #71827e; font-size: 9px; font-weight: 800; letter-spacing: .1em; }.partner-experience p { margin: 4px 0 12px; white-space: pre-wrap; font-size: 12px; }
.partner-review-documents { font-size: 12px; }.partner-review-documents ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }.partner-review-documents li { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #e3eae6; border-radius: 6px; }.partner-review-documents li a { max-width: 270px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.partner-review-documents li span { color: #798782; font-size: 9px; }
@keyframes person-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes cloud-drift { from { translate: -12px 0; } to { translate: 24px 0; } }
@keyframes school-arrive { from { opacity: .25; translate: 25px 4px; } to { opacity: 1; translate: 0 0; } }
@keyframes bubble-pop { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
@media (max-width: 900px) { .public-split-layout { grid-template-columns: minmax(0,1fr); }.public-video-column { position: static; grid-row: 1; }.explainer-scene { height: clamp(280px, 58vw, 390px); }.speech-bubble strong { font-size: 18px; }.speech-bubble span { font-size: 12px; } }
@media (max-width: 620px) { .auth-shell:has(.public-page-wrap) { padding: 20px 14px; }.public-page-header { align-items: flex-start; }.partner-kicker { padding-top: 12px; text-align: right; }.public-split-layout { gap: 14px; }.public-video-column { grid-row: 1; }.public-copy-column h1 { font-size: 35px; }.partner-application-card { padding: 16px; }.partner-application-form { grid-template-columns: 1fr; }.partner-wide { grid-column: auto; }.partner-review-heading { flex-direction: column; }.partner-review-details { grid-template-columns: 1fr; gap: 8px; }.explainer-scene { height: 295px; }.scene-school { width: 48%; }.cartoon-person { scale: .83; transform-origin: bottom left; }.person-school { left: 45%; }.video-time { font-size: 8px; } }

@media (max-width: 520px) {
    .logo-settings {
        align-items: flex-start;
    }

    .logo-preview {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }
}

/* Final phone overrides: keep these last so legacy page rules cannot undo them. */
@media (max-width: 800px) {
    .content { padding: clamp(18px, 3vw, 26px) max(14px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
    .topbar { padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
    .app-footer { padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
    .form-panel { padding: clamp(15px, 3vw, 20px); }
}

@media (max-width: 640px) {
    .button, .icon-button, .form-control, .search-input, .status-select, .note-input { min-height: 44px; }
    .form-control, .search-input, .status-select, .note-input { font-size: 16px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid > *, .form-field, .form-control { min-width: 0; }
    .form-actions, .row-actions { flex-wrap: wrap; }
    .form-actions .button { flex: 1 1 150px; }
    .toolbar, .toolbar-inline { width: 100%; min-width: 0; flex-wrap: wrap; }
    .toolbar-inline .search-input { min-width: 0; }
    .message-modal-backdrop { place-items: safe center; overflow-y: auto; }
    .message-modal { width: min(100%, 440px); max-height: calc(100dvh - 24px); overflow-y: auto; border-radius: 13px; }
    .portal-content { padding: 18px max(14px, env(safe-area-inset-right)) 90px max(14px, env(safe-area-inset-left)); }
    .chat-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .chat-thread-panel { min-height: min(68dvh, 580px); }
    .chat-messages { max-height: 46dvh; min-height: 200px; padding: 12px; }
    .chat-compose { padding: 10px; }
}

@media (max-width: 520px) {
    .page-header { flex-direction: column; margin-bottom: 17px; }
    .page-header h1 { font-size: clamp(23px, 7vw, 29px); }
    .page-header > .button, .panel-heading .button { width: 100%; }
    .panel { border-radius: 9px; }
    .panel-heading { align-items: stretch; gap: 10px; padding: 13px; }
    .panel-heading .search-input { width: 100%; max-width: none; }
    .form-panel { padding: 14px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .metric-card { min-width: 0; padding: 12px; }
    .metric-value { font-size: clamp(20px, 7vw, 25px); }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-panel { min-width: 0; padding: 14px; }
    .attendance-controls { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
    .attendance-totals { grid-column: auto; }
    .status-select, .note-input, .attendance-figure .button { width: 100%; max-width: none; }
    .welcome-panel { align-items: flex-start; padding: 14px; }
    .welcome-panel > div { min-width: 0; flex: 1 1 calc(100% - 54px); }
    .welcome-panel .button { width: 100%; margin: 0; }
    table { min-width: 560px; }
    .students-table, .attendance-table, .gradebook-table { min-width: 0; }
    .students-table tbody tr, .attendance-table tbody tr, .gradebook-table tbody tr { grid-template-columns: minmax(0, 1fr); }
    .students-table td, .attendance-table td, .gradebook-table td { grid-column: 1 / -1; }
    .row-actions .button, .row-actions .icon-button { flex: 1 1 auto; }
    .portal-child-heading { gap: 10px; }
    .portal-record-card { grid-template-columns: minmax(0, 1fr); }
    .portal-score { justify-self: start; }
    .portal-chat-link { width: calc(100% - 56px); margin-left: 56px; }
    .portal-tabs { top: 0; }
    .chat-message { max-width: 92%; }
    .chat-compose-footer .button { min-width: 125px; }
    .backup-content { padding: 14px; }
    .backup-content code { max-width: 100%; overflow-wrap: anywhere; }
    .backup-list { padding-right: 14px; padding-left: 14px; }
    .app-footer { line-height: 1.7; }
    .logo-settings { align-items: flex-start; }
    .logo-preview { width: 72px; height: 72px; flex-basis: 72px; }
    .partner-application-form { grid-template-columns: minmax(0, 1fr); }
    .partner-wide { grid-column: auto; }
    .partner-review-details { grid-template-columns: minmax(0, 1fr); }
}

.admin-grid-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 17px 19px 12px; }
.admin-grid-heading h2 { margin: 0; color: #294146; font-size: 16px; }
.admin-grid-heading p { margin: 3px 0 0; color: #82908a; font-size: 11px; }
.admin-grid-total { padding: 5px 9px; border: 1px solid #e2e9e4; border-radius: 999px; background: #f7faf7; color: #60736b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-grid-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, 190px)) auto; align-items: end; gap: 10px; padding: 12px 19px 15px; border-bottom: 1px solid #edf0ee; }
.admin-grid-field { display: grid; min-width: 0; gap: 4px; color: #687a74; font-size: 10px; font-weight: 700; }
.admin-grid-field .form-control { min-width: 0; }
.admin-grid-clear-filters { min-height: 39px; white-space: nowrap; }
.admin-grid-clear-filters:disabled { opacity: .5; cursor: default; }
.admin-grid-summary { padding: 11px 19px; color: #82908a; font-size: 11px; }
.admin-grid-table table { min-width: 720px; }
.admin-grid-table th { padding-top: 9px; padding-bottom: 9px; }
.admin-grid-table td { height: 53px; }
.tenant-school-name { color: #253b3f; font-weight: 650; }
.admin-grid-sort-button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; }
.admin-grid-sort-button:hover { color: #315b5f; }
.admin-grid-sort-button span { color: #315b5f; font-size: 13px; }
.admin-grid-empty { height: 110px !important; color: #82908a; text-align: center; }
.admin-grid-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 19px; border-top: 1px solid #edf0ee; }
.admin-grid-page-size { display: flex; align-items: center; gap: 8px; color: #687a74; font-size: 11px; }
.admin-grid-page-size .form-control { width: 76px; min-height: 36px; padding: 5px 8px; }
.admin-grid-page-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: #71817b; font-size: 11px; }
.admin-grid-page-controls .button { min-height: 36px; }

@media (max-width: 900px) {
    .admin-grid-toolbar { grid-template-columns: minmax(0, 1fr) minmax(150px, .7fr); }
    .admin-grid-search { grid-column: 1 / -1; }
    .admin-grid-clear-filters { align-self: end; }
}

@media (max-width: 640px) {
    .admin-grid-heading { align-items: flex-start; padding: 14px; }
    .admin-grid-toolbar { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
    .admin-grid-search { grid-column: auto; }
    .admin-grid-clear-filters { width: 100%; }
    .admin-grid-summary { padding: 10px 14px; }
    .admin-grid-pagination { align-items: stretch; flex-direction: column; padding: 12px 14px; }
    .admin-grid-page-size { justify-content: space-between; }
    .admin-grid-page-controls { justify-content: space-between; flex-wrap: wrap; }
    .admin-grid-page-controls .button { flex: 1 1 95px; }
}

.billing-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.billing-summary-grid .metric-card { display: grid; align-content: start; gap: 8px; }
.billing-summary-grid .metric-card > span { color: #71817b; font-size: 12px; font-weight: 650; }
.billing-summary-grid .metric-card > strong { color: #173e42; font-size: clamp(22px, 3vw, 30px); }
.billing-summary-grid .metric-card > small { color: #82908a; line-height: 1.5; }
.payment-gateway-panel { padding: clamp(16px, 2vw, 22px); }
.billing-plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.billing-current-plan { padding: clamp(16px, 2vw, 24px); }
.billing-payment-history { padding: 0 0 18px; }
.billing-payment-history > .billing-plan-heading { margin: 0 0 16px; padding: 18px 19px 0; }
.billing-plan-heading h2 { margin: 0; color: #294146; font-size: 18px; }
.billing-plan-heading p { margin: 5px 0 0; color: #82908a; }
.proof-of-payment-panel, .proof-review-panel { padding: clamp(18px, 2.4vw, 28px); }
.proof-upload-form { display: grid; gap: 16px; margin: 18px 0 24px; }
.proof-uploader-name-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.proof-history-table-wrap { margin-top: 20px; }
.proof-review-toolbar { grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)); }
.proof-review-modal { width: min(1100px, calc(100vw - 32px)); max-height: min(92vh, 1000px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 80px rgba(9, 30, 34, .3); }
.proof-preview-backdrop { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(12, 28, 31, .58); }
.proof-preview-modal { width: min(1000px, calc(100vw - 32px)); max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(9, 30, 34, .3); }
.proof-preview-modal > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 18px 22px; border-bottom: 1px solid #e2e9e6; }
.proof-preview-modal > header h2 { margin: 0; overflow-wrap: anywhere; font-size: 18px; }
.proof-preview-close { flex: 0 0 auto; border: 0; background: transparent; color: #536661; font-size: 30px; line-height: 1; cursor: pointer; }
.proof-preview-document { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #f4f7f6; }
.proof-preview-image-wrap { display: grid; max-height: 72vh; place-items: center; overflow: auto; padding: 18px; background: #f4f7f6; }
.proof-preview-image { display: block; max-width: 100%; max-height: 68vh; object-fit: contain; }
.proof-review-modal > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 20px 24px; border-bottom: 1px solid #e2e9e6; }
.proof-review-modal > header h2 { margin: 0; overflow-wrap: anywhere; font-size: 20px; }
.proof-review-modal > header p:last-child { margin: 8px 0 0; color: #6e7f7a; }
.proof-review-actions { display: grid; gap: 14px; padding: 18px 24px 24px; }
.proof-review-actions .form-actions { justify-content: flex-end; }
.proof-review-existing-note { padding: 0 24px 20px; color: #52635e; }
.billing-plan-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.billing-plan-details > div { display: grid; gap: 5px; padding: 14px; border: 1px solid #e5ebe7; border-radius: 10px; background: #f9fbfa; }
.billing-plan-details span { color: #71817b; font-size: 12px; }
.billing-plan-details strong { color: #173e42; font-size: 19px; }
.billing-reminder, .billing-setup-note { margin: 15px 0; padding: 13px 15px; border: 1px solid #dcebe2; border-radius: 9px; background: #f3faf5; color: #315f47; line-height: 1.5; }
.billing-reminder-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(16px, 3vw, 42px); border-bottom: 1px solid #f1dfb5; background: #fff8e9; color: #765411; font-size: 13px; }
.billing-reminder-banner a { flex: 0 0 auto; color: #315b5f; font-weight: 700; text-decoration: underline; }
.billing-reminder-due { border-color: #f2dba9; background: #fff8e9; color: #7b5612; }
.billing-setup-note { border-color: #eadfc8; background: #fffaf0; color: #725c31; }
.billing-editor-row > td { height: auto; padding: 0 !important; background: #f8faf9; }
.billing-editor { display: grid; gap: 18px; padding: 18px; border-top: 1px solid #e4ebe6; }
.billing-editor h3, .billing-exemption h4 { margin: 0; color: #294146; }
.billing-editor .settings-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.billing-editor .form-actions { grid-column: 1 / -1; display: flex; gap: 9px; }
.billing-exemption { display: grid; gap: 10px; padding-top: 15px; border-top: 1px solid #e4ebe6; }
.billing-exemption p { margin: 0; color: #71817b; }
.billing-editor .billing-action-form { grid-template-columns: minmax(0, 1fr); max-width: 760px; align-items: stretch; gap: 14px; }
.billing-action-form .form-actions { justify-content: flex-start; }
.billing-payment-confirm { display: flex; align-items: center; gap: 9px; }
.billing-payment-confirm input { width: auto; }
.billing-required-panel { max-width: 720px; margin: 6vh auto; padding: clamp(22px, 5vw, 42px); }
.billing-required-panel h1 { color: #173e42; }
.billing-required-panel > p:not(.eyebrow) { color: #657871; line-height: 1.7; }
.checkout-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 290px); align-items: start; gap: 18px; max-width: 1040px; margin: 0 auto; }
.checkout-page-heading { max-width: 1040px; margin-inline: auto; }
.checkout-order-card { overflow: hidden; padding: 20px clamp(16px, 2.4vw, 28px); }
.checkout-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #e7ede9; }
.checkout-card-heading .eyebrow { margin-bottom: 7px; }
.checkout-card-heading h2 { margin: 0; color: #294146; font-size: 21px; }
.checkout-card-heading p:last-child { margin: 6px 0 0; color: #71817b; }
.checkout-provider-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #dcebe2; border-radius: 999px; background: #f3faf5; color: #315f47; font-size: 12px; font-weight: 700; }
.checkout-order-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 22px 0; border-bottom: 1px solid #e7ede9; }
.checkout-order-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: #f3c368; color: #173e42; font-size: 17px; font-weight: 850; }
.checkout-order-description { display: grid; gap: 4px; }
.checkout-order-description strong { color: #294146; }
.checkout-order-description span { color: #71817b; font-size: 13px; }
.checkout-item-price { color: #294146; white-space: nowrap; }
.checkout-breakdown { display: grid; gap: 0; margin: 0; }
.checkout-breakdown > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eef1ef; }
.checkout-breakdown dt { color: #71817b; }
.checkout-breakdown dd { margin: 0; color: #294146; text-align: right; }
.checkout-breakdown .checkout-total { align-items: center; padding: 17px 0; border-bottom: 0; }
.checkout-total dt { color: #294146; font-size: 16px; font-weight: 750; }
.checkout-total dd { color: #173e42; font-size: 24px; font-weight: 800; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 7px; }
.checkout-pay-button { flex: 1 1 260px; min-height: 48px; }
.checkout-security-note { display: flex; align-items: flex-start; gap: 8px; margin: 15px 0 0; color: #71817b; font-size: 12px; line-height: 1.55; }
.checkout-security-note span { flex: 0 0 auto; }
.checkout-help-card { display: grid; gap: 9px; padding: 20px; border: 1px solid #e3eae6; border-radius: 13px; background: #f9fbfa; color: #294146; }
.checkout-help-card p { margin: 0; color: #71817b; font-size: 13px; line-height: 1.6; }
.checkout-help-card > span { color: #82908a; font-size: 12px; }

@media (max-width: 700px) {
    .billing-summary-grid { grid-template-columns: minmax(0, 1fr); }
    .proof-uploader-name-grid, .proof-review-toolbar { grid-template-columns: minmax(0, 1fr); }
    .proof-review-modal > header { padding: 16px; }
    .proof-review-actions { padding: 16px; }
    .proof-review-actions .form-actions { flex-direction: column-reverse; }
    .proof-review-actions .form-actions > .button { width: 100%; }
    .billing-plan-details { grid-template-columns: minmax(0, 1fr); }
    .billing-current-plan { padding: 16px; }
    .billing-payment-history { padding: 0 0 14px; }
    .billing-payment-history > .billing-plan-heading { margin-bottom: 14px; padding: 14px 14px 0; }
    .billing-plan-heading { align-items: stretch; flex-direction: column; }
    .billing-plan-heading > .button { width: 100%; }
    .billing-reminder-banner { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
    .billing-editor .settings-form { grid-template-columns: minmax(0, 1fr); }
    .billing-editor .form-actions { flex-wrap: wrap; }
    .billing-editor .form-actions .button { flex: 1 1 160px; }
    .checkout-page { grid-template-columns: minmax(0, 1fr); }
    .checkout-order-card { padding: 16px; }
    .checkout-card-heading { flex-direction: column; }
    .checkout-order-item { grid-template-columns: 40px minmax(0, 1fr); }
    .checkout-order-icon { width: 40px; height: 40px; }
    .checkout-item-price { grid-column: 2; }
    .checkout-actions { flex-direction: column; }
    .checkout-actions .button { width: 100%; }
}

.school-navigation-disabled { opacity: 0.45; cursor: not-allowed; }
.school-navigation-notice { padding: 12px 18px; font-size: 13px; line-height: 1.5; }

/* Library checkout: keep scanner, lookup, and selected student details usable on narrow screens. */
.input-with-action { display: flex; align-items: stretch; gap: .5rem; }
.input-with-action .form-control { flex: 1 1 auto; min-width: 0; }
.library-student-details { margin-top: .75rem; padding: 1rem; border: 1px solid #cfe3d5; border-radius: .75rem; background: #f3faf5; }
.library-student-details[hidden] { display: none !important; }
.library-student-details [data-library-student-result] { margin: 0; color: #286343; }
.platform-onboard-panel { padding: clamp(16px, 2vw, 24px); }
.platform-onboard-panel h2 { margin: 0 0 16px; }
.platform-onboard-panel .settings-form { display: grid; gap: 12px; }
@media (max-width: 560px) {
    .input-with-action { flex-wrap: wrap; }
    .input-with-action .button { width: 100%; }
}

.teacher-announcement-stack {
    position: fixed;
    inset: 82px 22px auto auto;
    z-index: 1100;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.teacher-announcement-popover {
    position: relative;
    padding: 16px 42px 16px 18px;
    border: 1px solid var(--border-color, #dce5e2);
    border-left: 5px solid #1b6570;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 40, 45, .2);
    pointer-events: auto;
}
.teacher-announcement-popover strong { display: block; margin-top: 4px; color: #173d44; }
.teacher-announcement-popover p { margin: 6px 0 0; color: #526a70; white-space: pre-wrap; }
.teacher-announcement-kind { color: #52767d; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.teacher-announcement-urgent { border-color: #e6b548; border-left-color: #c94230; background: #fffaf0; }
.teacher-announcement-urgent .teacher-announcement-kind { color: #a23925; }
.teacher-announcement-dismiss { position: absolute; inset: 8px 8px auto auto; border: 0; background: transparent; color: #49636a; font-size: 1.4rem; cursor: pointer; }
@media (max-width: 640px) { .teacher-announcement-stack { inset: auto 12px 12px; width: auto; } }

/* Teams-style in-app reply window, persistent across both school and family layouts. */
.chat-dock { position: fixed; right: 22px; bottom: 22px; z-index: 1400; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.chat-dock-launcher { position: relative; display: inline-flex; min-height: 48px; align-items: center; gap: 9px; padding: 0 18px; border: 0; border-radius: 999px; background: #1b5961; color: #fff; box-shadow: 0 8px 28px rgb(12 40 44 / 25%); font: inherit; font-weight: 700; cursor: pointer; pointer-events: auto; }
.chat-dock-launcher:hover { background: #164b52; }
.chat-dock-launcher-icon { font-size: 18px; }
.chat-dock-badge { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: #d9534f; color: #fff; font-size: 12px; }
.chat-dock-window { display: flex; width: min(370px, calc(100vw - 32px)); height: min(510px, calc(100dvh - 100px)); min-height: 330px; flex-direction: column; overflow: hidden; border: 1px solid #d8e2dd; border-radius: 15px; background: #fff; box-shadow: 0 18px 55px rgb(10 31 35 / 28%); pointer-events: auto; }
.chat-dock-header { display: flex; min-height: 66px; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #e5ece8; background: #f8faf9; }
.chat-dock-heading { display: grid; min-width: 0; flex: 1; gap: 3px; }
.chat-dock-heading strong, .chat-dock-heading small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-dock-heading strong { color: #173d44; font-size: 14px; }
.chat-dock-heading small { color: #6d8387; font-size: 12px; }
.chat-dock-action { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; color: #426066; font: inherit; font-size: 20px; cursor: pointer; }
.chat-dock-messages { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 9px; overflow-y: auto; padding: 13px; background: #f7f9f7; }
.chat-dock-message { max-width: 86%; padding: 9px 11px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(12 40 44 / 8%); }
.chat-dock-message.theirs { align-self: flex-start; border: 1px solid #e2e9e5; border-bottom-left-radius: 4px; }
.chat-dock-message.mine { align-self: flex-end; border-bottom-right-radius: 4px; background: #e4f2f0; }
.chat-dock-message p { margin: 0; color: #243f44; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-dock-message small { display: block; margin-top: 5px; color: #80908b; font-size: 10px; text-align: right; }
.chat-dock-empty { margin: auto; color: #758780; font-size: 13px; text-align: center; }
.chat-dock-error { margin: 0; padding: 6px 12px; color: #a33b32; font-size: 12px; }
.chat-dock-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #e5ece8; }
.chat-dock-compose textarea { min-width: 0; min-height: 42px; max-height: 100px; flex: 1; resize: vertical; padding: 10px; border: 1px solid #d7e1dc; border-radius: 10px; font: inherit; font-size: 13px; }
.chat-dock-compose .button { min-height: 40px; padding: 0 13px; }
.chat-dock-full-chat { padding: 0 12px 10px; color: #28636b; font-size: 12px; font-weight: 700; text-align: right; text-decoration: none; }
.chat-dock-full-chat:hover { text-decoration: underline; }
.recent-chat-list { display: grid; gap: 8px; padding: 12px 16px 16px; }
.recent-chat-item { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 10px; border: 1px solid #e3ebe7; border-radius: 11px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.recent-chat-item:hover { border-color: #99b9b2; background: #f8fbfa; }
.recent-chat-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.recent-chat-copy strong, .recent-chat-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-chat-copy strong { color: #29464b; }
.recent-chat-copy small { color: #768983; font-size: 12px; }
.recent-chat-pin { color: #6d7d76; font-size: 11px; }
.portal-recent-chat-list { padding: 0 12px 12px; border-bottom: 1px solid #e7ede9; }
.portal-recent-chat-list h3 { margin: 10px 8px 6px; color: #637d80; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.portal-recent-chat-list .chat-person { width: 100%; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.portal-recent-chat-list .chat-person:hover { background: #f4f8f6; }
@media (max-width: 640px) {
    .chat-dock { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
    .chat-dock-window { width: calc(100vw - 24px); height: min(500px, calc(100dvh - 160px)); min-height: 300px; }
    .chat-dock-launcher { min-height: 44px; }
    .recent-chat-item { padding: 9px 7px; }
}

/* Dashboard visual system: spacious cards with a clear analytics hierarchy. */
.dashboard-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin:0 0 24px; }
.dashboard-hero .eyebrow { margin:0 0 8px; color:#68827d; font-size:11px; font-weight:800; letter-spacing:.13em; }
.dashboard-hero h1 { margin:0; color:#173b3f; font-size:clamp(27px,3vw,36px); letter-spacing:-.035em; }
.dashboard-hero p:not(.eyebrow) { margin:7px 0 0; color:#6c7e79; font-size:14px; }
.dashboard-hero p strong { color:#294c49; }
.dashboard-hero-actions { display:flex; align-items:center; gap:14px; }
.dashboard-today { color:#6d817a; font-size:12px; white-space:nowrap; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.dashboard-metric-card { position:relative; display:grid; grid-template-columns:1fr auto; align-content:start; gap:8px 12px; min-height:146px; padding:19px 20px; border:1px solid #e0e9e4; border-radius:15px; background:#fff; color:inherit; text-decoration:none; box-shadow:0 3px 12px rgb(27 59 50 / 3%); transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.dashboard-metric-card:hover { transform:translateY(-2px); border-color:#bfd5cc; box-shadow:0 10px 25px rgb(27 59 50 / 8%); }
.dashboard-metric-card .dashboard-metric-icon { grid-column:2; grid-row:1 / span 3; display:grid; width:43px; height:43px; place-items:center; border-radius:12px; }
.dashboard-metric-icon svg,.quick-action-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.dashboard-metric-icon.mint { background:#e5f4ec; color:#428569; }
.dashboard-metric-icon.blue { background:#e9f0fb; color:#5e83bb; }
.dashboard-metric-icon.gold { background:#fbf2dc; color:#b28a39; }
.dashboard-metric-icon.sky { background:#e3f2f3; color:#438993; }
.dashboard-metric-card .metric-label { color:#73837e; font-size:12px; font-weight:600; }
.dashboard-metric-card .metric-value { color:#173d40; font-size:29px; line-height:1.15; letter-spacing:-.035em; }
.dashboard-metric-card .metric-foot { color:#87958f; font-size:11px; line-height:1.4; }
.dashboard-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; align-items:start; gap:18px; }
.dashboard-main-column,.dashboard-side-column { display:grid; min-width:0; gap:18px; }
.dashboard-top-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:18px; }
.dashboard-bottom-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr); gap:18px; }
.dashboard-card { min-width:0; overflow:hidden; border:1px solid #e1e9e5; border-radius:15px; background:#fff; box-shadow:0 3px 12px rgb(27 59 50 / 3%); }
.dashboard-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:18px 20px 14px; }
.dashboard-card-heading h2 { margin:0; color:#254744; font-size:15px; letter-spacing:-.01em; }
.dashboard-card-heading p { margin:5px 0 0; color:#86948e; font-size:11px; }
.dashboard-card-heading>a { color:#42816c; font-size:11px; font-weight:750; text-decoration:none; white-space:nowrap; }
.dashboard-card-heading>a:hover { text-decoration:underline; }
.dashboard-period { padding:6px 9px; border-radius:7px; background:#f3f7f4; color:#73857c; font-size:10px; font-weight:650; white-space:nowrap; }
.attendance-chart-wrap { padding:2px 14px 0 8px; }
.attendance-chart { display:block; width:100%; height:auto; overflow:visible; }
.chart-grid-lines line { stroke:#e8efeb; stroke-width:1; stroke-dasharray:3 4; }
.chart-axis-labels text { fill:#9aa7a1; font-size:10px; text-anchor:end; }
.chart-month-label { fill:#83928c; font-size:10px; text-anchor:middle; }
.attendance-chart-area { fill:#e2f2e8; opacity:.9; }
.attendance-chart-line { fill:none; stroke:#4e9b7c; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.attendance-chart-point { fill:#fff; stroke:#4e9b7c; stroke-width:3; }
.chart-footnote { margin:0; padding:0 20px 16px; color:#94a19b; font-size:10px; }
.dashboard-chart-empty { display:grid; min-height:216px; align-content:center; justify-items:center; gap:7px; padding:20px; color:#81918a; text-align:center; }
.dashboard-chart-empty strong { color:#42625c; font-size:13px; }
.dashboard-chart-empty span { font-size:11px; }
.dashboard-event-list { display:grid; padding:0 14px 10px; }
.dashboard-event { display:flex; min-width:0; align-items:center; gap:12px; padding:11px 6px; border-top:1px solid #edf1ee; color:inherit; text-decoration:none; }
.dashboard-event:first-child { border-top:0; }
.dashboard-event:hover .dashboard-event-copy strong { color:#43806b; }
.dashboard-date-tile { display:grid; width:44px; height:49px; flex:0 0 44px; align-content:center; justify-items:center; gap:1px; border-radius:10px; }
.dashboard-date-tile strong { font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
.dashboard-date-tile b { font-size:17px; line-height:1; }
.dashboard-date-tile.event-green { background:#e8f4ec; color:#4f8c6c; }
.dashboard-date-tile.event-blue { background:#eaf0fb; color:#5c7db2; }
.dashboard-date-tile.event-gold { background:#fbf2df; color:#a78338; }
.dashboard-event-copy { display:grid; min-width:0; gap:3px; }
.dashboard-event-copy small { color:#9a8370; font-size:9px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.dashboard-event-copy strong { overflow:hidden; color:#344d48; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-event-copy span { overflow:hidden; color:#8c9993; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-announcement-list { padding:0 16px 10px; }
.dashboard-announcement { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px 0; border-top:1px solid #edf1ee; color:inherit; text-decoration:none; }
.dashboard-announcement:first-child { border-top:0; }
.dashboard-announcement:hover strong { color:#43806b; }
.announcement-mark { display:grid; width:29px; height:29px; place-items:center; border-radius:9px; background:#eff6f1; color:#54866d; font-size:12px; font-weight:800; }
.dashboard-announcement>span:nth-child(2) { display:grid; min-width:0; gap:4px; }
.dashboard-announcement strong { overflow:hidden; color:#3d5751; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-announcement small { display:-webkit-box; overflow:hidden; color:#87948e; font-size:10px; line-height:1.45; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.dashboard-announcement time { color:#9ba7a0; font-size:9px; white-space:nowrap; }
.dashboard-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0 16px 17px; }
.dashboard-action-grid>a { display:flex; min-height:68px; align-items:center; gap:9px; padding:10px; border:1px solid #e9efeb; border-radius:11px; color:#4e625b; font-size:10px; font-weight:700; text-decoration:none; transition:background .15s ease,border-color .15s ease; }
.dashboard-action-grid>a:hover { border-color:#bfd6cb; background:#f7faf8; }
.quick-action-icon { display:grid; width:33px; height:33px; flex:0 0 33px; place-items:center; border-radius:9px; }
.quick-action-icon svg { width:18px; height:18px; }
.quick-action-icon.green { background:#e5f4ec; color:#47876a; }
.quick-action-icon.blue { background:#e9f0fb; color:#5e83bb; }
.quick-action-icon.gold { background:#fbf2dc; color:#b28a39; }
.quick-action-icon.violet { background:#f1ecfa; color:#8066aa; }
.dashboard-list-empty { padding:20px; color:#8b9992; font-size:11px; line-height:1.6; text-align:center; }
.dashboard-pinned-list { display:grid; padding:0 14px 8px; }
.dashboard-pinned-chat { display:flex; min-width:0; align-items:center; gap:10px; padding:10px 3px; border-top:1px solid #edf1ee; color:inherit; text-decoration:none; }
.dashboard-pinned-chat:first-child { border-top:0; }
.dashboard-avatar { display:grid; width:36px; height:36px; flex:0 0 36px; place-items:center; border-radius:50%; background:#e8f1ec; color:#42755f; font-size:11px; font-weight:800; }
.dashboard-pinned-chat>span:nth-child(2) { display:grid; min-width:0; flex:1; gap:4px; }
.dashboard-pinned-chat strong { overflow:hidden; color:#3b554f; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-pinned-chat small { color:#8a9891; font-size:10px; }
.pin-mark { color:#6a927e; font-size:9px; font-weight:750; }
.dashboard-chat-link { display:flex; justify-content:space-between; margin:0 17px 16px; padding-top:12px; border-top:1px solid #edf1ee; color:#43816c; font-size:11px; font-weight:750; text-decoration:none; }
.finance-snapshot-card { display:grid; gap:8px; padding-bottom:17px; }
.finance-snapshot-card .dashboard-card-heading { padding-bottom:5px; }
.finance-snapshot-value { padding:0 20px; color:#244d46; font-size:26px; font-weight:800; letter-spacing:-.03em; }
.finance-snapshot-caption { padding:0 20px; color:#87958e; font-size:10px; line-height:1.5; }
.finance-snapshot-card>.button { justify-self:start; margin:8px 20px 0; }
.dashboard-help-card { display:grid; justify-items:center; padding:22px; text-align:center; }
.dashboard-help-mark { display:grid; width:44px; height:44px; place-items:center; border-radius:14px; background:#fbf0d9; color:#3e584f; font-size:15px; font-weight:850; }
.dashboard-help-card h2 { margin:12px 0 0; color:#35534b; font-size:13px; }
.dashboard-help-card p { margin:6px 0 0; color:#8c9992; font-size:10px; line-height:1.55; }
.chat-dock-window { border-color:#dce7e1; border-radius:16px; box-shadow:0 18px 55px rgb(10 31 35 / 22%); }
.chat-dock-header { border:0; background:#153f42; }
.chat-dock-heading strong { color:#fff; }
.chat-dock-heading small { color:#c0d4cc; }
.chat-dock-action { border-color:#ffffff35; background:#ffffff12; color:#fff; }
.chat-dock-action:hover { background:#ffffff25; }
.chat-dock-messages { background:#f7faf8; }
.chat-dock-message.mine { background:#e4f3e9; }
.chat-dock-compose { background:#fff; }
@media (max-width:1180px) { .dashboard-layout { grid-template-columns:minmax(0,1fr) 270px; gap:14px; } .dashboard-top-grid { grid-template-columns:minmax(0,1.05fr) minmax(280px,.95fr); gap:14px; } .dashboard-bottom-grid,.dashboard-main-column,.dashboard-side-column { gap:14px; } .dashboard-metrics { gap:12px; } }
@media (max-width:980px) { .dashboard-layout { grid-template-columns:minmax(0,1fr); } .dashboard-side-column { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .dashboard-hero { align-items:flex-start; flex-direction:column; gap:14px; } .dashboard-hero-actions { width:100%; justify-content:space-between; } .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-top-grid,.dashboard-bottom-grid,.dashboard-side-column { grid-template-columns:minmax(0,1fr); } }
@media (max-width:440px) { .dashboard-metrics { gap:9px; } .dashboard-metric-card { min-height:132px; padding:14px; } .dashboard-metric-card .dashboard-metric-icon { width:36px; height:36px; } .dashboard-metric-card .metric-value { font-size:25px; } .dashboard-card-heading { padding:15px 15px 12px; } .dashboard-announcement { grid-template-columns:28px minmax(0,1fr); } .dashboard-announcement time { display:none; } .dashboard-action-grid { padding-right:12px; padding-left:12px; } }

.page-loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1rem;
    border: 1px solid rgba(23,53,61,.16);
    border-radius: 999px;
    background: #ffffff;
    min-width: 170px;
    justify-content: center;
    border: 2px solid #d49a2a;
    box-shadow: 0 0 0 9999px rgba(15, 36, 42, .38), 0 12px 32px rgba(15, 36, 42, .28);
    color: #17353d;
    box-shadow: 0 8px 24px rgba(23,53,61,.18);
    font-size: .85rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
html.zb-is-loading .page-loading-indicator,
.page-loading-indicator.page-loading-visible {
    opacity: 1;
}
.page-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d6e1e3;
    border-top-color: #d49a2a;
    border-radius: 50%;
    animation: zb-page-spin .7s linear infinite;
}
@keyframes zb-page-spin { to { transform: rotate(360deg); } }
.client-pagination { justify-content: flex-end; margin-top: 1rem; }
.client-pagination span { min-width: 7rem; text-align: center; }
