:root {
  --brand: #08a5a3;
  --brand-dark: #087d7d;
  --brand-deep: #07575c;
  --brand-soft: #dff5f3;
  --brand-mist: #f1fbfa;
  --ink: #153a3d;
  --muted: #698184;
  --line: #d9e9e7;
  --paper: #ffffff;
  --canvas: #f5faf9;
  --sun: #86ddca;
  --coral: #2bbbad;
  --pink: #d72a78;
  --pink-soft: #fde8f1;
  --yellow: #f3c51f;
  --yellow-soft: #fff5c7;
  --success: #2c9472;
  --shadow: 0 22px 60px rgba(7, 87, 92, 0.11);
  --shadow-small: 0 10px 28px rgba(7, 87, 92, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}
.setup-page{min-height:100vh}.setup-brand{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 auto 24px}.setup-brand img{width:72px;height:72px;object-fit:contain}.setup-brand span{display:grid}.setup-brand strong{color:var(--brand-deep);font-size:1.15rem}.setup-brand small{color:var(--muted);font-size:.78rem}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 5%, rgba(8, 165, 163, 0.11), transparent 26rem),
    radial-gradient(circle at 94% 45%, rgba(43, 187, 173, 0.1), transparent 22rem),
    var(--canvas);
  font-family: "Aptos", "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

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

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

a {
  color: inherit;
}

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

h1,
h2,
h3,
.app-brand strong {
  font-family: "Arial Rounded MT Bold", "Aptos Display", "Trebuchet MS", sans-serif;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -9rem;
  right: -8rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(215, 42, 120, 0.13);
  box-shadow: inset 0 0 0 4rem rgba(215, 42, 120, 0.025);
}

.ambient-two {
  bottom: 6rem;
  left: -8rem;
  width: 18rem;
  height: 18rem;
  background: rgba(243, 197, 31, 0.09);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  max-width: 40rem;
  color: #49676a;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.card {
  border: 1px solid rgba(8, 125, 125, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-small);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #13bbb4);
  box-shadow: 0 12px 28px rgba(8, 165, 163, 0.24);
}

.button-soft {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.button-light {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 10px 25px rgba(4, 83, 87, 0.14);
}

.button-large {
  width: 100%;
  min-height: 54px;
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.public-main {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 32px 0;
}

.login-page .public-main {
  width: min(1360px, calc(100% - 32px));
}

.login-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
  padding: 18px 0;
}

.login-story {
  position: relative;
  min-height: min(710px, calc(100vh - 100px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 68px);
  border-radius: 44px;
  color: #fff;
  background:
    radial-gradient(circle at 91% 18%, rgba(132, 231, 211, 0.32), transparent 15rem),
    linear-gradient(145deg, #05646a 0%, #078b8d 56%, #13afa4 100%);
  box-shadow: 0 28px 75px rgba(4, 83, 87, 0.2);
  isolation: isolate;
}

.login-story::before,
.login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.login-story::before {
  top: -105px;
  right: -90px;
  width: 360px;
  height: 360px;
  border: 38px solid rgba(255, 255, 255, 0.11);
}

.login-story::after {
  left: -80px;
  bottom: -125px;
  width: 300px;
  height: 300px;
  border: 58px solid rgba(109, 221, 199, 0.18);
}

.hero-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 26px;
  padding: 0;
  background: transparent;
  filter: brightness(0) invert(1) drop-shadow(0 12px 28px rgba(3, 64, 68, 0.24));
  opacity: 0.96;
}

.login-story h1 {
  max-width: 720px;
  margin-bottom: 20px;
  color: #fff;
}

.login-story > .eyebrow {
  color: #aaf0e3;
}

.login-story .lead {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.84);
}

.feature-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 34px;
}

.feature-ribbon span {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 800;
}

.story-card {
  max-width: 650px;
  display: grid;
  grid-template-columns: 1.08fr 0.82fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 28px;
  background: rgba(2, 67, 72, 0.82);
  box-shadow: 0 18px 46px rgba(3, 54, 58, 0.28);
  backdrop-filter: blur(16px);
}

.story-photo {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 24%, rgba(179, 242, 229, 0.42) 0 12%, transparent 12.5%),
    linear-gradient(145deg, #045f66 0%, #067b80 58%, #0a9691 100%);
}

.story-photo::before,
.story-photo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.story-photo::before {
  top: 28px;
  right: -42px;
  width: 170px;
  height: 170px;
  border: 22px solid rgba(255, 255, 255, 0.12);
}

.story-photo::after {
  right: 68px;
  bottom: -66px;
  width: 150px;
  height: 150px;
  border: 30px solid rgba(125, 229, 210, 0.16);
}

.story-photo > * {
  z-index: 1;
}

.story-kicker {
  margin-bottom: 8px;
  color: #d8fff7;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.story-photo strong {
  color: #fff;
  font-family: "Arial Rounded MT Bold", "Aptos Display", "Trebuchet MS", sans-serif;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1.02;
  text-shadow: 0 2px 16px rgba(1, 45, 49, 0.34);
}

.story-note {
  position: relative;
  align-self: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  color: #fff;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(1, 55, 60, 0.42);
}

.story-note-number {
  display: block;
  margin-bottom: 22px;
  color: #bff6eb;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.story-note strong {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.3;
}

.story-note p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  line-height: 1.55;
}

.login-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(8, 165, 163, 0.18);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(4, 83, 87, 0.15);
  backdrop-filter: blur(18px);
}

.login-card-heading {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 28px 32px 24px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.72), transparent 7rem),
    linear-gradient(135deg, #dff7f3, #f6fcfb);
}

.login-card-heading::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -76px;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(8, 165, 163, 0.11);
  border-radius: 50%;
}

.login-card-heading > * {
  z-index: 1;
}

.login-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.login-card-body {
  padding: 26px 32px 28px;
}

.login-welcome-copy {
  margin-bottom: 20px;
  color: var(--muted);
}

.login-card-body .button-primary {
  background: linear-gradient(135deg, #087d7d, #10b9ae);
  box-shadow: 0 14px 30px rgba(8, 165, 163, 0.24);
}

.login-card-body .install-app-button {
  margin-top: 18px;
}

.mini-logo {
  z-index: 1;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(4, 83, 87, 0.1);
}

.mini-logo img {
  width: 56px;
  height: 56px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #34575a;
  font-size: 0.9rem;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 47px;
  padding: 12px 14px;
  border: 1px solid #cfe2df;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfefd;
  transition: border 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(8, 165, 163, 0.12);
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--brand-dark);
}

.input-wrap input {
  padding-left: 46px;
}

.privacy-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.78rem;
}

.app-header {
  width: min(1240px, calc(100% - 32px));
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px auto 0;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(8, 125, 125, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(16px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.app-brand img {
  width: 62px;
  height: 62px;
}

.app-brand span {
  display: grid;
}

.app-brand strong {
  font-size: 1.1rem;
}

.app-brand small,
.user-name {
  color: var(--muted);
  font-size: 0.79rem;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-chip,
.activity-tag,
.status,
.privacy-badge,
.section-count {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 0.73rem;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-mist);
  cursor: pointer;
  text-decoration: none;
}

.icon-button svg {
  width: 21px;
}

.header-billing-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(8, 165, 163, 0.2);
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-mist);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.header-billing-link:hover,
.header-billing-link:focus-visible {
  background: var(--brand-soft);
}

.billing-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 56px;
}

.billing-sidebar {
  position: sticky;
  top: 20px;
  padding: 18px 14px;
  border: 1px solid rgba(8, 125, 125, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-small);
}

.billing-sidebar-title,
.billing-panel-heading,
.billing-topbar,
.billing-actions,
.billing-filter,
.reader-controls,
.billing-inline-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.billing-sidebar-title {
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--line);
}

.billing-sidebar-title > span:last-child {
  display: grid;
}

.billing-sidebar-title strong {
  color: var(--brand-deep);
  font-size: 1rem;
}

.billing-sidebar-title small {
  color: var(--muted);
  font-size: 0.74rem;
}

.billing-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-deep), var(--brand));
  font-weight: 900;
}

.billing-nav {
  display: grid;
  gap: 5px;
  padding: 16px 0;
}

.billing-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 11px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.billing-nav a span {
  width: 20px;
  color: var(--brand);
  font-size: 1.05rem;
  text-align: center;
}

.billing-nav a:hover,
.billing-nav a.is-active {
  color: var(--brand-deep);
  background: var(--brand-mist);
}

.billing-nav a.is-active {
  box-shadow: inset 3px 0 0 var(--brand);
}

.billing-sidebar-note {
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--pink-soft), #fff9df);
}

.billing-sidebar-note strong {
  color: #8f174e;
  font-size: 0.84rem;
}

.billing-sidebar-note p {
  margin: 7px 0 0;
  color: #6d5661;
  font-size: 0.77rem;
  line-height: 1.45;
}

.billing-workspace {
  min-width: 0;
}

.billing-topbar {
  justify-content: space-between;
  margin: 8px 0 22px;
}

.billing-topbar h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.billing-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.billing-metric {
  min-height: 130px;
  display: grid;
  align-content: center;
  padding: 20px;
  border: 1px solid rgba(8, 165, 163, 0.14);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.billing-metric span,
.billing-metric small {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-metric strong {
  margin: 3px 0;
  color: var(--brand-deep);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.billing-metric-paid strong { color: var(--success); }
.billing-metric-pending strong { color: #ad7700; }
.billing-metric-contacts strong { color: #c02c70; }

.billing-main-grid,
.billing-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 16px;
  margin-bottom: 16px;
}

.billing-panel {
  padding: 22px;
}

.billing-panel-heading {
  justify-content: space-between;
  margin-bottom: 16px;
}

.billing-panel-heading h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.billing-panel-heading .eyebrow {
  margin-bottom: 5px;
}

.text-link {
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.billing-import-panel {
  background: linear-gradient(145deg, #fff, #f1fbfa 62%, #fff5c7);
}

.billing-import-panel p,
.reader-panel > p,
.billing-import-wide > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.billing-import-links {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.billing-import-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(8, 165, 163, 0.16);
  border-radius: 13px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.billing-import-links a:hover { border-color: var(--brand); }

.billing-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 1.4rem;
  font-weight: 900;
}

.billing-table-wrap {
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.billing-table th {
  padding: 0 10px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.billing-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #edf4f2;
  vertical-align: top;
}

.billing-table tbody tr:last-child td { border-bottom: 0; }
.billing-table td strong { color: var(--brand-deep); }
.money-cell { white-space: nowrap; text-align: right; }
.table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 0.73rem; }

.billing-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-paid { color: #1d7055; background: #dff4ea; }
.status-pending { color: #886400; background: #fff3c2; }
.status-partial { color: #946126; background: #ffead4; }
.status-draft { color: #695a8c; background: #eee7ff; }

.billing-empty {
  padding: 28px 10px;
  color: var(--muted);
  text-align: center;
}

.billing-list-panel { overflow: hidden; }

.billing-filter {
  align-items: stretch;
  margin-bottom: 18px;
}

.billing-filter input { flex: 1 1 260px; }
.billing-filter select { width: 180px; }

.billing-form { gap: 13px; }
.billing-form .button { margin-top: 4px; }

.billing-dropzone,
.billing-inline-upload {
  align-items: stretch;
  padding: 18px;
  border: 1px dashed #a9d6d1;
  border-radius: 16px;
  background: var(--brand-mist);
}

.billing-dropzone { display: grid; gap: 14px; }
.billing-dropzone input[type="file"] { min-height: auto; padding: 8px 0 0; border: 0; background: transparent; }
.billing-inline-upload input[type="file"] { flex: 1; min-height: auto; padding: 8px 0; border: 0; background: transparent; }

.billing-import-wide { margin-bottom: 16px; }

.reader-panel { margin-bottom: 16px; }
.reader-form { display: grid; gap: 16px; }

.reader-file {
  padding: 28px;
  border: 2px dashed rgba(8, 165, 163, 0.4);
  border-radius: 18px;
  color: var(--brand-deep);
  background: linear-gradient(145deg, var(--brand-mist), #fff);
  font-weight: 900;
}

.reader-file input { display: block; width: 100%; margin-top: 10px; min-height: auto; padding: 8px 0 0; border: 0; background: transparent; }
.reader-status { color: var(--muted); font-size: 0.83rem; }
.reader-preview { min-height: 120px; padding: 18px; border-radius: 16px; background: #f8fcfb; }
.reader-empty { color: var(--muted); font-size: 0.9rem; }
.reader-error { color: #9a493a; }
.reader-result strong { color: var(--brand-deep); }
.reader-result dl { display: grid; grid-template-columns: 120px 1fr; gap: 7px 14px; margin: 14px 0 0; }
.reader-result dt { color: var(--muted); font-size: 0.82rem; }
.reader-result dd { margin: 0; font-weight: 800; }
.reader-result details { margin-top: 14px; color: var(--muted); font-size: 0.8rem; }
.reader-result details p { max-height: 150px; overflow: auto; white-space: pre-wrap; }

.document-reader-list { display: grid; gap: 8px; }
.document-reader-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.document-reader-row:last-child { border-bottom: 0; }
.document-reader-row strong, .document-reader-row small { display: block; }
.document-reader-row small { margin-top: 3px; color: var(--muted); font-size: 0.75rem; }
.document-type { display: grid; place-items: center; width: 42px; height: 36px; border-radius: 10px; color: #8f174e; background: var(--pink-soft); font-size: 0.68rem; font-weight: 900; }

.notification-menu {
  position: relative;
}

.notification-menu > summary {
  list-style: none;
}

.notification-menu > summary::-webkit-details-marker {
  display: none;
}

.notification-button {
  position: relative;
}

.notification-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pink, #d72a78);
  box-shadow: 0 2px 8px rgba(215, 42, 120, 0.38);
}

.notification-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(5, 62, 65, 0.18);
}

.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}

.notification-heading span {
  color: #a51e5b;
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-list {
  display: grid;
  gap: 6px;
}

.notification-item {
  display: grid;
  grid-template-columns: 9px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.notification-item:hover,
.notification-item.is-unread {
  background: #fff1f7;
}

.notification-state {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.notification-item.is-unread .notification-state {
  background: var(--pink, #d72a78);
}

.notification-item span:last-child {
  display: grid;
  gap: 2px;
}

.notification-item small,
.notification-empty {
  color: var(--muted);
  font-size: 0.75rem;
}

.notification-all {
  display: block;
  margin-top: 10px;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--line);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.notification-empty {
  margin: 4px;
  padding: 14px 8px;
  text-align: center;
}

.family-announcement-admin {
  scroll-margin-top: 24px;
}

.announcement-collapsible {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.announcement-collapsible > summary {
  margin: 0;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.announcement-collapsible > summary::-webkit-details-marker {
  display: none;
}

.announcement-collapsible > summary h2,
.announcement-collapsible > summary p {
  margin-bottom: 0;
}

.announcement-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-deep);
  background: var(--brand-mist);
  font-size: 1.2rem;
  font-weight: 800;
}

.announcement-collapsible[open] > summary .announcement-toggle {
  transform: rotate(45deg);
}

/* Keep the two alert areas easy to spot without letting them dominate the dashboard. */
.announcement-collapsible {
  margin-bottom: 18px;
  border-color: rgba(7, 134, 139, 0.2);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(5, 62, 65, 0.06);
}

.announcement-collapsible > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 13px 18px;
  margin: 0;
  border-left: 5px solid var(--brand);
}

.announcement-collapsible > summary .eyebrow {
  margin-bottom: 3px;
  font-size: 0.62rem;
}

.announcement-collapsible > summary h2 {
  font-size: 1.16rem;
  line-height: 1.15;
}

.announcement-collapsible > summary .section-count {
  white-space: nowrap;
}

.announcement-collapsible > summary .announcement-toggle {
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--brand-deep);
}

#avisos-families-admin > summary {
  border-left-color: var(--pink);
}

#avisos-families-admin > summary .section-count {
  color: #a51e5b;
  background: #fff0f7;
}

#avisos > summary {
  border-left-color: var(--brand);
}

.announcement-collapsible-body {
  padding: 0 22px 24px;
  border-top: 1px solid var(--line);
}

.compact-notice-group,
.announcement-collapsible-body > form,
.announcement-collapsible-body > .notice-grid {
  margin-top: 16px;
}

.compact-notice-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compact-notice-group > .announcement-history {
  padding: 0 12px 12px;
}

.announcement-collapsible-body > .announcement-composer {
  margin-top: 22px;
}

.announcement-composer {
  display: grid;
  gap: 18px;
  max-width: 920px;
  padding: clamp(22px, 4vw, 34px);
  border-top: 5px solid var(--pink);
  background:
    radial-gradient(circle at 96% 5%, rgba(243, 197, 31, 0.2), transparent 8rem),
    #fff;
}

.announcement-form-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.announcement-form-heading h3,
.announcement-form-heading p {
  margin: 0;
}

.announcement-form-heading p {
  color: var(--muted);
}

.announcement-bell {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--pink), #ef6aa7);
}

.announcement-bell svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.announcement-fieldset legend {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card > span {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.choice-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.choice-card input:checked + span {
  border-color: var(--brand);
  background: var(--brand-mist);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.choice-card input:focus-visible + span {
  outline: 3px solid rgba(8, 165, 163, 0.22);
  outline-offset: 2px;
}

.signature-choice > span {
  min-height: 68px;
  padding-left: 54px;
}

.signature-choice > span::before {
  content: "J!";
  position: absolute;
  left: 15px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 0.7rem;
  font-weight: 900;
}

.activity-recipient-select {
  margin-top: 2px;
}

.activity-recipient-select select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.announcement-history {
  max-width: 920px;
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.announcement-history-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.announcement-history-item > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.announcement-history-item > summary::-webkit-details-marker {
  display: none;
}

.announcement-history-item > summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.announcement-history-item summary small,
.announcement-history-body > small {
  color: var(--muted);
  font-size: 0.75rem;
}

.announcement-channel {
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--brand-deep);
  background: var(--brand-mist);
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
}

.announcement-channel.channel-email {
  color: #8a5b00;
  background: #fff6cf;
}

.announcement-channel.channel-both {
  color: #a51e5b;
  background: var(--pink-soft);
}

.announcement-recipient-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.announcement-history-body {
  display: grid;
  gap: 12px;
  padding: 4px 16px 16px 82px;
}

.announcement-history-body p {
  margin: 0;
}

.announcement-history-body form {
  width: fit-content;
}

.family-announcement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.family-announcement-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.family-announcement-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(var(--pink), var(--brand));
}

.family-announcement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

.family-announcement-card h3 {
  margin: 12px 0 7px;
}

.family-announcement-card p {
  margin: 0 0 14px;
  color: var(--ink);
}

.family-announcement-card > small {
  color: var(--muted);
}

.announcement-signature {
  width: fit-content;
  display: grid;
  gap: 1px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--pink-soft);
}

.announcement-signature strong {
  color: var(--brand-deep);
}

.announcement-signature span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-main {
  width: min(1240px, calc(100% - 32px));
  margin: 22px auto 0;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 84% 4%, rgba(215, 42, 120, 0.22), transparent 10rem),
    radial-gradient(circle at 94% 92%, rgba(243, 197, 31, 0.26), transparent 12rem),
    linear-gradient(125deg, var(--brand-deep), var(--brand));
  box-shadow: var(--shadow);
}

.dashboard-hero::after {
  content: "JA!";
  position: absolute;
  right: clamp(-2.5rem, -2vw, -1rem);
  top: 50%;
  color: rgba(255, 255, 255, 0.07);
  font-family: "Arial Rounded MT Bold", sans-serif;
  font-size: clamp(13rem, 26vw, 25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.14em;
  white-space: nowrap;
  transform: translateY(-50%) rotate(4deg);
}

.dashboard-hero > * {
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 800px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.dashboard-hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.dashboard-hero .eyebrow {
  color: #aef4ec;
}

.child-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.child-chips span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.81rem;
}

.section-nav {
  position: sticky;
  z-index: 10;
  top: 12px;
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 26px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(12px);
}

.section-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover {
  color: #fff;
  background: var(--brand);
}

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

.metric-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-small);
}

.metric-card:nth-child(2n) {
  transform: none;
}

.metric-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 1.3rem;
  font-weight: 900;
}

.metric-card:nth-child(2) .metric-icon {
  color: #9f2555;
  background: var(--pink-soft);
}

.metric-card:nth-child(3) .metric-icon {
  color: #826300;
  background: var(--yellow-soft);
}

#avisos .eyebrow,
#fotos .eyebrow {
  color: var(--pink);
}

#avisos .section-count,
#fotos .section-count {
  color: #9f2555;
  background: var(--pink-soft);
}

#calendari .eyebrow,
#calendaris-admin .eyebrow {
  color: #826300;
}

.metric-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.content-section {
  margin: 0 0 62px;
  scroll-margin-top: 92px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title h2,
.section-title p {
  margin-bottom: 0;
}

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

.update-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-small);
}

.update-card p {
  color: #506b6e;
}

.update-card small {
  color: var(--muted);
}

.update-featured {
  grid-column: span 2;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(7, 87, 92, 0.94), rgba(8, 165, 163, 0.91)),
    var(--brand);
}

.update-featured p,
.update-featured small {
  color: rgba(255, 255, 255, 0.8);
}

.update-featured .activity-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.update-meta time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.update-featured .update-meta time {
  color: rgba(255, 255, 255, 0.75);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  min-height: 275px;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--brand-soft);
  box-shadow: var(--shadow-small);
}

.photo-card:nth-child(5n + 1) {
  grid-column: span 2;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 275px;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 400ms ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(4, 42, 45, 0.88));
}

.photo-card figcaption {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 5px;
  padding: 20px;
  color: #fff;
}

.photo-card figcaption p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.photo-card .activity-tag {
  color: #fff;
  background: rgba(215, 42, 120, 0.78);
}

.two-column-sections {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 18px;
}

.two-column-sections > .content-section {
  padding: 26px;
}

.event-list,
.document-list {
  display: grid;
  gap: 11px;
}

.calendar-downloads {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.calendar-download {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(8, 165, 163, 0.22);
  border-radius: 17px;
  background: var(--brand-mist);
  text-decoration: none;
}

.calendar-download > span:last-child {
  display: grid;
}

.calendar-download small {
  color: var(--muted);
}

.event-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.event-item > time {
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  text-transform: uppercase;
}

.event-holiday > time {
  color: #826300;
  background: var(--yellow-soft);
}

.event-activity > time {
  color: #9f2555;
  background: var(--pink-soft);
}

.event-item time strong {
  font-size: 1.3rem;
  line-height: 1;
}

.event-item time span,
.event-item div > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-item h3,
.event-item p {
  margin-bottom: 0;
}

.event-item p {
  color: var(--muted);
  font-size: 0.85rem;
}

.document-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  text-decoration: none;
  transition: border 160ms ease, transform 160ms ease;
}

.document-row:hover {
  transform: translateX(3px);
  border-color: var(--brand);
}

.document-row > span:nth-child(2) {
  display: grid;
}

.document-row small {
  color: var(--muted);
}

.file-icon {
  width: 42px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--coral);
  font-size: 0.67rem;
  font-weight: 900;
}

.status-signed {
  color: #1c7257;
  background: #dff5ea;
}

.status-pending {
  color: #895b12;
  background: #fff0cc;
}

.absence-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(26px, 6vw, 80px);
  align-items: center;
  margin-bottom: 58px;
  padding: clamp(26px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 10% 20%, rgba(215, 42, 120, 0.11), transparent 14rem),
    linear-gradient(135deg, #fff8fb, #eefaf8);
}

.absence-panel > form {
  padding: 24px;
}

.sent-notices {
  margin-top: 22px;
}

.sent-notices summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.sent-notices p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state {
  padding: 35px;
  border: 1px dashed #bedbd8;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.empty-state.compact {
  padding: 18px;
  margin-top: 12px;
}

.empty-welcome {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0 54px;
  padding: 28px;
}

.empty-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  flex: 0 0 74px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 2rem;
  font-weight: 900;
}

.notice-grid {
  display: flex;
  gap: 12px;
  padding: 2px 2px 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(8, 165, 163, 0.35) transparent;
  scrollbar-width: thin;
}

.notice-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  flex: 0 0 min(390px, calc(100vw - 48px));
  min-height: 142px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  scroll-snap-align: start;
}

.notice-pending {
  border-color: #e85f93;
  box-shadow: inset 4px 0 #e85f93, var(--shadow-small);
}

.notice-reviewed {
  border-color: rgba(8, 165, 163, 0.55);
  box-shadow: inset 4px 0 var(--brand);
}

.notice-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notice-card-top .activity-tag {
  max-width: calc(100% - 78px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.notice-pending .notice-status {
  color: #9f2555;
  background: #ffe2ed;
}

.notice-reviewed .notice-status {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.notice-date {
  height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 14px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  line-height: 1;
  text-transform: uppercase;
}

.notice-date strong {
  font-size: 1.2rem;
}

.notice-date span {
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 900;
}

.notice-card h3 {
  margin: 7px 0 3px;
}

.notice-card p {
  display: -webkit-box;
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-card small {
  color: var(--muted);
}

.new-dot {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
}

.class-list-grid {
  display: grid;
  gap: 12px;
}

.class-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.class-card > summary,
.management-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.class-card > summary::-webkit-details-marker,
.management-card > summary::-webkit-details-marker {
  display: none;
}

.class-card > summary > span:first-child,
.management-card > summary > span:nth-child(2) {
  display: grid;
}

.class-card summary small,
.management-card summary small {
  color: var(--muted);
}

.student-count {
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.attendance-cycle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.attendance-cycle > small {
  color: var(--muted);
  font-size: 0.76rem;
}

.attendance-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.attendance-status svg {
  width: 14px;
  height: 14px;
}

.attendance-status-passed {
  color: var(--success);
  background: rgba(44, 148, 114, 0.12);
}

.attendance-status-pending {
  color: #987300;
  background: var(--yellow-soft);
}

.attendance-form {
  padding: 4px 20px 22px;
  border-top: 1px solid var(--line);
}

.date-field {
  max-width: 280px;
  margin-top: 18px;
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.student-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.student-row > span:nth-child(2) {
  display: grid;
}

.student-row small {
  color: var(--muted);
}

.management-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.child-care-flags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.care-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.care-allergy-yes,
.care-image-internal {
  color: #705600;
  border-color: #ecd560;
  background: var(--yellow-soft);
}

.care-allergy-none,
.care-image-all {
  color: var(--brand-deep);
  border-color: #b9e8e3;
  background: var(--brand-soft);
}

.care-image-none {
  color: #8f174e;
  border-color: #f2bad2;
  background: var(--pink-soft);
}

.care-allergy-unknown,
.care-image-unknown {
  color: #5d7072;
  border-color: var(--line);
  background: #f3f7f6;
}

.avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.attendance-check {
  width: 25px;
  min-height: 25px;
  accent-color: var(--brand);
}

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

.form-columns > form {
  padding: 24px;
}

.file-field {
  padding: 14px;
  border: 1px dashed #b4d8d4;
  border-radius: 15px;
  background: var(--brand-mist);
}

.file-field input {
  min-height: auto;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.simple-table {
  display: grid;
  gap: 0;
}

.simple-table > div {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) minmax(100px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 5px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.simple-table > div:last-child {
  border-bottom: 0;
}

.simple-table span {
  color: var(--muted);
}

.admin-overview-grid {
  margin: 0 0 54px;
}

.overview-card {
  padding: 24px;
}

.big-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.big-numbers div {
  display: grid;
  padding: 15px;
  border-radius: 16px;
  background: var(--brand-mist);
}

.big-numbers strong {
  color: var(--brand-deep);
  font-size: 2rem;
}

.big-numbers span,
.progress-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-list p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.management-card {
  height: fit-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.management-card[open] {
  border-color: rgba(8, 165, 163, 0.45);
}

.management-card.revenue-card {
  border-color: rgba(243, 197, 31, 0.62);
  background: linear-gradient(135deg, #fffdf4 0%, #ffffff 42%);
}

.management-card.revenue-card[open] {
  border-color: var(--yellow);
}

.pending-family-group {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 253, 252, 0.72);
}

.pending-family-group[open] {
  background: #fff;
}

.pending-family-group > summary {
  padding: 13px 15px;
}

.pending-family-group > summary strong {
  color: var(--brand-deep);
}

.revenue-card .management-icon {
  color: #8c6b00;
  background: var(--yellow-soft);
}

.revenue-card > summary::after {
  color: #9b7500;
}

.revenue-selector {
  display: grid;
  gap: 12px;
}

.revenue-selection-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(243, 197, 31, 0.48);
  border-radius: 14px;
  background: #fffdf3;
}

.revenue-selection-total > span {
  color: var(--muted);
}

.revenue-selection-total strong {
  color: #856400;
  white-space: nowrap;
}

.revenue-table {
  display: grid;
  gap: 8px;
}

.revenue-table .revenue-row {
  display: block;
  cursor: pointer;
}

.revenue-row-copy > strong .revenue-checkbox {
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  margin: 0 6px 0 0 !important;
  padding: 0 !important;
  vertical-align: -2px;
  border: 1.5px solid #b58a00;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.revenue-row-copy > strong .revenue-checkbox::after {
  content: '';
  width: 8px;
  height: 4px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transition: transform 120ms ease;
}

.revenue-row-copy > strong .revenue-checkbox:checked {
  background: #b58a00;
}

.revenue-row-copy > strong .revenue-checkbox:checked::after {
  transform: rotate(-45deg) scale(1);
}

.revenue-row-copy {
  display: grid;
  gap: 3px;
}

.management-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.management-card-link:hover,
.management-card-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(8, 165, 163, 0.52);
  box-shadow: 0 16px 32px rgba(7, 83, 86, 0.12);
}

.management-card-link::after {
  content: "\2192";
  margin-left: auto;
  color: var(--brand);
  font-size: 1.45rem;
  font-weight: 900;
}

.management-card-link-copy {
  display: grid;
  gap: 2px;
}

.management-card-link-copy small {
  color: var(--muted);
}

.payment-control-card {
  grid-column: 1 / -1;
}

.payment-list {
  display: grid;
  gap: 7px;
}

.payment-family-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}

.payment-family-item > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

.payment-family-item > summary::-webkit-details-marker {
  display: none;
}

.payment-family-item > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 800;
}

.payment-family-item[open] > summary::after {
  content: "−";
}

.payment-family {
  min-width: 0;
}

.payment-family strong,
.payment-family small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-family small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}

.payment-family small em {
  color: var(--brand-deep);
  font-style: normal;
  font-weight: 800;
}

.payment-progress {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #8a6500;
  background: var(--yellow-soft, #fff5cf);
  font-size: .76rem;
  font-weight: 800;
}

.payment-progress.is-complete {
  color: #087a70;
  background: var(--brand-soft);
}

.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}

.payment-months {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 6px;
  width: 100%;
}

.payment-check {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  padding: 5px 7px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft, #f5faf9);
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease;
}

.payment-check span {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.payment-check em {
  color: var(--muted);
  font-size: .66rem;
  font-style: normal;
  font-weight: 700;
}

.payment-check:hover,
.payment-check:focus-within {
  background: var(--brand-soft);
}

.payment-check input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.payment-check:has(input:checked) {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.payment-insurance {
  color: #8a6500;
  background: var(--yellow-soft, #fff5cf);
}

.attendance-note-field {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  color: var(--brand-deep);
  font-size: .82rem;
  font-weight: 800;
}

.attendance-note-field textarea {
  min-height: 58px;
  padding: 10px 12px;
  resize: vertical;
}

.attendance-session-notes {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow, #f6c515);
  border-radius: 10px;
  background: var(--yellow-soft, #fff5cf);
}

.attendance-session-notes summary {
  color: var(--brand-deep);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 800;
}

.attendance-session-notes p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: .86rem;
  line-height: 1.45;
}

.status-note {
  color: #8a6500;
  background: var(--yellow-soft, #fff5cf);
}

@media (max-width: 700px) {
  .payment-control-card {
    grid-column: auto;
  }

  .payment-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .payment-months {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }
}

.management-card > summary {
  justify-content: flex-start;
}

.management-card > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--brand);
  font-size: 1.5rem;
}

.management-card[open] > summary::after {
  content: "−";
}

.management-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  border-radius: 14px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 900;
}

.management-card > form,
.management-card > .nested-forms {
  padding: 2px 20px 22px;
  border-top: 1px solid var(--line);
}

.nested-forms {
  display: grid;
  gap: 22px;
}

.nested-forms > form {
  padding-top: 18px;
}

.subform {
  padding-top: 20px !important;
  border-top: 1px dashed var(--line);
}

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

.directory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-grid > article {
  min-width: 0;
  padding: 22px;
}

.directory-grid .simple-table > div {
  grid-template-columns: 1fr;
  gap: 2px;
}

.dashboard-file-details {
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}

.dashboard-file-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
  background: var(--brand-mist);
}

.dashboard-file-details > summary::-webkit-details-marker {
  display: none;
}

.dashboard-file-details > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.dashboard-file-details > summary small {
  color: var(--muted);
}

.dashboard-file-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-deep);
  background: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.dashboard-file-details[open] .dashboard-file-toggle {
  transform: rotate(45deg);
  background: var(--brand-soft);
}

.dashboard-file-list {
  max-height: 360px;
  padding: 11px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--brand-soft) transparent;
}

.app-footer {
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 36px auto 22px;
  padding: 24px;
  border-top: 1px solid var(--line);
}

.app-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-footer img {
  width: 54px;
  height: 54px;
}

.app-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: none;
}

.instagram-link svg {
  width: 25px;
}

.toast {
  position: fixed;
  z-index: 100;
  top: 24px;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid rgba(8, 165, 163, 0.25);
  border-radius: 999px;
  color: var(--brand-deep);
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
  transform: translateX(-50%);
  transition: opacity 300ms ease, transform 300ms ease;
}

.toast > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
}

.alert-error {
  color: #913e31;
  border-color: rgba(236, 120, 95, 0.35);
}

.alert-error > span {
  background: var(--coral);
}

.toast-hide {
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
}

.password-shell {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
  padding: 48px 0 72px;
}

.password-card {
  width: min(620px, 100%);
  padding: clamp(26px, 5vw, 48px);
}

.password-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.password-copy {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.password-card .stack-form {
  margin-top: 26px;
}

.password-tips {
  padding: 16px 18px;
  border: 1px solid rgba(8, 165, 163, 0.2);
  border-radius: 16px;
  color: var(--muted);
  background: var(--brand-mist);
}

.password-tips strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-deep);
}

.password-tips ul {
  margin: 0;
  padding-left: 20px;
}

.password-tips li + li {
  margin-top: 5px;
}

.password-tips li::marker {
  color: var(--brand);
}

.password-cancel {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
  text-decoration: none;
}

.login-recovery-link {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  color: var(--brand-deep);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.login-recovery-link:hover,
.login-recovery-link:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

.year-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-switcher label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.year-switcher select {
  width: auto;
  min-height: 38px;
  padding: 7px 32px 7px 12px;
  border-radius: 999px;
  color: var(--brand-deep);
  background-color: var(--brand-mist);
  font-size: 0.82rem;
  font-weight: 800;
}

.year-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-mist);
  font-size: 0.82rem;
  font-weight: 900;
}

.archive-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin: -14px 0 24px;
  padding: 13px 18px;
  border: 1px solid #f0c993;
  border-radius: 16px;
  color: #77511f;
  background: #fff8e9;
}

.year-management-card {
  grid-column: 1 / -1;
}

.year-manager-body {
  display: grid;
  gap: 24px;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.year-history {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.year-pill {
  display: grid;
  min-width: 116px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--brand-deep);
  background: #fff;
  text-decoration: none;
}

.year-pill small {
  color: var(--muted);
}

.year-pill.is-selected {
  border-color: var(--brand);
  background: var(--brand-mist);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.rollover-form {
  display: grid;
  gap: 22px;
}

.rollover-intro h3 {
  margin-bottom: 6px;
  font-size: 1.55rem;
}

.rollover-intro p:last-child {
  margin: 0;
  color: var(--muted);
}

.rollover-list {
  display: grid;
  gap: 9px;
}

.rollover-child {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr);
  gap: 14px;
  align-items: end;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--brand-mist);
}

.rollover-check,
.copy-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rollover-check input,
.copy-option input {
  width: 21px;
  min-height: 21px;
  height: 21px;
  flex: 0 0 21px;
  padding: 0;
  accent-color: var(--brand);
}

.rollover-check span,
.copy-option span {
  display: grid;
}

.rollover-check small,
.copy-option small {
  color: var(--muted);
}

.rollover-class {
  font-size: 0.76rem;
}

.rollover-class input {
  margin-top: 5px;
  background: #fff;
}

.copy-option {
  padding: 15px;
  border: 1px solid rgba(8, 165, 163, 0.25);
  border-radius: 16px;
}

.rollover-warning,
.archive-note {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid #f0c993;
  border-radius: 16px;
  color: #77511f;
  background: #fff8e9;
}

.archive-note p {
  margin: 0 0 8px;
}

.archive-note .button {
  justify-self: start;
}

.child-course-list {
  display: grid;
  gap: 10px;
}

.child-course-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 0.8fr) minmax(110px, 0.65fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--brand-mist);
}

.child-course-form > strong {
  align-self: center;
}

.child-course-form label {
  font-size: 0.75rem;
}

.child-course-form input,
.child-course-form select {
  min-height: 42px;
  margin-top: 4px;
  padding-top: 8px;
  padding-bottom: 8px;
  background-color: #fff;
}

.status-active {
  color: #11634e;
  background: #e3f5ee;
}

.status-withdrawn,
.status-completed {
  color: #77511f;
  background: #fff0d8;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 620px) {
  .year-switcher label {
    display: none;
  }

  .year-switcher select {
    max-width: 124px;
    padding-right: 24px;
    font-size: 0.72rem;
  }

  .year-chip {
    padding: 6px 9px;
    font-size: 0.72rem;
  }

  .archive-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .year-manager-body {
    padding: 16px;
  }

  .rollover-child,
  .child-course-form {
    grid-template-columns: 1fr;
  }
}

/* Attendance archive v16 */
.archive-intro {
  max-width: 780px;
  margin: -8px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.attendance-activity-list,
.attendance-session-list {
  display: grid;
  gap: 14px;
}

.attendance-activity-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 14px 36px rgba(4, 83, 87, 0.08);
}

.attendance-activity-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.attendance-activity-card > summary::-webkit-details-marker {
  display: none;
}

.attendance-activity-card > summary > span:first-child {
  display: grid;
  gap: 4px;
}

.attendance-activity-card > summary strong {
  font-size: 1.08rem;
}

.attendance-activity-card > summary small,
.attendance-session-heading p,
.attendance-student-preview small {
  color: var(--muted);
}

.attendance-activity-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  white-space: nowrap;
}

.attendance-activity-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--line);
}

.attendance-activity-actions {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0;
}

.attendance-session-card {
  padding: 18px;
  border: 1px solid rgba(8, 165, 163, 0.2);
  border-radius: 19px;
  background: #fbfefe;
}

.attendance-session-card.is-editing {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 165, 163, 0.09);
}

.attendance-session-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.attendance-session-heading h3,
.attendance-session-heading p {
  margin: 0;
}

.attendance-session-heading p {
  margin-top: 4px;
  font-size: 0.84rem;
}

.attendance-date-badge {
  width: 54px;
  height: 58px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-dark), var(--brand));
}

.attendance-date-badge strong {
  font-size: 1.2rem;
  line-height: 1;
}

.attendance-date-badge span {
  margin-top: 3px;
  font-size: 0.68rem;
}

.attendance-totals,
.attendance-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.attendance-session-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.attendance-session-details > summary {
  padding: 13px 0;
  color: var(--brand-deep);
  font-weight: 800;
  cursor: pointer;
}

.attendance-student-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 12px;
}

.attendance-student-preview > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff8f7;
}

.attendance-student-preview > div > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.attendance-result {
  flex: 0 0 auto;
  font-size: 0.78rem;
}

.attendance-result-present {
  color: #08766f;
}

.attendance-result-absent {
  color: #a83c35;
}

.attendance-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.attendance-actions form {
  margin: 0;
}

.attendance-edit-form {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.button-danger {
  color: #a5342f;
  border: 1px solid rgba(165, 52, 47, 0.25);
  background: #fff4f2;
}

.button-danger:hover {
  color: #fff;
  background: #a5342f;
}

@media (max-width: 720px) {
  .attendance-activity-card > summary,
  .attendance-activity-body {
    padding-left: 15px;
    padding-right: 15px;
  }

  .attendance-session-card {
    padding: 14px;
  }

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

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

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

  .attendance-actions {
    justify-content: stretch;
  }

  .attendance-actions .button,
  .attendance-actions form,
  .attendance-actions form .button {
    width: 100%;
  }
}

.setup-page {
  padding: 40px 16px;
}

.setup-shell {
  width: min(820px, 100%);
  margin: 0 auto;
}

.setup-intro {
  text-align: center;
}

.setup-logo {
  width: 115px;
  margin: 0 auto 15px;
}

.setup-intro h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
}

.setup-intro > p:last-child {
  max-width: 580px;
  margin: 0 auto 25px;
  color: var(--muted);
}

.setup-form {
  display: grid;
  gap: 30px;
  padding: clamp(22px, 5vw, 42px);
}

.setup-form section {
  position: relative;
}

.setup-form h2 {
  padding-left: 42px;
  font-size: 1.35rem;
}

.step-number {
  position: absolute;
  top: -3px;
  left: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.span-2 {
  grid-column: span 2;
}

.setup-page .alert {
  margin: 0 0 18px;
  padding: 13px 18px;
  border: 1px solid rgba(236, 120, 95, 0.4);
  border-radius: 14px;
  color: #913e31;
  background: #fff5f2;
}

@media (max-width: 900px) {
  .login-shell,
  .two-column-sections,
  .absence-panel {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: auto;
    padding: clamp(36px, 8vw, 58px);
    border-radius: 36px;
  }

  .login-story h1 {
    font-size: clamp(2.7rem, 11vw, 4.5rem);
  }

  .story-card {
    max-width: 100%;
  }

  .login-card {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .updates-grid,
  .photo-grid,
  .management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .update-featured {
    grid-column: span 2;
  }

  .photo-card:nth-child(5n + 1) {
    grid-column: auto;
  }

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

@media (max-width: 620px) {
  .public-main,
  .app-main,
  .app-header,
  .app-footer {
    width: min(100% - 20px, 1240px);
  }

  .public-main {
    padding-top: 12px;
  }

  .login-page .public-main {
    width: min(100% - 20px, 1360px);
  }

  .login-story {
    padding: 30px 22px;
    border-radius: 28px;
  }

  .hero-logo {
    width: 82px;
    height: 82px;
    margin-bottom: 22px;
    border-radius: 23px;
  }

  .story-card {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .story-note {
    display: none;
  }

  .story-photo {
    min-height: 180px;
  }

  .login-card {
    border-radius: 28px;
  }

  .login-card-heading {
    padding: 24px 22px 20px;
  }

  .login-card-body {
    padding: 22px;
  }

  .app-header {
    height: 72px;
    margin-top: 8px;
    border-radius: 18px;
  }

  .app-brand img {
    width: 52px;
    height: 52px;
  }

  .app-brand small,
  .user-name,
  .header-user .role-chip {
    display: none;
  }

  .header-user {
    gap: 6px;
  }

  .notification-popover {
    position: fixed;
    top: 88px;
    right: 10px;
  }

  .choice-grid-two,
  .choice-grid-three,
  .family-announcement-list {
    grid-template-columns: 1fr;
  }

  .announcement-history-item > summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .announcement-recipient-count {
    grid-column: 2;
  }

  .announcement-history-body {
    padding-left: 16px;
  }

  .dashboard-hero {
    min-height: 290px;
    display: grid;
    align-content: end;
    padding: 26px 22px;
    border-radius: 26px;
  }

  .dashboard-hero h1 {
    font-size: 2.35rem;
  }

  .section-nav {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  .metric-grid,
  .metric-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 42px;
  }

  .metric-card {
    gap: 9px;
    padding: 13px;
  }

  .metric-card:nth-child(2n) {
    transform: none;
  }

  .metric-icon {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .metric-card strong {
    font-size: 1.25rem;
  }

  .metric-card small {
    display: block;
    font-size: 0.7rem;
  }

  .content-section {
    margin-bottom: 46px;
  }

  .section-title {
    align-items: flex-start;
  }

  .section-count,
  .privacy-badge {
    display: none;
  }

  .updates-grid,
  .photo-grid,
  .notice-grid,
  .form-columns,
  .admin-overview-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .update-featured {
    grid-column: auto;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-card,
  .photo-card img {
    min-height: 220px;
  }

  .photo-card figcaption {
    padding: 13px;
  }

  .photo-card figcaption p {
    display: none;
  }

  .two-column-sections > .content-section {
    padding: 18px;
  }

  .document-row {
    grid-template-columns: auto 1fr;
  }

  .document-row .status {
    display: none;
  }

  .absence-panel {
    padding: 24px 16px;
    border-radius: 25px;
  }

  .student-list {
    grid-template-columns: 1fr;
  }

  .simple-table > div {
    grid-template-columns: 1fr auto;
  }

  .simple-table > div > span:nth-child(n + 3) {
    display: none;
  }

  .big-numbers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .big-numbers div {
    padding: 10px;
  }

  .big-numbers strong {
    font-size: 1.5rem;
  }

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

  .span-2 {
    grid-column: auto;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .billing-layout { grid-template-columns: 1fr; }
  .billing-sidebar { position: static; }
  .billing-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .billing-sidebar-note { display: none; }
  .billing-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .billing-topbar { align-items: flex-start; flex-direction: column; }
  .billing-actions { justify-content: flex-start; }
  .billing-main-grid, .billing-section-grid { grid-template-columns: 1fr; }
  .billing-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-filter, .billing-inline-upload { align-items: stretch; flex-direction: column; }
  .billing-filter select { width: auto; }
  .reader-controls { align-items: flex-start; flex-direction: column; }
  .header-billing-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Worker dashboard: compact panels and quick student cards. */
.worker-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-small);
}

.worker-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.worker-panel-summary::-webkit-details-marker { display: none; }
.worker-panel-summary > span:first-child { display: grid; gap: 3px; }
.worker-panel-summary p { margin: 0 0 1px; }
.worker-panel-summary h2 { margin: 0; }
.worker-panel-summary small { color: var(--muted); }
.worker-panel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: .78rem;
  font-weight: 850;
}
.worker-panel-meta.has-pending { color: #a4582b; background: var(--yellow-soft); }
.worker-panel-meta b { font-size: 1.1rem; line-height: 1; transition: transform 180ms ease; }
.worker-panel[open] .worker-panel-meta b { transform: rotate(45deg); }
.worker-panel-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.worker-panel-toolbar { display: flex; justify-content: flex-end; min-height: 16px; padding-top: 16px; }

.student-entry {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}
.student-entry .student-row { border: 0; border-radius: 0; }
.student-quick-profile { border-top: 1px solid rgba(8, 165, 163, .15); }
.student-quick-profile > summary {
  display: flex;
  justify-content: space-between;
  padding: 8px 11px;
  color: var(--brand-deep);
  background: #f5fbfa;
  cursor: pointer;
  list-style: none;
  font-size: .76rem;
  font-weight: 850;
}
.student-quick-profile > summary::-webkit-details-marker { display: none; }
.student-quick-profile > summary span { font-size: 1rem; line-height: .8; }
.student-quick-profile[open] > summary span { transform: rotate(45deg); }
.student-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 11px 12px;
  background: #fbfefe;
}
.student-quick-grid span { display: grid; gap: 2px; min-width: 0; }
.student-quick-grid small { color: var(--muted); font-size: .68rem; }
.student-quick-grid strong { overflow-wrap: anywhere; font-size: .76rem; }

@media (max-width: 620px) {
  .worker-panel-summary { align-items: flex-start; padding: 17px 15px; }
  .worker-panel-summary h2 { font-size: 1.35rem; }
  .worker-panel-meta { padding: 7px 9px; }
  .worker-panel-body { padding: 0 15px 16px; }
  .student-quick-grid { grid-template-columns: 1fr; }
}


/* Admin calendar visibility v9 */
.progress-list .progress-row-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.progress-list .progress-row-link:hover strong {
  color: var(--brand);
}

.admin-calendar-card {
  margin-bottom: 16px;
  padding: 22px;
  scroll-margin-top: 92px;
}

.admin-calendar-card .event-list {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Child editor and multi-activity assignment */
.child-editor-list {
    display: grid;
    gap: 14px;
}

.child-editor-list > h3,
.child-editor-list > .form-hint {
    margin: 0;
}

.child-editor-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.child-editor-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.child-editor-card > summary::-webkit-details-marker {
    display: none;
}

.child-editor-card > summary > span:first-child {
    display: grid;
    gap: 4px;
}

.child-editor-card > summary small {
    color: var(--muted);
}

.child-activity-count {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
}

.child-editor-form {
    padding: 18px;
    border-top: 1px solid var(--line);
    background: #fbfefe;
}

.child-editor-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.child-editor-main .full-span {
    grid-column: 1 / -1;
}

.child-activity-picker {
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.child-activity-picker legend {
    padding: 0 7px;
    font-weight: 900;
}

.activity-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.activity-choice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--soft);
    cursor: pointer;
}

.activity-choice:has(input:checked) {
    border-color: var(--brand);
    background: #e6f8f7;
    box-shadow: 0 0 0 2px rgba(8, 165, 163, .1);
}

.activity-choice input {
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--brand);
}

.activity-choice span {
    display: grid;
    gap: 3px;
}

.activity-choice small {
    color: var(--muted);
}

@media (max-width: 700px) {
    .child-editor-main,
    .activity-choice-grid {
        grid-template-columns: 1fr;
    }

    .child-editor-card > summary {
        align-items: flex-start;
    }

    .child-activity-count {
        white-space: nowrap;
    }
}

/* Administration editors v18 */
.admin-editor-list {
  display: grid;
  gap: 12px;
}

.admin-editor-list > h3,
.admin-editor-list > .form-hint {
  margin: 0;
}

.admin-editor-card[open] {
  border-color: rgba(8, 165, 163, 0.48);
  box-shadow: 0 12px 30px rgba(4, 83, 87, 0.08);
}

.admin-editor-body {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fbfefe;
}

.admin-editor-body > .stack-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.reactivation-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.reactivation-form small {
  color: var(--muted);
}

.admin-file-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(165, 52, 47, 0.25);
}

.danger-zone small {
  color: var(--muted);
  line-height: 1.4;
}

.notice-editor {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.notice-editor > summary {
  padding: 10px 0 0;
  color: var(--brand-dark);
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
}

.notice-editor .admin-editor-body {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

@media (max-width: 700px) {
  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }
}
/* Mobile app install v12 */
.install-app-button {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  margin-top: 16px;
  padding: 11px 15px;
  border: 1px solid rgba(8, 165, 163, 0.24);
  border-radius: 20px;
  color: var(--brand-deep);
  background:
    linear-gradient(135deg, rgba(8, 165, 163, 0.14), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: 0 12px 28px rgba(4, 83, 87, 0.09);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.install-app-button:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 16px 34px rgba(4, 83, 87, 0.14);
}

.install-app-button > span:last-child {
  display: grid;
  gap: 3px;
}

.install-app-button strong {
  font-size: 0.95rem;
}

.install-app-button small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.install-app-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 9px 20px rgba(8, 165, 163, 0.22);
}

.install-app-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.install-status {
  margin: 12px 0 0;
  padding: 10px 13px;
  border-radius: 13px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.install-app-button[hidden],
.install-status[hidden],
.install-guide[hidden] {
  display: none !important;
}

.install-dialog {
  width: min(470px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgba(4, 55, 59, 0.28);
}

.install-dialog:not([open]) {
  display: none;
}

.install-dialog::backdrop {
  background: rgba(7, 42, 45, 0.56);
  backdrop-filter: blur(5px);
}

.install-dialog-card {
  padding: clamp(22px, 5vw, 34px);
}

.install-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.install-dialog-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.15rem);
}

.install-dialog-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.install-guide {
  display: grid;
  gap: 12px;
}

.install-guide p {
  margin: 0;
  color: var(--muted);
}

.install-guide ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.install-guide li::marker {
  color: var(--brand);
  font-weight: 900;
}

.install-tip {
  margin: 20px 0;
  padding: 13px 15px;
  border-radius: 14px;
  color: var(--brand-deep);
  background: #eef9f8;
  font-size: 0.86rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  .login-card {
    order: -1;
  }

  .login-story {
    order: 1;
  }
}

@media (max-width: 620px) {
  .install-app-button {
    min-height: 68px;
  }

  .install-dialog {
    width: calc(100% - 18px);
    border-radius: 22px;
  }
}
