/*
 * The stock look's theme: what the tokens cannot do. Loaded last, after the seven shared
 * stylesheets and the stock tokens.css. Every selector here names a class, id or attribute
 * the shared pages already carry, or one the stock look's own brand parts print
 * (.wordmark__logo, .login-card__logo, .site-footer__powered).
 *
 * This file names no centre colour. The four area slots (--slot-families, --slot-fees,
 * --slot-staff, --slot-building, each with a -tint) come from the centre's tokens.css: neutral
 * greys until a centre sets its two colours, then computed from them (the Acme demo alone shows
 * the KinderNexus palette).
 * Attention is a fixed amber (the --attention* and --break-cover* tokens), the same in every
 * centre; the shared stylesheets already read those tokens, so nothing here restyles it.
 */

/* Header: sits on the page, logo left, pill links right, no band. */
.site-header { background: transparent; border-bottom-color: transparent; }
.site-header__inner { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.wordmark { gap: 0.7rem; }
.wordmark__logo { display: block; width: 40px; height: 40px; flex: none; object-fit: contain; }
.wordmark__text { font-weight: var(--weight-bold); letter-spacing: -0.01em; }
.wordmark__text small { margin-top: 3px; color: var(--muted); font-weight: var(--weight-semibold); letter-spacing: 0.12em; }
/* No logo: the centre's name is the wordmark, a size larger. */
.wordmark:not(:has(.wordmark__logo)) .wordmark__text { font-size: 1.5rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: var(--weight-regular); }
.site-nav a:hover { background: var(--line); }
.site-nav a.is-active { font-weight: var(--weight-semibold); }

/* Tables: Inter breaks an email address mid-word at desktop widths under the shared
   overflow-wrap: anywhere, so the column keeps room for one. */
@media (min-width: 641px) {
    .data-table__break { min-width: 14em; }
}

/* A phone number stays on one line: a non-breaking space does not stop a break after its hyphen. */
a[href^="tel:"] { white-space: nowrap; }

/* Type: Outfit headings, bold start and regular finish where the page has an <em>. */
.page-head h1, .login-card__name { font-weight: var(--weight-bold); }
.page-head h1 em { font-style: normal; font-weight: var(--weight-regular); color: var(--ink); }
.login-card__tag em { font-style: normal; }
.stat-card__number { color: var(--ink); }

/* Shapes: pill buttons and tags, as on kindernexus.com. */
.btn { border-radius: var(--radius-pill); font-weight: var(--weight-semibold); }
.tag, .room-badge { padding: 1px 10px; border-color: transparent; border-radius: var(--radius-pill); }
.room-badge { background: var(--slot-building-tint); color: var(--ink); font-weight: var(--weight-semibold); }
.child-card__avatar { background: var(--slot-families-tint); color: var(--ink); }

/* Area markers: the site's capsule bar beside a label (.kn-tag__bar).
   A marker is a shape, never text, so the bright colours are not asked to be read. */
.side-nav__label, .stat-card__label { display: flex; align-items: center; gap: 8px; }
.side-nav__label::before, .stat-card__label::before,
.section__title::before, .card__title::before { content: ""; display: none; flex: none; width: 20px; height: 8px; border-radius: 4px; background: var(--area-colour); }
.section__title::before, .card__title::before { width: 24px; height: 10px; border-radius: 5px; margin-right: 10px; vertical-align: 0.2em; }
.side-nav__group[data-nav-section="families"], #enrollment-requests-tile, #open-invitations-tile, #enrolled-children-tile, #parents-tile, #waitlist-tile,
#guardians, #children, #enrollment-panel, .section:has(> .card-grid--children) { --area-colour: var(--slot-families); }
.side-nav__group[data-nav-section="finance"], #child-care, #invoices { --area-colour: var(--slot-fees); }
.side-nav__group[data-nav-section="operations"], #cameras-tile, #digital-app-queue-tile, #camera-access, .section:has(> .card-grid--cameras) { --area-colour: var(--slot-building); }
#today-board, .schedule-room { --area-colour: var(--slot-staff); }
.side-nav__group[data-nav-section] .side-nav__label::before, .stat-card[id] .stat-card__label::before,
#today-board > .section__title::before, .schedule-room > .section__title::before,
.section:has(> .card-grid--children) > .section__title::before, .section:has(> .card-grid--cameras) > .section__title::before,
:is(#guardians, #children, #enrollment-panel, #child-care, #invoices, #camera-access) .card__title::before { display: inline-block; }

/* The page's own area, from the sidebar's current link: a capsule above the title. */
.app-shell:has(.side-nav__group[data-nav-section="families"] a[aria-current="page"]) { --page-area-colour: var(--slot-families); }
.app-shell:has(.side-nav__group[data-nav-section="finance"] a[aria-current="page"]) { --page-area-colour: var(--slot-fees); }
.app-shell:has(.side-nav__group[data-nav-section="operations"] a[aria-current="page"]) { --page-area-colour: var(--slot-building); }
.app-shell:has(.side-nav a[aria-current="page"]:is([href^="/admin/scheduling"], [href^="/admin/staff"])) { --page-area-colour: var(--slot-staff); }
.app-shell:has(.side-nav a[aria-current="page"][href^="/admin/waitlist"]) { --page-area-colour: var(--slot-families); }
.page-head h1::before { content: ""; display: none; width: 28px; height: 12px; margin-bottom: 14px; border-radius: 6px; background: var(--page-area-colour); }
.app-shell:has(.side-nav__group:not([data-nav-section="overview"], [data-nav-section="configuration"]) a[aria-current="page"]) .page-head h1::before { display: block; }

/* Empty states: a quiet row of the four capsules. */
.empty-state::before { content: ""; display: block; width: 28px; height: 12px; margin: 0 auto var(--space-4); border-radius: 6px; transform: translateX(-54px);
    background: var(--slot-building); box-shadow: 36px 0 0 var(--slot-families), 72px 0 0 var(--slot-fees), 108px 0 0 var(--slot-staff); }

/* Sign-in: a white card over four capsules in the four slot colours (the shapes of the KinderNexus mark). */
.login-main { position: relative; isolation: isolate; overflow: hidden; }
.login-card { position: relative; border-color: var(--line); border-radius: 28px; box-shadow: var(--shadow-raised); }
.login-main::before, .login-main::after, .login-card::before, .login-card::after { content: ""; position: absolute; z-index: -1; width: 120px; border-radius: 60px; pointer-events: none; }
.login-main::before { height: 540px; left: calc(50% - 300px); top: calc(50% - 300px); background: var(--slot-building); }
.login-main::after { height: 120px; left: calc(50% - 300px); top: calc(50% + 180px); background: var(--slot-families); }
.login-card::before { height: 320px; right: -140px; top: -70px; background: var(--slot-fees); transform: rotate(45deg); }
.login-card::after { height: 320px; right: -140px; bottom: -70px; background: var(--slot-staff); transform: rotate(-45deg); }
.login-card__logo { display: block; width: 64px; height: 64px; margin: 0 auto; object-fit: contain; }
.login-card__name { letter-spacing: -0.01em; }
@media (max-width: 560px) {
    .login-main::before { left: -40px; top: 24px; height: 300px; }
    .login-main::after { left: auto; right: -40px; top: auto; bottom: 24px; }
    .login-card::before, .login-card::after { display: none; }
}

/* Footer: the centre's details, then a quiet Powered by KinderNexus. */
/* The credit is ONE line of text on one baseline: the muted colour is on the paragraph, the links inherit it. */
.site-footer .site-footer__powered { margin-top: var(--space-3); color: var(--muted); }
.site-footer__powered a { display: inline; color: inherit; text-decoration: none; }
.site-footer__powered a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__lead { white-space: nowrap; }
.site-footer__powered img { display: inline; vertical-align: middle; width: 15px; height: 16px; margin-right: 6px; }
/* The version number, on the admin pages only: small, muted, on its own line under "Powered by". */
.site-footer .site-footer__version { display: block; margin-top: var(--space-1); color: var(--muted); font-size: var(--text-small); line-height: var(--leading-small); }

/* Admin, Configuration, Branding: the two colour boxes and the preview panel. The panel (#brand-preview)
   carries the previewed palette as custom properties in its own style attribute, so only it changes
   colour; everything in it reads the same tokens the real pages read. Phone width: one column, no sideways scroll. */
.brand-field__control { display: flex; align-items: center; gap: var(--space-3); }
.brand-field__picker { flex: none; width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.brand-field__hex { font-size: var(--text-label); line-height: var(--leading-label); color: var(--ink); overflow-wrap: anywhere; }
.brand-field > .btn { align-self: flex-start; width: fit-content; margin-top: var(--space-2); }
.brand-preview__caption { margin: 0 0 var(--space-3); }
.brand-preview { display: grid; gap: var(--space-5); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.brand-preview > * { min-width: 0; }
.brand-preview__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.brand-preview__tabs { display: flex; flex-wrap: wrap; gap: var(--space-5); border-bottom: 1px solid var(--line); }
.brand-preview__tab { padding: var(--space-2) 0; color: var(--muted); font-size: var(--text-label); line-height: var(--leading-label); }
.brand-preview__tab[aria-current="page"] { color: var(--ink); font-weight: var(--weight-semibold); box-shadow: inset 0 -2px 0 var(--oak); }
.brand-preview__areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.brand-preview__area { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); color: var(--ink); font-weight: var(--weight-semibold); }
.brand-preview__marker { flex: none; width: 20px; height: 8px; border-radius: 4px; }
.brand-preview__area--families { background: var(--slot-families-tint); }
.brand-preview__area--fees { background: var(--slot-fees-tint); }
.brand-preview__area--staff { background: var(--slot-staff-tint); }
.brand-preview__area--building { background: var(--slot-building-tint); }
.brand-preview__area--families .brand-preview__marker { background: var(--slot-families); }
.brand-preview__area--fees .brand-preview__marker { background: var(--slot-fees); }
.brand-preview__area--staff .brand-preview__marker { background: var(--slot-staff); }
.brand-preview__area--building .brand-preview__marker { background: var(--slot-building); }
.brand-preview__swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.brand-preview__swatch { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-3); align-items: center; font-size: var(--text-small); line-height: var(--leading-small); }
.brand-preview__swatch-name { color: var(--muted); }
.brand-preview__swatch code { grid-column: 2; color: var(--ink); }
.brand-preview__chip { grid-row: 1 / span 2; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.brand-preview__chip--plum { background: var(--plum); }
.brand-preview__chip--plum-dark { background: var(--plum-dark); }
.brand-preview__chip--plum-soft { background: var(--plum-soft); }
.brand-preview__chip--plum-tint { background: var(--plum-tint); }
.brand-preview__chip--slot-families { background: var(--slot-families); }
.brand-preview__chip--slot-fees { background: var(--slot-fees); }
.brand-preview__chip--slot-staff { background: var(--slot-staff); }
.brand-preview__chip--slot-building { background: var(--slot-building); }
@media (max-width: 560px) {
    .brand-preview { padding: var(--space-4); }
    .brand-preview__areas { grid-template-columns: minmax(0, 1fr); }
}
