:root {
  color-scheme: light;
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-soft: #f5fbf7;
  --ink: #121826;
  --muted: #5f6b7a;
  --line: #e7ddd4;
  --coral: #ff4b3e;
  --coral-dark: #c92f28;
  --jade: #25a878;
  --jade-dark: #14795a;
  --gold: #ffd166;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(18, 24, 38, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(18, 24, 38, 0.32);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.site-header.is-solid,
.site-header.light {
  color: var(--ink);
  border-bottom-color: var(--line);
  background: rgba(255, 248, 242, 0.94);
}

.nav-shell,
.hero-content,
.section-shell,
.footer-shell {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.nav-shell {
  width: calc(100% - 24px);
  max-width: none;
  min-height: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand img {
  width: 170px;
  height: auto;
}

.site-header:not(.is-solid):not(.light) .brand {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(18, 24, 38, 0.16);
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 0;
  font-size: 16px;
  font-weight: 850;
}

.nav-actions {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: 0;
}

.language-select,
.nav-actions > .button-secondary {
  position: relative;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.78;
}

.language-select .sr-only {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

.language-select select {
  position: absolute;
  inset: -8px -6px;
  width: calc(100% + 12px);
  height: calc(100% + 16px);
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  color: transparent;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

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

.nav-links a {
  opacity: 0.9;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.button,
.button-secondary,
.button-ghost,
.store-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button {
  padding: 0 18px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 14px 28px rgba(255, 75, 62, 0.28);
}

.button-secondary {
  padding: 0 16px;
  color: var(--coral-dark);
  border-color: rgba(255, 75, 62, 0.25);
  background: #fff;
}

.nav-actions > .button-secondary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.language-select:hover,
.language-select:focus-within,
.nav-actions > .button-secondary:hover,
.nav-actions > .button-secondary:focus-visible {
  opacity: 1;
}

.nav-actions > .button-secondary:hover {
  transform: none;
}

.language-select:focus-within,
.nav-actions > .button-secondary:focus-visible {
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.button-ghost {
  padding: 0 18px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.12);
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.store-button:hover {
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 90vh;
  display: grid;
  align-items: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: #111827;
}

.hero:not(.hero-carousel)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/hero-classroom.webp") center / cover no-repeat;
}

.hero:not(.hero-carousel)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 24, 38, 0.88) 0%, rgba(18, 24, 38, 0.7) 38%, rgba(18, 24, 38, 0.16) 72%, rgba(18, 24, 38, 0.02) 100%);
}

.hero-carousel {
  min-height: 92vh;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 560ms ease;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide picture,
.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  object-fit: cover;
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(18, 24, 38, 0.9) 0%, rgba(18, 24, 38, 0.68) 40%, rgba(18, 24, 38, 0.18) 72%, rgba(18, 24, 38, 0.04) 100%);
}

.carousel-slide .hero-content {
  position: relative;
  z-index: 1;
}

.carousel-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.carousel-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 24, 38, 0.42);
  backdrop-filter: blur(10px);
  font-size: 24px;
  line-height: 1;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  opacity: 0.55;
}

.carousel-dots button.active {
  width: 30px;
  opacity: 1;
  background: var(--coral);
}

.hero-content {
  padding: 124px 0 70px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(54px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 690px;
  margin-top: 48px;
}

.stat {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.stat strong {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.45;
}

.section {
  padding: 76px 0;
}

.intro-section,
.about-band {
  background: #fff;
}

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

.section-title {
  max-width: 680px;
}

.section-title .eyebrow,
.legal-content .eyebrow,
.admin-panel .eyebrow,
.dashboard-head .eyebrow {
  color: var(--coral-dark);
}

.section h2,
.section h1,
.legal-content h1,
.admin-panel h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-lede,
.about-copy p,
.app-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.split-grid,
.about-grid,
.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 46px;
  align-items: center;
}

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

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

.feature-card,
.admin-card,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card {
  min-height: 270px;
  padding: 24px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--jade);
  font-weight: 900;
}

.feature-card:nth-child(2) .feature-icon {
  background: var(--coral);
}

.feature-card:nth-child(3) .feature-icon {
  color: var(--ink);
  background: var(--gold);
}

.feature-card:nth-child(4) .feature-icon {
  background: var(--blue);
}

.feature-card h3 {
  margin: 20px 0 10px;
  font-size: 21px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.principles-section {
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
}

.principles-title {
  max-width: none;
  margin-bottom: 30px;
}

.principles-title h2 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(38px, 4.25vw, 56px);
}

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

.principles-section .feature-card {
  min-height: 190px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  border-color: transparent;
  box-shadow: 0 24px 56px rgba(18, 24, 38, 0.08);
}

.principles-section .feature-card p {
  max-width: 420px;
  padding-top: 8px;
  color: rgba(18, 24, 38, 0.72);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.55;
}

.principles-section .feature-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(37, 168, 120, 0.16), #fff);
}

.principles-section .feature-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 75, 62, 0.16), #fff);
}

.principles-section .feature-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(255, 207, 94, 0.28), #fff);
}

.principles-section .feature-card:nth-child(4) {
  background: linear-gradient(135deg, rgba(45, 102, 224, 0.15), #fff);
}

.principles-section .feature-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  font-size: 24px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--coral-dark);
  font-weight: 850;
}

.download-section {
  background: var(--surface-soft);
}

.app-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store-button {
  min-width: 168px;
  padding: 10px 18px;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 14px 28px rgba(255, 75, 62, 0.24);
}

.store-button.dark {
  background: var(--ink);
  box-shadow: 0 14px 28px rgba(18, 24, 38, 0.2);
}

.store-button span {
  font-size: 12px;
  opacity: 0.82;
}

.store-button strong {
  font-size: 21px;
  line-height: 1;
}

.app-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.app-points span {
  padding: 8px 11px;
  border: 1px solid rgba(37, 168, 120, 0.28);
  border-radius: 999px;
  color: var(--jade-dark);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.app-preview img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  background: #fff;
}

.page-banner {
  position: relative;
  min-height: clamp(500px, 64vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(18, 24, 38, 0.92) 0%, rgba(18, 24, 38, 0.74) 34%, rgba(18, 24, 38, 0.28) 66%, rgba(18, 24, 38, 0.08) 100%);
}

.page-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.page-banner-content {
  position: relative;
  z-index: 2;
  padding: 92px 0;
}

.page-banner .section-title,
.page-banner .app-copy {
  max-width: 680px;
}

.page-banner h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
}

.page-banner .section-lede,
.page-banner .app-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.75;
}

.page-banner .download-actions {
  margin-top: 30px;
}

.page-banner .app-points span {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.page-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.download-page-section {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
}

.about-lede {
  margin-top: 18px;
}

.about-copy {
  display: grid;
  gap: 18px;
}

.site-footer {
  padding: 32px 0;
  color: #fff;
  background: var(--ink);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-weight: 850;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 650;
}

.legal-body,
.admin-body {
  min-height: 100vh;
  background: #fff8f2;
}

.legal-main {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 70px;
}

.legal-card {
  padding: 34px;
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 23px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.78;
}

.legal-card ul {
  padding-left: 22px;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
}

.admin-rail {
  min-height: 100vh;
  padding: 36px;
  color: #fff;
  background: linear-gradient(160deg, #121826 0%, #233245 58%, #25a878 100%);
}

.admin-rail .brand img {
  width: 178px;
}

.admin-rail .brand {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.admin-rail h1 {
  max-width: 340px;
  margin: 72px 0 18px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.admin-rail p {
  max-width: 340px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.admin-main {
  padding: 28px clamp(22px, 4vw, 54px);
}

.admin-topbar {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.admin-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.admin-panel {
  max-width: 520px;
  margin-top: 74px;
}

.login-card {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

.field input:focus {
  outline: 3px solid rgba(255, 75, 62, 0.18);
  border-color: var(--coral);
}

.form-message {
  min-height: 22px;
  margin: 0;
  font-size: 14px;
  font-weight: 760;
}

.dashboard-shell {
  display: none;
  margin-top: 44px;
}

.dashboard-shell.active {
  display: block;
}

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

.dashboard-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

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

.admin-card {
  min-height: 150px;
  padding: 20px;
}

.admin-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-card strong {
  display: block;
  margin-top: 12px;
  font-size: 38px;
  line-height: 1;
}

.admin-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

tr:last-child td {
  border-bottom: 0;
}

/* iiChinese admin app shell: standard SaaS management layout. */
.admin-body {
  min-height: 100vh;
  background: #f5f6fa;
  color: #1f2937;
}

.admin-app-shell {
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #e8ebf0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.admin-brand img {
  width: 46px;
  height: 46px;
  padding: 6px;
  border: 1px solid #f0d8d5;
  border-radius: 10px;
  background: #fff8f7;
}

.admin-brand span {
  display: grid;
  min-width: 0;
}

.admin-brand strong {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-brand small {
  overflow: hidden;
  color: #6b7280;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
}

.admin-header-actions a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #e8ebf0;
  border-radius: 999px;
  background: #fff;
}

.admin-layout {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 14px 14px 22px;
  border-right: 1px solid #e8ebf0;
  background: #ffffff;
}

.admin-account {
  display: grid;
  gap: 3px;
  padding: 13px 12px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
}

.admin-account span {
  color: #ff6f7d;
  font-size: 11px;
  font-weight: 760;
}

.admin-account strong {
  color: #111827;
  font-size: 15px;
  font-weight: 820;
}

.admin-account small {
  overflow: hidden;
  color: #6b7280;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-main {
  min-width: 0;
  padding: 18px 20px 40px;
}

.admin-primary-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 5px;
  border: 1px solid #edf0f5;
  border-radius: 999px;
  background: #f6f7f9;
}

.admin-primary-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #4b5563;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.admin-primary-tabs button:hover,
.admin-primary-tabs button.active {
  color: #ff4b5c;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.admin-secondary-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.data-card {
  display: grid;
  width: 100%;
  min-height: 46px;
  margin: 0;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  padding: 9px 11px;
  text-align: left;
  background: #ffffff;
}

.data-card span,
.data-card small {
  display: none;
}

.data-card strong {
  color: #111827;
  font-size: 12px;
  font-weight: 720;
}

.data-card:hover,
.data-card.active {
  border-color: #ffc3c9;
  color: #ff4b5c;
  background: #fff5f6;
  box-shadow: none;
}

.data-card.active {
  border-left: 3px solid #ff4b5c;
}

.dashboard-shell {
  display: none;
  margin-top: 0;
}

.dashboard-shell.active {
  display: block;
}

.dashboard-head {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #ffffff;
}

.dashboard-head h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-head .eyebrow,
.admin-module-head .eyebrow {
  margin: 0;
  color: #ff6f7d;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.08em;
}

.admin-toolbar,
.admin-module-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-toolbar .button-secondary,
.admin-header-actions .button-secondary,
.quick-card .button-secondary {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

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

.admin-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.admin-card span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.admin-card strong {
  margin-top: 7px;
  color: #111827;
  font-size: 26px;
}

.admin-card p {
  margin-top: 8px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

.table-wrap,
.admin-workspace {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f5;
  font-size: 12px;
}

th {
  color: #6b7280;
  font-size: 11px;
  font-weight: 760;
  text-transform: none;
  background: #fafbfc;
}

.admin-workspace {
  overflow: visible;
}

.admin-module {
  min-width: 0;
  padding: 18px;
}

.admin-module-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.admin-module-head h3 {
  margin: 5px 0 5px;
  color: #111827;
  font-size: 20px;
  line-height: 1.18;
}

.admin-module-head p {
  max-width: 760px;
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: #109860;
  background: #eafaf2;
  font-size: 11px;
  font-weight: 760;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quick-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fbfcfe;
}

.quick-card strong {
  color: #111827;
  font-size: 12px;
}

.quick-card input,
.quick-card select,
.quick-card textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  padding: 0 9px;
  color: #111827;
  background: #fff;
  font-size: 12px;
}

.quick-card textarea {
  min-height: 66px;
  padding: 8px 9px;
}

.admin-data-table {
  margin-top: 14px;
}

.admin-data-table table {
  min-width: 820px;
}

.admin-data-table td {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.is-authenticated) .admin-sidebar,
body:not(.is-authenticated) .admin-primary-tabs,
body:not(.is-authenticated) .admin-header-actions {
  display: none;
}

body:not(.is-authenticated) .admin-topbar {
  grid-template-columns: 1fr;
}

body:not(.is-authenticated) .admin-layout {
  grid-template-columns: 1fr;
}

body:not(.is-authenticated) .admin-panel {
  width: min(520px, calc(100vw - 40px));
  margin: 80px auto 0;
}

.admin-toolbar,
.admin-module-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-workspace {
  margin-top: 24px;
  border: 1px solid rgba(231, 221, 212, 0.86);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 42px rgba(18, 24, 38, 0.08);
}

.admin-primary-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
}

.admin-primary-tabs button,
.admin-secondary-nav button,
.data-card,
.quick-card button {
  border: 0;
  font: inherit;
}

.admin-primary-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  color: #566274;
  background: transparent;
  font-size: 13px;
  font-weight: 680;
}

.admin-primary-tabs button:hover,
.admin-primary-tabs button.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(231, 221, 212, 0.95), 0 6px 16px rgba(18, 24, 38, 0.06);
}

.admin-module-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 620px;
}

.admin-secondary-nav {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #fbf7f2;
}

.data-card {
  display: grid;
  width: 100%;
  min-height: 64px;
  margin: 0 0 7px;
  padding: 10px 11px;
  border-radius: 8px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

.data-card span {
  color: #8a95a3;
  font-size: 11px;
  font-weight: 650;
}

.data-card strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.data-card small {
  margin-top: 4px;
  overflow: hidden;
  color: #7a8492;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-card:hover,
.data-card.active {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(231, 221, 212, 0.96), 0 8px 22px rgba(18, 24, 38, 0.07);
}

.data-card.active {
  border-left: 3px solid var(--coral);
}

.admin-module {
  min-width: 0;
  padding: 18px;
}

.admin-module-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.admin-module-head h3 {
  margin: 4px 0 6px;
  font-size: 23px;
  line-height: 1.16;
}

.admin-module-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #14795a;
  background: rgba(37, 168, 120, 0.1);
  font-size: 11px;
  font-weight: 760;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.quick-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quick-card strong {
  color: var(--ink);
  font-size: 13px;
}

.quick-card input,
.quick-card select,
.quick-card textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.quick-card textarea {
  min-height: 72px;
  padding: 9px 10px;
  resize: vertical;
}

.quick-card small,
.quick-card a {
  color: var(--jade-dark);
  font-size: 11px;
  font-weight: 700;
}

.admin-data-table {
  margin-top: 16px;
  box-shadow: none;
}

.admin-data-table table {
  min-width: 760px;
}

.admin-data-table th,
.admin-data-table td {
  padding: 11px 12px;
  font-size: 12px;
  vertical-align: top;
}

.admin-data-table td {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-card.kpi-link {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-card.kpi-link:hover,
.admin-card.kpi-link:focus-within {
  border-color: rgba(37, 168, 120, 0.36);
  box-shadow: 0 10px 28px rgba(18, 24, 38, 0.08);
  transform: translateY(-1px);
}

.admin-card.kpi-link strong {
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.admin-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid rgba(231, 221, 212, 0.82);
  border-radius: 8px;
  background: #fff;
}

.admin-list-search {
  display: flex;
  flex: 1 1 420px;
  align-items: center;
  gap: 8px;
}

.admin-list-search input,
.admin-list-search select,
.admin-row-form input,
.admin-row-form select,
.admin-row-form textarea {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.admin-list-search input {
  min-width: 220px;
  flex: 1;
}

.admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-mini-button,
.admin-danger-button,
.admin-page-button,
.icon-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 720;
}

.admin-mini-button:hover,
.admin-page-button:hover {
  color: var(--jade-dark);
  border-color: rgba(37, 168, 120, 0.32);
  background: #f5fbf7;
}

.admin-danger-button {
  color: #c92f28;
  border-color: rgba(255, 75, 62, 0.28);
  background: #fff8f7;
}

.admin-row-actions {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-page-button {
  min-width: 32px;
  padding: 0 9px;
}

.admin-page-button.active {
  color: #fff;
  border-color: var(--jade-dark);
  background: var(--jade-dark);
}

.admin-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-page-ellipsis {
  min-width: 24px;
  text-align: center;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.42);
  backdrop-filter: blur(4px);
}

.admin-modal-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(18, 24, 38, 0.22);
}

.admin-modal-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fffaf6;
}

.admin-modal-panel h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.icon-button {
  width: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.admin-row-form {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 20px;
}

.admin-row-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.admin-row-form label.wide {
  grid-column: 1 / -1;
}

.admin-row-form textarea {
  min-height: 88px;
  padding: 9px 10px;
  resize: vertical;
}

.admin-row-form footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

@media (max-width: 920px) {
  .site-header {
    position: sticky;
    color: var(--ink);
    background: rgba(255, 248, 242, 0.96);
  }

  .site-header .brand img {
    filter: none;
  }

  .nav-shell {
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-links {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-actions {
    position: static;
    transform: none;
    margin-left: auto;
  }

  .hero {
    min-height: 760px;
  }

  .hero:not(.hero-carousel)::after,
  .carousel-slide::after {
    background: linear-gradient(180deg, rgba(18, 24, 38, 0.88) 0%, rgba(18, 24, 38, 0.68) 52%, rgba(18, 24, 38, 0.2) 100%);
  }

  .hero-stats,
  .feature-grid,
  .kpi-grid,
  .split-grid,
  .about-grid,
  .app-grid,
  .admin-layout,
  .admin-module-layout,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .admin-secondary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principles-title h2 {
    white-space: normal;
  }

  .principles-section .feature-card {
    min-height: auto;
  }

  .page-main {
    padding-top: 0;
  }

  .admin-rail {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .hero-content,
  .section-shell,
  .footer-shell,
  .legal-main {
    width: min(100% - 28px, 1140px);
  }

  .brand img {
    width: 152px;
  }

  .nav-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .language-select select {
    max-width: none;
  }

  .section {
    padding: 58px 0;
  }

  .hero-content {
    padding: 82px 0 48px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .carousel-controls {
    bottom: 18px;
  }

  .hero-copy,
  .section-lede,
  .app-copy p,
  .about-copy p {
    font-size: 16px;
  }

  .footer-shell,
  .admin-topbar,
  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
