.login-page,
.family-body,
.report-page,
.product-body,
.landing-body {
  min-height: 100vh;
  background: #f6f9fc;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.landing-brand img {
  display: block;
  width: min(230px, 54vw);
}

.landing-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--navy);
  font-weight: 800;
}

.landing-header button,
.landing-actions button,
.landing-cta button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.landing-hero {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.7fr);
  gap: clamp(28px, 5vw, 54px);
  align-items: center;
  padding: clamp(34px, 6vw, 58px) 0 clamp(42px, 6vw, 64px);
}

.landing-copy h1 {
  margin: 0;
  color: var(--navy);
  max-width: 760px;
  font-size: clamp(2.05rem, 4.2vw, 3.55rem);
  line-height: 1.08;
}

.landing-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.landing-actions .secondary {
  color: var(--navy);
  background: var(--green-2);
}

.landing-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.landing-points span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: white;
  font-weight: 800;
}

.landing-preview,
.phone-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.landing-preview {
  padding: 14px;
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  color: white;
  background: var(--navy);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.preview-stats article,
.preview-list p,
.phone-mini p {
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.preview-stats span,
.preview-list span,
.phone-mini span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.preview-stats strong,
.preview-list strong,
.phone-mini strong {
  display: block;
  color: var(--navy);
  font-size: 1.08rem;
}

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

.landing-section,
.landing-band,
.landing-cta {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 6vw, 62px) 0;
}

.landing-section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.landing-section h2,
.landing-band h2,
.landing-cta h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  line-height: 1.1;
}

.landing-band p,
.landing-cta p {
  color: var(--muted);
  font-size: 1.08rem;
}

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

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

.landing-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.landing-grid strong {
  display: block;
  color: var(--navy);
  font-size: 1.12rem;
}

.landing-grid span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.landing-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.phone-mini {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.landing-cta {
  text-align: center;
}

.landing-cta p {
  max-width: 650px;
  margin: 14px auto 22px;
}

.login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
  background: #f6f9fc;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.login-card .login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.login-card h1,
.login-card p {
  text-align: center;
}

.login-card h1 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}

.login-card p {
  margin: 10px 0 0;
}

.login-card .login-form {
  margin-top: 18px;
}

.login-card .login-form button {
  margin-top: 8px;
}

.login-card .form-success,
.login-card .form-error {
  text-align: left;
}

.login-card .link-button {
  margin: 0 auto;
}

/* Legacy login shell kept harmless for older cached markup. */
.login-layout.legacy {
  display: grid;
  grid-template-columns: minmax(0, 520px) 1fr;
  min-height: 100vh;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 62px);
  background: white;
  border-right: 1px solid var(--line);
}

.login-logo img,
.family-header img,
.public-topbar img,
.product-brand img {
  width: 230px;
  max-width: 100%;
  height: auto;
}

.login-panel h1,
.family-hero h1,
.public-report h1,
.product-topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  line-height: 1.1;
}

.product-topbar h1 {
  font-size: clamp(1.45rem, 2.35vw, 2.05rem);
}

.login-panel p,
.family-hero p,
.public-report p,
.muted {
  color: var(--muted);
}

.login-form,
.report-submit,
.compose-form {
  display: grid;
  gap: 14px;
}

.login-form {
  margin-top: 22px;
}

.login-form button,
.report-submit button,
.compose-form button,
.wide-button,
.action-grid button,
.card-head button,
.product-action,
.family-card button,
.link-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  cursor: pointer;
  font-weight: 800;
}

.link-button {
  min-height: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: var(--navy);
  font-weight: 800;
}

.login-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 7vw, 84px);
  color: white;
  background: linear-gradient(135deg, var(--navy), #0e6544);
}

.login-aside h2 {
  max-width: 620px;
  margin: 0 0 28px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
}

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

.login-benefits span {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.product-body {
  display: grid;
  grid-template-columns: 278px 1fr;
}

.product-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  color: white;
  background: var(--navy);
}

.product-brand {
  display: block;
}

.product-sidebar strong {
  display: block;
  margin-top: -6px;
  margin-bottom: 10px;
  font-size: 1.08rem;
  text-align: center;
}

.product-sidebar nav {
  display: grid;
  gap: 7px;
}

.sidebar-bottom {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.product-sidebar form:has(.logout-link) {
  margin-top: auto;
}

.product-sidebar button,
.logout-link {
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}

.product-sidebar button.active,
.product-sidebar button:hover,
.logout-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.logout-link {
  width: 100%;
}

.product-main {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.product-topbar,
.family-header,
.public-topbar,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-topbar {
  margin-bottom: 24px;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-left: auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.button-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.topbar-action.open .button-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.sidebar-toggle {
  display: none;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  font-weight: 800;
}

.product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.product-section {
  display: none;
}

.product-section.active {
  display: block;
}

.work-grid,
.split-grid,
.invoice-grid,
.settings-grid,
.family-grid,
.children-grid {
  display: grid;
  gap: 16px;
}

.invoice-grid,
.family-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.work-grid,
.split-grid,
.settings-grid,
.children-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-grid article,
.invoice-grid article,
.settings-grid article,
.family-card,
.children-grid article,
.workspace-card,
.product-section > .data-table {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
}

.kpi-grid article {
  padding: 14px;
}

.kpi-grid span,
.invoice-grid span,
.family-card span,
.settings-grid span,
.children-grid span,
.children-grid small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.kpi-grid strong,
.invoice-grid strong,
.family-card strong,
.settings-grid strong,
.children-grid strong {
  display: block;
  color: var(--navy);
  font-size: 2rem;
  line-height: 1.1;
  margin: 8px 0;
}

.kpi-grid strong {
  font-size: 1.45rem;
  margin: 5px 0;
}

.kpi-grid small {
  color: var(--muted);
  font-weight: 700;
}

.settings-grid strong,
.children-grid strong {
  font-size: 1.2rem;
}

.soft-warning,
.family-card.highlight {
  background: var(--yellow) !important;
  border-color: #f0db9e !important;
}

.work-grid,
.split-grid,
.invoice-grid,
.settings-grid,
.data-table,
.workspace-card,
.children-section,
.todo-section {
  margin-top: 18px;
}

.workspace-card h2,
.workspace-card h3,
.card-head h2,
.children-section h2,
.todo-section h2 {
  margin: 0;
  color: var(--navy);
}

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

.todo-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.todo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.todo-card-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.todo-card-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  background: var(--green);
}

.todo-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.todo-list p {
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfd;
}

.todo-list span,
.todo-list strong {
  display: block;
}

.todo-list span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.todo-list strong {
  margin-top: 3px;
  color: var(--navy);
}

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

.action-grid button,
.wide-button.light,
.card-head button,
.family-card button {
  color: var(--navy);
  background: var(--green-2);
}

.wide-button {
  width: 100%;
  margin-top: 14px;
}

.kpi-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.kpi-line span {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
}

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

.simple-list p {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.simple-list span {
  display: block;
  color: var(--muted);
}

.canteen-calendar-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
}

.canteen-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  color: var(--navy);
}

.canteen-month-bar h3 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  line-height: 1.1;
  text-transform: capitalize;
}

.section-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.month-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-controls label {
  display: grid;
  min-width: 190px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.month-controls input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.month-controls button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: #f8fbfd;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.month-controls button:hover {
  border-color: #c6d4e2;
  background: var(--soft);
  transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-weekdays {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-weekdays span {
  padding: 0 2px 2px;
}

.calendar-grid {
  padding: 0;
}

.calendar-cell {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  min-height: 82px;
  padding: 8px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #f3f6fa;
  cursor: pointer;
  font: inherit;
}

.calendar-cell:hover {
  border-color: #b8c7d9;
  transform: translateY(-1px);
}

.calendar-cell.weekend {
  background: #eef3f8;
}

.calendar-cell.red-day {
  background: #eef3f8;
  border-color: #d4dde8;
}

.calendar-cell.has-service {
  background: #fff8dc;
  border-color: #ead05f;
  box-shadow: inset 0 0 0 2px rgba(227, 174, 28, 0.14);
}

.calendar-cell.red-reservable {
  background: #fff3bf;
  border-color: #d39e00;
  box-shadow: inset 0 0 0 2px rgba(211, 158, 0, 0.2);
}

.calendar-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--soft);
  font-weight: 900;
}

.calendar-cell em {
  display: block;
  margin-top: 7px;
  color: #91a0b4;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 700;
}

.red-day-label {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #475569;
  background: #e2e8f0;
  font-size: 0.64rem;
  font-weight: 900;
}

.calendar-service {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.calendar-service strong {
  color: var(--navy);
  font-size: 0.78rem;
  line-height: 1.25;
}

.calendar-service small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.calendar-service .calendar-warning {
  color: #7a4d00;
}

.calendar-badge {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: #7a4d00;
  background: #ffeaa3;
  font-size: 0.64rem;
  font-weight: 900;
}

.calendar-badge.locked {
  color: #475569;
  background: #e2e8f0;
}

.canteen-tools {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.canteen-tools .workspace-card {
  margin-top: 0;
}

.form-hint {
  display: block;
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.red-day-alert {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #e3c15a;
  border-radius: 12px;
  color: #7a4d00;
  background: var(--yellow);
  font-weight: 900;
}

.red-day-alert.visible {
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 22px 22px calc(278px + 22px);
  background: rgba(9, 30, 66, 0.42);
}

.modal-overlay.hidden {
  display: none;
}

.canteen-day-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  margin: 0;
}

.canteen-day-modal .field-no-title {
  gap: 0;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  margin: 0;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: #f8fbfd;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.icon-button:hover {
  border-color: #c6d4e2;
  background: var(--soft);
  transform: translateY(-1px);
}

.icon-button span,
.icon-button span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon-button span {
  transform: rotate(45deg);
}

.icon-button span::after {
  content: "";
  transform: rotate(90deg);
}

.data-table {
  overflow-x: auto;
}

.data-table .table-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  align-items: center;
  min-width: 720px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.reports-table .table-row {
  grid-template-columns: 1.1fr 1.2fr 1.4fr 0.8fr;
}

.families-table .table-row {
  grid-template-columns: 1.1fr 1.2fr 0.8fr 0.7fr auto;
}

.admin-communes .table-row {
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.8fr 0.9fr;
}

.canteen-reservations .table-row {
  grid-template-columns: 0.8fr 1fr 1.4fr 0.7fr 1.1fr;
}

.manager-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.manager-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.manager-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manager-card-head strong,
.manager-card-head span {
  display: block;
}

.manager-card-head strong {
  color: var(--navy);
  font-size: 1.08rem;
}

.manager-card-head span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: var(--soft);
  font-weight: 900;
}

.manager-service-checks {
  padding: 12px;
}

.manager-card button {
  justify-self: start;
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.empty-state {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: white;
  font-weight: 800;
}

.table-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table-row strong {
  color: var(--green);
}

.table-row button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.family-header,
.public-topbar {
  padding: 16px clamp(18px, 4vw, 56px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.family-header nav,
.public-topbar a:last-child {
  display: flex;
  gap: 14px;
  color: var(--navy);
  font-weight: 800;
}

.family-main,
.public-report {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 58px) 0;
}

.family-hero,
.public-report > section {
  max-width: 760px;
  margin-bottom: 24px;
}

.children-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.family-card button {
  width: 100%;
  margin-top: 12px;
}

.public-report {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  align-items: start;
}

.report-submit {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.form-success {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--navy);
  background: var(--green-2);
  font-weight: 800;
}

.form-error {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  color: #721c24;
  background: #f8d7da;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.citizen-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

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

.citizen-password-field {
  max-width: 420px;
}

.modern-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: var(--soft);
  cursor: pointer;
  font-weight: 900;
}

.modern-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-ui {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.modern-toggle input:checked + .toggle-ui {
  background: var(--green);
}

.modern-toggle input:checked + .toggle-ui::after {
  transform: translateX(22px);
}

.citizen-toggle-row {
  display: grid;
  grid-template-columns: max-content max-content minmax(260px, 420px);
  align-items: end;
  gap: 14px;
}

.responsible-row {
  display: contents;
}

.children-toggle {
  width: fit-content;
}

.citizen-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.citizen-form-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.citizen-form-actions .light-action {
  color: var(--navy);
  background: var(--green-2);
}

.hidden {
  display: none !important;
}

.admin-create-form button {
  grid-column: 1 / -1;
}

.form-separator {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: var(--soft);
  font-weight: 900;
}

.toggle-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: var(--soft);
  font-weight: 900;
}

.responsible-link-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.responsible-link-fields.hidden {
  display: none;
}

.inline-children-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfd;
}

.inline-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-section-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.inline-section-head button,
.child-remove {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.add-child-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px 8px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: #e4f4ea;
  font-size: 0.88rem;
  line-height: 1;
}

.add-child-button span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-size: 1.05rem;
  line-height: 1;
}

.inline-children-list {
  display: grid;
  gap: 10px;
}

.inline-child-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.child-remove {
  display: inline-grid;
  place-items: center;
  align-self: end;
  width: 49px;
  height: 49px;
  padding: 0;
  border: 1px solid #f3c9c9;
  border-radius: 14px;
  color: #9b2c2c;
  background: #fff1f1;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.child-remove:hover {
  border-color: #e8a9a9;
  background: #ffe4e4;
  transform: translateY(-1px);
}

.trash-icon {
  width: 21px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v5'/%3E%3Cpath d='M14 11v5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v5'/%3E%3Cpath d='M14 11v5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.service-checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.service-checks legend {
  padding: 0 6px;
  color: var(--navy);
  font-weight: 900;
}

.service-checks label,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-actions {
  flex-wrap: wrap;
}

.inline-actions form {
  margin: 0;
}

.inline-actions button,
.canteen-reservations button {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.product-sidebar button,
.logout-link,
.sidebar-toggle,
.data-table .table-row button,
input,
select,
textarea,
.simple-list p,
.children-section,
.report-submit,
.login-panel,
.phone-mini,
.landing-preview,
.landing-points span,
.preview-top,
.preview-stats article,
.preview-list p,
.phone-mini p,
.landing-grid article,
.family-card {
  border-radius: 12px;
}

@media (max-width: 980px) {
  .login-layout,
  .product-body,
  .public-report,
  .landing-hero,
  .landing-band,
  .canteen-tools {
    grid-template-columns: 1fr;
  }

  .landing-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .login-aside {
    min-height: 360px;
  }

  .product-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .product-sidebar.open {
    transform: translateX(0);
  }

  .modal-overlay {
    padding: 22px;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
  }

  .kpi-grid,
  .invoice-grid,
  .family-grid,
  .work-grid,
  .split-grid,
  .settings-grid,
  .children-grid,
  .citizen-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-child-row,
  .inline-child-row:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-child-row label:last-of-type,
  .child-remove {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .login-benefits,
  .kpi-grid,
  .invoice-grid,
  .family-grid,
  .work-grid,
  .split-grid,
  .settings-grid,
  .children-grid,
  .citizen-form-grid,
  .inline-child-row,
  .inline-child-row:first-child,
  .action-grid,
  .landing-grid,
  .landing-grid.three,
  .preview-stats {
    grid-template-columns: 1fr;
  }

  .product-topbar,
  .family-header,
  .public-topbar,
  .card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-action,
  .card-head button,
  .manager-card button {
    width: 100%;
  }

  .citizen-form-actions {
    flex-direction: column;
  }

  .citizen-form-actions button,
  .modern-toggle,
  .responsible-row {
    width: 100%;
  }

  .citizen-toggle-row,
  .responsible-row {
    grid-template-columns: 1fr;
  }

  .citizen-toggle-row {
    flex-direction: column;
  }

  .manager-card-head {
    flex-direction: column;
  }

  .canteen-month-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .month-controls {
    align-items: stretch;
  }

  .month-controls label {
    min-width: 0;
    flex: 1;
  }

  .calendar-weekdays,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-cell.muted-cell {
    display: none;
  }
}
