.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 {
  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;
}

.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: 18px;
  padding: 20px;
  color: white;
  background: var(--navy);
}

.product-sidebar strong {
  font-size: 1.08rem;
}

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

.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;
}

.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;
}

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

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

.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 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;
}

.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 {
  margin-top: 18px;
}

.workspace-card h2,
.workspace-card h3,
.card-head h2,
.children-section h2 {
  margin: 0;
  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);
}

.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);
}

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

.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;
}

.users-table .table-row {
  grid-template-columns: 1fr 1.3fr 0.8fr 1.3fr;
}

.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;
}

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

.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;
}

.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 {
    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);
  }

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

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

@media (max-width: 640px) {
  .login-benefits,
  .kpi-grid,
  .invoice-grid,
  .family-grid,
  .work-grid,
  .split-grid,
  .settings-grid,
  .children-grid,
  .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%;
  }

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