/* LCA Admissions v21.1.15 shared guided-workflow interface */
:root {
    --lca-blue: #2F588B;
    --lca-blue-dark: #24466F;
    --lca-blue-soft: #EEF4FA;
    --lca-gold: #D8A74C;
    --lca-gold-soft: #FFF7E5;
    --lca-sage: #7F9C88;
    --lca-sage-dark: #557460;
    --lca-sage-soft: #EFF5F0;
    --lca-charcoal: #2B2D31;
    --lca-muted: #5D6978;
    --lca-off-white: #F7F8FA;
    --lca-border: #D8E0E8;
    --lca-danger: #98463E;
    --lca-danger-soft: #FFF4F2;
    --lca-focus: #D8A74C;
}

/* Shared current-stage and required-action summary */
.workflow-summary {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--lca-border);
    border-left: 6px solid var(--lca-blue);
    border-radius: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--lca-blue-soft) 100%);
    box-shadow: 0 10px 28px rgba(47, 88, 139, 0.1);
}

.workflow-summary.is-overdue {
    border-left-color: var(--lca-danger);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--lca-danger-soft) 100%);
}

.workflow-summary.is-due_today {
    border-left-color: var(--lca-gold);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--lca-gold-soft) 100%);
}

.workflow-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workflow-summary-heading .eyebrow {
    margin: 0 0 0.3rem;
    color: var(--lca-blue);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.workflow-summary-subject {
    margin: 0 0 0.15rem;
    color: var(--lca-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.workflow-summary h3 {
    margin: 0;
    color: var(--lca-charcoal);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.25;
}

.workflow-stage-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(47, 88, 139, 0.3);
    border-radius: 999px;
    background: #FFFFFF;
    color: var(--lca-blue-dark);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workflow-required {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(47, 88, 139, 0.24);
    border-radius: 12px;
    background: #FFFFFF;
}

.workflow-required > span,
.workflow-summary-meta span {
    color: var(--lca-muted);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.workflow-required > strong {
    color: var(--lca-blue-dark);
    font-size: 1.03rem;
    line-height: 1.4;
}

.workflow-required > p {
    margin: 0.25rem 0 0;
    color: var(--lca-muted);
    line-height: 1.5;
}

.workflow-required.is-clear {
    border-color: rgba(127, 156, 136, 0.45);
    background: var(--lca-sage-soft);
}

.workflow-required.is-clear > strong {
    color: var(--lca-sage-dark);
}

.workflow-welcome-call {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(127, 156, 136, 0.35);
}

.workflow-welcome-call.is-done {
    align-items: flex-start;
}

.welcome-call-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--lca-sage-dark);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-style: normal;
    line-height: 1;
}

.workflow-welcome-call.is-done strong {
    display: block;
    color: var(--lca-sage-dark);
    font-size: 0.95rem;
}

.workflow-welcome-call.is-done small {
    display: block;
    margin-top: 0.15rem;
    color: var(--lca-muted);
}

.workflow-summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.workflow-summary-meta > div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(216, 224, 232, 0.95);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
}

.workflow-summary-meta strong {
    min-width: 0;
    color: var(--lca-charcoal);
    overflow-wrap: anywhere;
}

/* Contextual guided actions */
.workflow-actions {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--lca-border);
    border-radius: 16px;
    background: #FFFFFF;
}

.workflow-actions-heading h3 {
    margin: 0;
    color: var(--lca-charcoal);
    font-size: 1.1rem;
}

.workflow-actions-heading p {
    margin: 0.35rem 0 0;
    max-width: 760px;
    color: var(--lca-muted);
    line-height: 1.5;
}

.workflow-action-group,
.workflow-decision-group > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.workflow-decision-group {
    display: grid;
    gap: 0.55rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--lca-border);
}

.workflow-decision-group > span {
    color: var(--lca-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.workflow-action-button {
    min-height: 44px;
    white-space: normal;
    text-align: center;
}

.workflow-action-button[aria-expanded="true"] {
    box-shadow: 0 0 0 3px rgba(216, 167, 76, 0.25);
}

.workflow-action-confirmation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid rgba(47, 88, 139, 0.3);
    border-radius: 12px;
    background: var(--lca-blue-soft);
}

.workflow-action-confirmation[hidden] {
    display: none !important;
}

.workflow-action-confirmation > div:first-child {
    min-width: 0;
}

.workflow-action-confirmation > div:first-child > strong {
    display: block;
    color: var(--lca-blue-dark);
    font-size: 1rem;
}

.workflow-action-confirmation p {
    margin: 0.35rem 0 0;
    color: var(--lca-charcoal);
    line-height: 1.45;
}

.workflow-email-notice {
    margin-top: 0.75rem !important;
    padding: 0.65rem 0.75rem;
    border-left: 4px solid var(--lca-gold);
    border-radius: 8px;
    background: #FFFFFF;
}

.workflow-email-notice.is-none {
    border-left-color: var(--lca-sage);
}

.workflow-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    gap: 0.55rem;
}


.workflow-action-confirmation strong,
.workflow-action-confirmation p,
.workflow-email-notice {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.workflow-confirmation-actions .button {
    max-width: 100%;
    white-space: normal;
}

/* "What information do we need?" checklist - shared by Request More Information
   and Reopen for Amendment. Scrolls inside itself rather than pushing the confirm
   buttons off a short drawer: the list is ~35 items across 8 sections. */
.information-request-picker {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--lca-border);
}

.information-request-intro {
    margin: 0 0 0.6rem !important;
    color: var(--lca-charcoal);
}

.information-request-groups {
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.15rem 0.6rem 0.15rem 0.15rem;
    border: 1px solid var(--lca-border);
    border-radius: 10px;
    background: #FFFFFF;
}

.information-request-group {
    margin: 0;
    padding: 0.6rem 0.25rem;
    border: 0;
    border-bottom: 1px solid var(--lca-border);
}

.information-request-group:last-child {
    border-bottom: 0;
}

.information-request-group legend {
    padding: 0;
    color: var(--lca-blue-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.information-request-group .choices {
    display: grid;
    gap: 0.1rem;
    margin-top: 0.3rem;
}

/* Each row is an explicit two-column grid - checkbox column, then text column.
   It has to be stated in full rather than relying on a flex row, because
   app.css's `.drawer label { display: grid; gap: 7px; font-size: 11px;
   font-weight: 750 }` styles every label in the drawer as a stacked form field.
   That rule was pushing the box out of line with its wording and rendering the
   labels as small bold field captions. Every property it sets is therefore
   overridden here explicitly, so the row cannot drift again if that rule changes.

   `align-items: start` keeps the box on the FIRST line of a label that wraps to
   two or three lines - which several of these do at narrow widths - rather than
   floating it to the middle of the block. `align-content: center` then centres
   the single row inside the 44px touch target, so a one-line item has no dead
   space under it. */
.information-request-group .choice {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, 1fr);
    align-items: start;
    align-content: center;
    column-gap: 0.6rem;
    row-gap: 0;
    /* 44px minimum touch target, per the responsive baseline. */
    min-height: 2.75rem;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    cursor: pointer;
}

.information-request-group .choice:hover,
.information-request-group .choice:focus-within {
    background: var(--lca-blue-tint, #EEF3F7);
}

.information-request-group .choice > input {
    grid-column: 1;
    width: 1.15rem;
    height: 1.15rem;
    /* Optically centre the box on the first line of text rather than hanging it
       from the line's top edge: half the difference between the line box and the
       box itself. Stays correct if either size changes. */
    margin: calc((1.4em - 1.15rem) / 2) 0 0;
}

/* Undoes the drawer's form-caption treatment: these are sentences a parent reads
   in an email, not field labels. */
.information-request-group .choice > span {
    grid-column: 2;
    color: var(--lca-charcoal);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
}

.information-request-details,
.information-request-note {
    display: block;
    margin-top: 0.7rem;
}

/* Same reason as the choice text above: override the drawer's 11px/750 caption
   styling so these read as instructions rather than field labels. */
.information-request-details > span,
.information-request-note > span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--lca-charcoal);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.information-request-details textarea,
.information-request-note input {
    width: 100%;
    max-width: 100%;
}

/* What the family is currently waiting to supply, shown on the record itself. */
.information-request-outstanding {
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-left: 4px solid var(--lca-gold);
    border-radius: 8px;
    background: #FFFFFF;
}

.information-request-outstanding strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--lca-blue-dark);
}

.information-request-outstanding ul {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.5;
}

.information-request-outstanding p {
    margin: 0.4rem 0 0 !important;
}

@media (max-width: 720px) {
    .information-request-groups {
        max-height: 16rem;
    }
}

.workflow-other-actions {
    border: 1px solid var(--lca-border);
    border-radius: 14px;
    background: #FFFFFF;
}

.workflow-other-actions > summary,
.record-details > summary,
.workflow-technical-details > summary,
.admin-override > summary {
    cursor: pointer;
    list-style-position: outside;
    color: var(--lca-blue-dark);
    font-weight: 800;
}

.workflow-other-actions > summary {
    padding: 0.9rem 1rem;
}

.workflow-other-actions[open] > summary {
    border-bottom: 1px solid var(--lca-border);
}

.workflow-other-actions > .workflow-actions {
    border: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: none;
}

.workflow-technical-details {
    border-style: dashed !important;
    background: var(--lca-off-white) !important;
}

.admin-override {
    border-color: rgba(216, 167, 76, 0.75) !important;
    background: var(--lca-gold-soft) !important;
}

.admin-override > summary {
    color: #795814;
}

.record-details[open] > summary,
.workflow-technical-details[open] > summary,
.admin-override[open] > summary {
    margin-bottom: 1rem;
}

/* Compact workflow information in registers */
.record-stage-cell {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.record-stage-cell strong {
    color: var(--lca-charcoal);
    line-height: 1.35;
}

.record-stage-cell small {
    margin: 0 !important;
    color: var(--lca-muted) !important;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.workflow-due {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--lca-border);
    border-radius: 999px;
    background: var(--lca-off-white);
    color: var(--lca-muted);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.workflow-due.is-overdue {
    border-color: rgba(152, 70, 62, 0.45);
    background: var(--lca-danger-soft);
    color: var(--lca-danger);
}

.workflow-due.is-due_today {
    border-color: rgba(216, 167, 76, 0.58);
    background: var(--lca-gold-soft);
    color: #795814;
}

.workflow-due.is-upcoming {
    border-color: rgba(47, 88, 139, 0.3);
    background: var(--lca-blue-soft);
    color: var(--lca-blue-dark);
}

.record-count-cell {
    display: grid;
    gap: 0.2rem;
}

/* Workflow history */
.workflow-history {
    display: grid;
    gap: 0.45rem;
}

.workflow-history-entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--lca-border);
    border-radius: 9px;
    background: #FFFFFF;
}

.workflow-history-entry strong {
    color: var(--lca-charcoal);
}

.workflow-history-entry span {
    color: var(--lca-muted);
    font-size: 0.82rem;
    text-align: right;
}

/* Page help control is integrated into the Page Guide header on every staff page. */
.lca-quick-guide-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0 0 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(47, 88, 139, 0.12);
}

.lca-quick-guide-toolbar .guide-kicker { margin: 0; }

.lca-quick-guide-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    min-height: 30px;
    margin: 0;
    padding: 0.2rem 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--lca-blue);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.lca-quick-guide-toggle::after {
    content: "⌃";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--lca-blue);
    font-size: 0.86rem;
    line-height: 1;
}

.lca-quick-guide-toggle[aria-expanded="false"]::after { content: "⌄"; }
.lca-quick-guide-toggle:hover { color: #24466f; background: rgba(47, 88, 139, 0.06); }
.lca-quick-guide-toggle:focus-visible { outline: 3px solid rgba(216, 167, 76, 0.45); outline-offset: 3px; }

.workspace-guide.lca-quick-guide-collapsed {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 0 !important;
    margin: 0 0 0.75rem !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.workspace-guide.lca-quick-guide-collapsed > *:not(.lca-quick-guide-toolbar) { display: none !important; }
.workspace-guide.lca-quick-guide-collapsed .lca-quick-guide-toolbar {
    justify-content: flex-end;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 0;
}
.workspace-guide.lca-quick-guide-collapsed .guide-kicker { display: none !important; }

@media (max-width: 700px) {
    .lca-quick-guide-toolbar { align-items: center; gap: 0.65rem; }
    .lca-quick-guide-toggle { min-height: 30px; font-size: 0.74rem; }
}

/* Consolidated create menu */
.lca-create-menu {
    position: relative;
    display: inline-block;
    z-index: 30;
}

.lca-create-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--lca-blue);
    border-radius: 10px;
    background: var(--lca-blue);
    color: #FFFFFF;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.lca-create-menu > summary::-webkit-details-marker {
    display: none;
}

.lca-create-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: grid;
    gap: 0.45rem;
    min-width: 270px;
    padding: 0.65rem;
    border: 1px solid var(--lca-border);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 18px 42px rgba(43, 45, 49, 0.18);
}

.lca-create-menu-panel > * {
    width: 100% !important;
    justify-content: flex-start !important;
    box-shadow: none !important;
}

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--lca-focus);
    outline-offset: 3px;
}

@media (max-width: 820px) {
    .workflow-summary-heading,
    .workflow-action-confirmation {
        grid-template-columns: 1fr;
    }

    .workflow-summary-heading {
        align-items: flex-start;
    }

    .workflow-stage-pill {
        align-self: flex-start;
    }

    .workflow-action-confirmation {
        display: grid;
    }

    .workflow-confirmation-actions {
        justify-content: flex-start;
    }

    .lca-create-menu {
        width: 100%;
    }

    .lca-create-menu > summary {
        width: 100%;
    }

    .lca-create-menu-panel {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .workflow-summary,
    .workflow-actions {
        padding: 1rem;
        border-radius: 13px;
    }

    .workflow-summary-heading {
        display: grid;
    }

    .workflow-summary-meta {
        grid-template-columns: 1fr;
    }

    .workflow-action-group,
    .workflow-decision-group > div,
    .workflow-confirmation-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .workflow-action-button,
    .workflow-confirmation-actions .button {
        width: 100%;
    }

    .workflow-history-entry {
        display: grid;
        gap: 0.25rem;
    }

    .workflow-history-entry span {
        text-align: left;
    }

    .lca-quick-guide-toggle {
        width: 100%;
    }

    .workspace-guide.lca-quick-guide-collapsed {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}


.entry-year-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem}.entry-year-option{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border:1px solid #cbd5e1;border-radius:18px;background:#fff;cursor:pointer;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.entry-year-option:hover{border-color:var(--sage)}.entry-year-option:has(input:focus-visible){border-color:var(--navy);box-shadow:0 0 0 3px rgba(47,88,139,.18)}.entry-year-option:has(input:checked){border-color:var(--navy);box-shadow:0 0 0 3px rgba(47,88,139,.12);background:#f4f7fb}.entry-year-option input{margin-top:.25rem;outline:none;box-shadow:none}.entry-year-option input:focus,.entry-year-option input:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(47,88,139,.18);border-radius:50%}.entry-year-option span{display:grid;gap:.25rem}.entry-year-option small{color:#5f6b7a}.admissions-year-settings .settings-form{display:grid;gap:1rem;max-width:760px}.admissions-year-settings fieldset{border:1px solid #d8dee8;border-radius:12px;padding:1rem}.admissions-year-settings legend{font-weight:700;padding:0 .4rem}@media(max-width:700px){.entry-year-options{grid-template-columns:1fr}}


/* v21.1.43 scheduled admissions defaults and clean radio focus */
.entry-year-option input[type="radio"] {
  -webkit-appearance: radio !important;
  appearance: radio !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem !important;
  padding: 0 !important;
  margin: .25rem 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  flex: 0 0 1.5rem;
}
.entry-year-option input[type="radio"]:focus,
.entry-year-option input[type="radio"]:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}
.entry-year-option:has(input[type="radio"]:focus-visible) {
  outline: 3px solid rgba(47,88,139,.28);
  outline-offset: 3px;
}
.admissions-year-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 760px) { .admissions-year-grid { grid-template-columns: 1fr; } }
