:root {
  --cream: #fbf6f3;
  --paper: #fffdfb;
  --terracotta: #c16b48;
  --terracotta-deep: #9b4f35;
  --clay: #b66f4b;
  --earth: #504438;
  --olive: #968d6c;
  --gold: #c9a45c;
  --blue: #2f4f5f;
  --ink: #29251f;
  --muted: #756d64;
  --line: rgba(80, 68, 56, 0.16);
  --success: #4f745c;
  --forest: #183f35;
  --forest-deep: #102f29;
  --canopy: #2f6250;
  --moss: #789064;
  --leaf-wash: rgba(47, 98, 80, 0.10);
  --danger: #a1493e;
  --shadow: 0 18px 60px rgba(66, 48, 36, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 5% 0%, rgba(47,98,80,.16), transparent 29rem),
    radial-gradient(ellipse at 96% 100%, rgba(120,144,100,.16), transparent 32rem),
    radial-gradient(circle at 76% 18%, rgba(201,164,92,.07), transparent 20rem),
    var(--cream);
  font-family: Montserrat, Avenir, "Segoe UI", sans-serif;
}

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

.hidden { display: none !important; }
.sr-only { position: absolute !important; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.eyebrow {
  margin: 0 0 .55rem;
  color: var(--terracotta-deep);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, .brand-name, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.04;
}

h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 500; }
h2 { margin: 0; font-size: clamp(2rem, 3vw, 3.2rem); font-weight: 500; }
h3 { margin: 0; font-size: 1.45rem; font-weight: 600; }
p { line-height: 1.62; }

.level-emblem { display: block; width: 1.55em; height: 1.55em; object-fit: contain; }
.level-emblem.compact { width: 1.25em; height: 1.25em; }

.pattern-band {
  height: 30px;
  opacity: .82;
  background: #eee6d8 url("assets/vueltiao-weave.svg") center / 96px 30px repeat-x;
  box-shadow: inset 0 1px rgba(255,255,255,.52), inset 0 -1px rgba(80,68,56,.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 50px;
  padding: .32rem;
  border: 1px solid rgba(193,107,72,.45);
  border-radius: 14px;
  background: rgba(251,246,243,.96);
  box-shadow: 0 6px 18px rgba(41,37,31,.12);
}

.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }

.brand-name { font-size: 1.45rem; letter-spacing: .08em; }
.brand-sub { margin-top: .1rem; color: var(--muted); font-size: .63rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 5.5rem);
  overflow: hidden;
  color: var(--cream);
  background: var(--earth);
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(251,246,243,.15);
  border-radius: 50%;
}

.auth-story::before { width: 37rem; height: 37rem; right: -16rem; top: -16rem; }
.auth-story::after { width: 22rem; height: 22rem; left: -10rem; bottom: 7rem; }

.auth-story .brand { position: relative; z-index: 4; }
.auth-story .brand-mark { background: var(--cream); border-color: rgba(251,246,243,.5); box-shadow: 0 10px 28px rgba(24,19,15,.2); }
.auth-story .brand-sub { color: rgba(251,246,243,.72); }

.hero-carousel { position: absolute; z-index: 1; inset: 0; overflow: hidden; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; pointer-events: none; transition: opacity .8s ease, transform 1.1s ease; transform: scale(1.025); }
.hero-slide.active { opacity: 1; pointer-events: auto; transform: scale(1); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-slide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,28,23,.32) 0%, rgba(44,34,27,.22) 32%, rgba(36,28,23,.76) 73%, rgba(31,24,20,.94) 100%); }
.hero-slide-copy { position: absolute; right: clamp(2rem,5vw,5.5rem); bottom: clamp(7.6rem,13vh,9.5rem); left: clamp(2rem,5vw,5.5rem); max-width: 720px; color: var(--cream); text-shadow: 0 2px 22px rgba(20,15,12,.34); }
.hero-slide-copy .eyebrow { color: #ffd0b5; }
.hero-slide-copy h1 { font-size: clamp(2.65rem,6.1vw,5.35rem); }
.hero-slide-copy h1 span { color: #efb592; }
.hero-slide-copy > p:last-child { max-width: 610px; margin: 1.15rem 0 0; color: rgba(251,246,243,.86); font-size: 1rem; }
.hero-carousel-controls { position: absolute; z-index: 5; right: clamp(2rem,5vw,5.5rem); bottom: clamp(2rem,5vw,4rem); display: flex; align-items: center; gap: .75rem; }
.hero-arrow { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; color: #fff; background: rgba(31,24,20,.42); font-size: 1rem; backdrop-filter: blur(10px); transition: .2s ease; }
.hero-arrow:hover, .hero-arrow:focus-visible { border-color: rgba(255,255,255,.72); background: rgba(193,107,72,.88); transform: translateY(-1px); }
.hero-dots { display: flex; align-items: center; gap: .42rem; padding: .55rem .7rem; border-radius: 99px; background: rgba(31,24,20,.36); backdrop-filter: blur(10px); }
.hero-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.48); transition: width .25s ease, background .25s ease; }
.hero-dot.active { width: 24px; background: #efb592; }
.hero-note { position: relative; z-index: 4; display: flex; align-items: center; gap: .8rem; width: fit-content; color: rgba(251,246,243,.76); font-size: .83rem; text-shadow: 0 2px 14px rgba(20,15,12,.55); }
.hero-note i { width: 38px; height: 1px; background: var(--gold); }

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem clamp(1.3rem, 5vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 112% -4%, rgba(47,98,80,.16), transparent 35%),
    radial-gradient(ellipse at -8% 108%, rgba(120,144,100,.14), transparent 36%),
    linear-gradient(145deg, rgba(255,253,251,.92), rgba(239,242,232,.9));
}

.auth-panel::before,
.auth-panel::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 86px;
  border: 1px solid rgba(47,98,80,.11);
  border-radius: 100% 0 100% 0;
  transform: rotate(-28deg);
  pointer-events: none;
}
.auth-panel::before { top: 9%; right: -82px; }
.auth-panel::after { bottom: 8%; left: -94px; transform: rotate(145deg); }
.auth-card { position: relative; z-index: 1; width: min(100%, 470px); }
.auth-card h2 { margin-bottom: .55rem; }
.auth-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .35rem; margin: 2rem 0 1.35rem; border-radius: 99px; background: rgba(80,68,56,.08); }
.auth-tab { padding: .75rem 1rem; border: 0; border-radius: 99px; color: var(--muted); background: transparent; font-weight: 750; }
.auth-tab.active { color: var(--paper); background: var(--earth); box-shadow: 0 5px 16px rgba(80,68,56,.2); }

.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: .45rem; }
.field label { color: var(--earth); font-size: .78rem; font-weight: 800; letter-spacing: .045em; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  transition: .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(193,107,72,.12); }
.field textarea { min-height: 104px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .72rem 1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .66; transform: none; box-shadow: none; }
.btn-primary { color: #fff; background: var(--terracotta); box-shadow: 0 9px 24px rgba(193,107,72,.23); }
.btn-primary:hover { background: var(--terracotta-deep); }
.btn-earth { color: #fff; background: var(--earth); }
.btn-soft { color: var(--earth); border-color: var(--line); background: rgba(255,255,255,.66); }
.btn-danger { color: var(--danger); border-color: rgba(161,73,62,.22); background: rgba(161,73,62,.07); }
.btn-success { color: var(--success); border-color: rgba(79,116,92,.24); background: rgba(79,116,92,.08); }
.btn-sm { min-height: 36px; padding: .5rem .72rem; border-radius: 9px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }

.demo-divider { display: flex; align-items: center; gap: .8rem; margin: 1.25rem 0; color: var(--muted); font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.privacy-note { margin: 1.3rem 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.auth-alert { padding: .78rem .9rem; border: 1px solid rgba(161,73,62,.22); border-radius: 11px; color: var(--danger); background: rgba(161,73,62,.07); font-size: .82rem; line-height: 1.45; }
.auth-alert.success { border-color: rgba(79,116,92,.25); color: var(--success); background: rgba(79,116,92,.08); }
.text-action { justify-self: center; padding: .15rem; border: 0; color: var(--terracotta-deep); background: transparent; font-size: .8rem; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(155,79,53,.3); text-underline-offset: .2rem; }
.text-action:hover { color: var(--earth); }
.text-action-right { justify-self: end; margin-top: -.3rem; }
.consent-check { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; color: var(--muted); font-size: .77rem; line-height: 1.55; cursor: pointer; }
.consent-check input { width: 1rem; height: 1rem; margin-top: .18rem; accent-color: var(--terracotta); }
.legal-link { display: inline; padding: 0; border: 0; color: var(--terracotta-deep); background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: .15rem; }
.auth-success-card { display: grid; justify-items: center; gap: .35rem; margin: 2rem 0 1rem; padding: 1.4rem; border: 1px solid rgba(79,116,92,.2); border-radius: 18px; text-align: center; background: rgba(79,116,92,.07); }
.auth-success-card p, .auth-success-card small { margin: 0; color: var(--muted); }
.auth-success-card strong { overflow-wrap: anywhere; color: var(--earth); }
.auth-success-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: .35rem; border-radius: 50%; color: #fff; background: var(--success); font-size: 1.25rem; }
.auth-status { min-height: 1.2rem; margin: .5rem 0 0; text-align: center; font-size: .78rem; }
.account-help { margin: 0 0 1rem; color: var(--muted); text-align: center; font-size: .78rem; line-height: 1.5; }
.legal-modal { width: min(650px, 100%); }
.legal-copy { color: var(--muted); font-size: .9rem; line-height: 1.68; }
.legal-copy h3 { margin-top: 1.35rem; color: var(--earth); font-family: inherit; font-size: 1rem; }
.legal-copy a { color: var(--terracotta-deep); font-weight: 750; }
.legal-updated { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .78rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.35rem .95rem;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 112% 18%, rgba(120,144,100,.26), transparent 35%),
    radial-gradient(ellipse at -30% 82%, rgba(201,164,92,.12), transparent 30%),
    linear-gradient(155deg, var(--forest-deep), #1d4539 56%, #293f34);
}
.sidebar::before { content: ""; position: absolute; inset: 0; opacity: .11; background: repeating-radial-gradient(ellipse at 110% 12%, transparent 0 25px, rgba(255,255,255,.22) 26px 27px, transparent 28px 50px); pointer-events: none; }
.sidebar::after { content: ""; position: absolute; inset: auto -52px 22% auto; width: 180px; height: 180px; opacity: .045; background: url("assets/juya-symbol.png") center/contain no-repeat; transform: rotate(-12deg); pointer-events: none; }
.sidebar .brand { padding: .15rem .45rem 1.35rem; }
.sidebar .brand-mark { width: 74px; height: 64px; padding: .12rem; overflow: hidden; border: 0; background: rgba(251,246,243,.94); box-shadow: 0 8px 22px rgba(24,19,15,.16); }
.sidebar .brand-logo { transform: scale(1.16); }
.sidebar .brand-sub { color: rgba(251,246,243,.6); }
.nav-group-label { margin: .7rem .7rem .45rem; color: rgba(251,246,243,.46); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav { display: grid; gap: .16rem; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  min-height: 46px;
  padding: .65rem .72rem;
  border: 0;
  border-radius: 12px;
  color: rgba(251,246,243,.72);
  background: transparent;
  text-align: left;
  font-size: .88rem;
  font-weight: 700;
}
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-btn.active { color: #fff; background: rgba(193,107,72,.24); box-shadow: inset 3px 0 0 var(--gold); }
.nav-icon { display: grid; place-items: center; width: 1.35rem; text-align: center; }
.nav-svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { display: grid; place-items: center; min-width: 24px; height: 24px; margin-left: auto; padding: 0 6px; border-radius: 99px; color: var(--earth); background: var(--gold); font-size: .68rem; }
.sidebar-bottom { margin-top: auto; }
.account-mini { display: flex; gap: .7rem; align-items: center; padding: .85rem; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 39px; height: 39px; border-radius: 50%; color: #fff; background: var(--terracotta); font-weight: 900; }
.account-mini strong { display: block; font-size: .82rem; }
.account-mini span { display: block; margin-top: .16rem; color: rgba(251,246,243,.56); font-size: .67rem; }

.main { position: relative; min-width: 0; overflow: hidden; background: linear-gradient(155deg, rgba(251,246,243,.76), rgba(237,242,231,.72)); }
.main::before { content: ""; position: fixed; z-index: 0; right: -110px; bottom: -90px; width: 420px; height: 360px; opacity: .025; background: url("assets/juya-symbol.png") center/contain no-repeat; transform: rotate(7deg); pointer-events: none; }
.main::after { content: ""; position: fixed; z-index: 0; top: 82px; right: -72px; width: 260px; height: 540px; opacity: .52; background: radial-gradient(ellipse at 100% 8%, rgba(47,98,80,.12) 0 20%, transparent 21%), radial-gradient(ellipse at 68% 31%, rgba(120,144,100,.1) 0 18%, transparent 19%), radial-gradient(ellipse at 103% 56%, rgba(47,98,80,.09) 0 22%, transparent 23%); pointer-events: none; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 1rem clamp(1rem, 4vw, 3.2rem);
  border-bottom: 1px solid rgba(80,68,56,.1);
  backdrop-filter: blur(18px);
  background: rgba(248,247,239,.91);
  box-shadow: 0 8px 28px rgba(66,48,36,.035);
}
.topbar-actions { display: flex; gap: .55rem; align-items: center; }
.instagram-link { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: 0 .8rem; border: 1px solid rgba(193,107,72,.28); border-radius: 99px; color: var(--terracotta-deep); background: linear-gradient(135deg, rgba(226,168,83,.16), rgba(193,107,72,.12)); box-shadow: 0 8px 22px rgba(155,79,53,.08); font-size: .73rem; font-weight: 850; text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.instagram-link:hover, .instagram-link:focus-visible { border-color: var(--terracotta); color: #fff; background: var(--terracotta-deep); box-shadow: 0 10px 24px rgba(155,79,53,.18); transform: translateY(-1px); }
.instagram-icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-center { position: relative; }
.notification-bell { position: relative; display: flex; align-items: center; gap: .5rem; min-height: 42px; padding: 0 .85rem; border: 1px solid rgba(193,107,72,.28); border-radius: 99px; color: #fff; background: var(--terracotta-deep); box-shadow: 0 8px 22px rgba(155,79,53,.18); cursor: pointer; font-size: .78rem; font-weight: 800; }
.notification-bell:hover, .notification-bell.active { border-color: var(--gold); background: var(--terracotta); transform: translateY(-1px); }
.bell-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-count { position: absolute; top: -5px; right: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--cream); border-radius: 99px; color: #fff; background: var(--danger); font-size: .62rem; line-height: 1; }
.notification-panel { position: absolute; top: calc(100% + .75rem); right: 0; display: flex; flex-direction: column; width: min(430px, calc(100vw - 2rem)); max-height: min(620px, calc(100vh - 120px)); overflow: hidden; border: 1px solid rgba(193,107,72,.2); border-radius: 22px; background: var(--cream); box-shadow: 0 24px 70px rgba(43,33,26,.22); }
.notification-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1rem .85rem; border-bottom: 1px solid var(--line); }
.notification-head .eyebrow { margin: 0 0 .18rem; }
.notification-head h3 { font-size: 1.15rem; }
.notification-head small { color: var(--muted); font-size: .72rem; }
.notification-head .text-action { max-width: 145px; text-align: right; }
.notification-list { flex: 1 1 auto; min-height: 0; max-height: min(480px, calc(100vh - 220px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.notification-item { position: relative; display: grid; grid-template-columns: 42px 1fr 8px; gap: .75rem; align-items: start; width: 100%; padding: .9rem 1rem; border: 0; border-bottom: 1px solid var(--line); color: var(--earth); background: rgba(255,255,255,.35); text-align: left; cursor: pointer; }
.notification-item:hover { background: rgba(193,107,72,.07); }
.notification-item.unread { background: linear-gradient(90deg, rgba(193,107,72,.09), rgba(255,255,255,.45)); }
.notification-type { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50% 50% 46% 54%; color: #fff; background: var(--blue); font-size: 1rem; box-shadow: 0 6px 16px rgba(47,79,95,.16); }
.notification-type .level-emblem { width: 24px; height: 24px; }
.notification-item strong, .notification-item small, .notification-item time { display: block; }
.notification-item strong { font-size: .82rem; line-height: 1.35; }
.notification-item small { margin-top: .22rem; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.notification-item time { margin-top: .35rem; color: rgba(80,68,56,.55); font-size: .66rem; }
.notification-item i { align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }
.notification-item.notification-cancelled { border-left: 4px solid var(--danger); background: rgba(169,55,47,.07); }
.notification-item.notification-cancelled .notification-type { background: var(--danger); }
.notification-alert { display: block; margin-bottom: .25rem; color: var(--danger); font-size: .72rem; letter-spacing: .09em; }
.notification-empty { display: grid; justify-items: center; padding: 2.4rem 1rem; color: var(--muted); text-align: center; }
.notification-empty > span { font-size: 1.5rem; }
.notification-empty .bell-icon { width: 30px; height: 30px; color: var(--terracotta); }
.notification-empty strong { margin-top: .6rem; color: var(--earth); }
.notification-empty p { max-width: 250px; margin: .35rem 0 0; font-size: .76rem; line-height: 1.5; }
.notification-view-all { width: 100%; padding: .8rem 1rem; border: 0; border-top: 1px solid var(--line); color: var(--terracotta-deep); background: rgba(193,107,72,.06); font-weight: 800; }
.notification-view-all:hover { background: rgba(193,107,72,.12); }
.role-chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  padding: .4rem .65rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 800;
}
.role-chip { color: var(--terracotta-deep); background: rgba(193,107,72,.1); }
.pill { color: var(--earth); background: rgba(80,68,56,.08); }
.pill.success { color: var(--success); background: rgba(79,116,92,.1); }
.pill.warning { color: #895f20; background: rgba(201,164,92,.18); }
.pill.danger { color: var(--danger); background: rgba(161,73,62,.1); }
.pill.blue { color: var(--blue); background: rgba(47,79,95,.1); }

.content { position: relative; z-index: 1; padding: clamp(1.25rem, 4vw, 3.2rem); }
.view-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.7rem; }
.view-heading p { margin: .55rem 0 0; color: var(--muted); }

.welcome-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr);
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: clamp(1.45rem, 3vw, 2.35rem);
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(ellipse at 92% 12%, rgba(120,144,100,.34), transparent 34%),
    linear-gradient(118deg, var(--forest-deep), var(--forest) 58%, #486049);
  box-shadow: var(--shadow);
}
.welcome-banner::after { content: ""; position: absolute; width: 310px; height: 260px; right: -80px; top: -65px; opacity: .08; background: url("assets/juya-symbol.png") center/contain no-repeat; transform: rotate(8deg); }
.welcome-banner p { max-width: 660px; margin: .65rem 0 0; color: rgba(255,255,255,.72); }
.today-focus { position: relative; z-index: 1; align-self: center; display: grid; gap: .45rem; padding: 1.1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.today-focus > span { color: #efb592; font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.today-focus strong { color: #fff; font-family: Georgia,serif; font-size: 1.3rem; font-weight: 500; }
.today-focus small { margin-bottom: .35rem; color: rgba(255,255,255,.7); }
.today-focus .btn { justify-self: start; }

.news-preview { margin: 1.1rem 0; overflow: hidden; border: 1px solid rgba(193,107,72,.25); border-top: 7px solid var(--terracotta); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(255,253,251,.96), rgba(193,107,72,.075)); box-shadow: 0 14px 38px rgba(66,48,36,.06); }
.news-preview .eyebrow { color: var(--terracotta-deep); }
.news-preview .notification-type { background: var(--terracotta-deep); }
.news-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.news-preview-head h3 { font-size: 1.55rem; }
.news-preview-head p:not(.eyebrow) { margin: .28rem 0 0; color: var(--muted); font-size: .78rem; }
.news-preview-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.notification-item.compact { grid-template-columns: 38px 1fr 7px; min-height: 116px; border-bottom: 0; border-right: 1px solid var(--line); }
.notification-item.compact:last-child { border-right: 0; }
.notification-item.compact .notification-type { width: 38px; height: 38px; }
.notification-empty.compact { grid-column: 1 / -1; padding: 1.6rem; }
.news-page { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 1rem; align-items: start; }
.news-page-summary { position: sticky; top: 96px; display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(145deg, var(--terracotta-deep), var(--terracotta)); box-shadow: var(--shadow); }
.news-page-summary > span { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.1); }
.news-page-summary strong, .news-page-summary small { display: block; }
.news-page-summary strong { font-family: Georgia,serif; font-size: 2rem; }
.news-page-summary small { color: rgba(255,255,255,.78); font-size: .75rem; }
.news-page-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.74); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; margin: 1.1rem 0; }
.stat-card, .card { border: 1px solid rgba(47,98,80,.14); background: rgba(255,253,249,.9); box-shadow: 0 10px 28px rgba(34,67,52,.055); }
.stat-card { padding: 1.15rem; border-radius: var(--radius-lg); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .76rem; font-weight: 800; }
.stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; color: var(--forest); background: rgba(47,98,80,.11); }
.stat-icon .level-emblem { width: 22px; height: 22px; }
.stat-value { margin: .8rem 0 .25rem; font-family: Georgia, serif; font-size: 2rem; }
.stat-note { color: var(--muted); font-size: .73rem; }

.grid-2 { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.72fr); gap: 1.1rem; }
.card { padding: 1.25rem; border-radius: var(--radius-lg); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.card-head h3 { font-size: 1.25rem; }

.learning-spaces { margin: 1.2rem 0; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: .75rem; }
.section-title h3 { font-size: 1.5rem; }
.space-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.space-card { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; align-items: start; min-height: 190px; padding: 1.25rem; border: 1px solid rgba(47,98,80,.14); border-radius: var(--radius-lg); background: rgba(255,253,249,.91); box-shadow: 0 10px 28px rgba(34,67,52,.05); }
.space-card.sendero-card { color: #fff; border-color: transparent; background: radial-gradient(ellipse at 100% 0%, rgba(120,144,100,.32), transparent 38%), linear-gradient(135deg, var(--forest-deep), var(--forest)); }
.space-card.sendero-card p { color: rgba(255,255,255,.7); }
.space-card h3 { margin-top: .65rem; }
.space-card p { min-height: 48px; margin: .45rem 0 1rem; color: var(--muted); font-size: .82rem; }
.space-symbol { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: var(--terracotta-deep); background: rgba(255,255,255,.86); font-size: 1.45rem; }
.space-symbol .level-emblem { width: 34px; height: 34px; }
.course-card { position: relative; overflow: hidden; border-top: 7px solid var(--course-accent); background: linear-gradient(145deg, color-mix(in srgb, var(--course-accent) 9%, #fffdf9), rgba(255,253,249,.96) 58%); }
.course-card::after { content: ""; position: absolute; right: -46px; bottom: -55px; width: 145px; height: 145px; border: 1px solid color-mix(in srgb, var(--course-accent) 24%, transparent); border-radius: 50%; pointer-events: none; }
.course-card > * { position: relative; z-index: 1; }
.course-symbol { color: #fff; background: var(--course-accent,var(--blue)); box-shadow: 0 8px 20px color-mix(in srgb, var(--course-accent) 24%, transparent); }
.course-kind-pill { color: var(--course-accent,var(--blue)); background: color-mix(in srgb, var(--course-accent) 12%, white); }
.course-accent-button { color: #fff; background: var(--course-accent,var(--blue)); box-shadow: 0 9px 22px color-mix(in srgb, var(--course-accent) 24%, transparent); }
.course-accent-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.course-locked { background: repeating-linear-gradient(135deg, rgba(255,255,255,.65) 0 14px, rgba(80,68,56,.035) 14px 28px); }

.course-catalog { display: grid; grid-template-columns: repeat(auto-fit,minmax(290px,460px)); gap: 1rem; }
.catalog-card { overflow: hidden; border: 1px solid rgba(47,98,80,.15); border-radius: var(--radius-xl); background: rgba(255,253,249,.82); box-shadow: var(--shadow); }
.catalog-visual { position: relative; display: flex; justify-content: space-between; align-items: end; min-height: 170px; padding: 1.4rem; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--course-accent, var(--blue)), var(--earth)); }
.catalog-visual::after { content: ""; position: absolute; width: 180px; height: 180px; right: -45px; top: -55px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035); }
.catalog-visual span { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.35); border-radius: 20px; background: rgba(255,255,255,.1); font-size: 1.8rem; }
.catalog-visual small { position: relative; z-index: 1; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.catalog-body { padding: 1.35rem; }
.catalog-body h3 { margin-top: .75rem; }
.catalog-body p { color: var(--muted); font-size: .86rem; }
.catalog-body > .btn { margin-top: 1rem; }
.catalog-card .progress-fill, .course-context .progress-fill { background: var(--course-accent); }
.catalog-card .course-progress-wrap strong, .course-context .course-progress-wrap strong { color: var(--course-accent); }
.course-progress-wrap { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; }
.course-progress-wrap strong { color: var(--blue); font-family: Georgia,serif; font-size: 1.15rem; }
.locked-note { padding: .8rem; border-radius: 12px; color: var(--muted); background: rgba(201,164,92,.11); font-size: .78rem; line-height: 1.5; }
.blocked-course-card { max-width: 680px; margin: 2rem auto; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-xl); text-align: center; background: rgba(255,255,255,.75); box-shadow: var(--shadow); }
.blocked-course-card p { color: var(--muted); }
.course-context { --course-accent: var(--blue); }
.course-identity-bar { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: .85rem 1rem; border-left: 7px solid var(--course-accent); border-radius: 14px; color: var(--earth); background: color-mix(in srgb, var(--course-accent) 10%, white); }
.course-identity-bar > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: var(--course-accent); font-size: 1.2rem; }
.course-identity-bar small, .course-identity-bar strong { display: block; }
.course-identity-bar small { color: var(--course-accent); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.course-identity-bar strong { margin-top: .18rem; font-size: .88rem; }
.course-progress-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1.2rem; border: 1px solid color-mix(in srgb, var(--course-accent) 24%, transparent); border-left: 7px solid var(--course-accent); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--course-accent) 7%, white); }
.course-progress-card h3 { margin-top: .55rem; font-size: 1.25rem; }
.course-progress-card .course-progress-wrap { min-width: 250px; }
.course-lesson-thumb { background: linear-gradient(135deg, var(--course-accent,var(--blue)), var(--earth)); }

.progress-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.progress-summary > div { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.68); }
.progress-summary strong { grid-row: 1 / span 2; grid-column: 2; font-family: Georgia,serif; font-size: 1.9rem; }
.progress-summary small { color: var(--muted); }

.course-tabs { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: .7rem; margin-bottom: 1rem; }
.course-tab { display: grid; grid-template-columns: 42px 1fr; gap: .75rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; color: var(--earth); background: rgba(255,255,255,.62); text-align: left; }
.course-tab > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(193,107,72,.1); font-size: 1.2rem; }
.course-tab > span .level-emblem { width: 27px; height: 27px; }
.course-tab strong, .course-tab small { display: block; }
.course-tab small { margin-top: .18rem; color: var(--muted); }
.course-tab.active { color: #fff; border-color: var(--earth); background: var(--earth); }
.course-tab.active small { color: rgba(255,255,255,.62); }
.course-admin-note { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 12px; color: var(--blue); background: rgba(47,79,95,.08); }
.course-admin-note p { margin: 0; font-size: .8rem; }

.course-access-list { display: grid; gap: .65rem; }
.course-access-row { display: grid; grid-template-columns: 46px 1fr auto; gap: .8rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.65); }
.course-access-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #fff; background: var(--course-accent,var(--blue)); font-size: 1.25rem; }
.course-access-row strong { font-size: .86rem; }
.course-access-row p { margin: .22rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.course-access-row > .btn { white-space: nowrap; }
.course-access-row > .avatar { width: 46px; height: 46px; font-size: .76rem; }
.roster-summary { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; margin-bottom: 1rem; }
.roster-summary > div { display: flex; align-items: baseline; gap: .55rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.65); }
.roster-summary strong { color: var(--terracotta); font-family: Georgia,serif; font-size: 1.7rem; }
.roster-summary span { color: var(--muted); font-size: .78rem; font-weight: 700; }

.student-center-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.center-mini { display: grid; grid-template-columns: 48px 1fr auto; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid rgba(80,68,56,.12); border-radius: var(--radius-lg); background: rgba(255,253,251,.88); }
.center-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--blue); font-family: Georgia,serif; font-size: 1.25rem; }
.center-icon .nav-svg { width: 22px; height: 22px; }
.center-mini small, .center-mini strong, .center-mini p { display: block; }
.center-mini small { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.center-mini strong { margin-top: .18rem; font-size: .9rem; }
.center-mini p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; }
.next-class-card { border-left: 7px solid var(--blue); background: linear-gradient(135deg, rgba(47,79,95,.09), rgba(255,253,251,.94) 48%); }
.next-class-card .center-icon { background: var(--blue); }
.next-class-card small { color: var(--blue); }
.payment-status-card { border-left: 7px solid var(--gold); background: linear-gradient(135deg, rgba(201,164,92,.12), rgba(255,253,251,.94) 48%); }
.payment-status-card .center-icon { color: var(--earth); background: var(--gold); }
.payment-status-card small { color: #806421; }

.event-list { display: grid; gap: .8rem; }
.event-card { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.76); box-shadow: 0 8px 25px rgba(55,42,32,.05); }
.event-date { display: grid; align-content: center; justify-items: center; min-height: 78px; border-radius: 16px; color: #fff; background: linear-gradient(145deg,var(--blue),#436d7f); }
.event-date strong { font-family: Georgia,serif; font-size: 1.8rem; line-height: 1; }
.event-date span { margin-top: .25rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.event-copy h3 { margin: .55rem 0 .25rem; font-size: 1.05rem; }
.event-copy > p, .event-copy > small { display: block; margin: 0; color: var(--muted); line-height: 1.5; }
.event-copy > p { font-size: .8rem; font-weight: 700; }
.event-copy > small { margin-top: .3rem; font-size: .75rem; }
.event-tags, .event-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.event-actions { margin-top: .8rem; }
.section-divider { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 .85rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.section-divider h2 { margin: .2rem 0 0; font-size: 1.35rem; }
.attendance-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; margin-bottom: 1rem; }
.attendance-summary > div { padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.68); }
.attendance-summary strong, .attendance-summary span { display: block; }
.attendance-summary strong { font-family: Georgia,serif; font-size: 1.55rem; }
.attendance-summary span { margin-top: .15rem; color: var(--muted); font-size: .7rem; font-weight: 800; }
.attendance-summary .success strong { color: var(--success); }
.attendance-summary .danger strong { color: var(--danger); }
.attendance-summary .warning strong { color: #987632; }
.attendance-summary .blue strong { color: var(--blue); }
.attendance-list { display: grid; gap: .65rem; }
.attendance-row { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(360px,1.2fr); gap: .9rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.66); }
.attendance-student { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.attendance-student .avatar { flex: 0 0 auto; width: 39px; height: 39px; font-size: .72rem; }
.attendance-student strong, .attendance-student small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-student strong { font-size: .82rem; }
.attendance-student small { margin-top: .14rem; color: var(--muted); font-size: .68rem; }
.attendance-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .35rem; }
.attendance-option { min-height: 38px; padding: .4rem .3rem; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.7); font-size: .68rem; font-weight: 800; }
.attendance-option.active { color: #fff; border-color: transparent; }
.attendance-option.active.success { background: var(--success); }
.attendance-option.active.danger { background: var(--danger); }
.attendance-option.active.warning { color: #543f18; background: #e6c878; }
.attendance-option.active.blue { background: var(--blue); }
.event-card.event-cancelled { position: relative; grid-template-columns: 72px 1fr; padding-top: 4.4rem; border: 2px solid rgba(169,55,47,.46); background: linear-gradient(145deg,rgba(255,250,249,.96),rgba(169,55,47,.07)); }
.event-cancelled-banner { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.35rem; padding: .65rem 1rem; border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0; color: #fff; background: var(--danger); letter-spacing: .12em; text-align: center; }
.event-cancelled-banner span { font-size: 1.55rem; line-height: 1; }
.event-cancelled-banner strong { font-size: 1.08rem; }
.event-cancelled .event-date { color: rgba(255,255,255,.8); background: linear-gradient(145deg,#8d7772,#aa8c85); filter: grayscale(.35); }
.event-cancelled .event-copy > p { opacity: .65; text-decoration: line-through; }
.event-cancelled-note { margin-top: .75rem; padding: .7rem .85rem; border-left: 4px solid var(--danger); border-radius: 8px; color: #792b25; background: rgba(169,55,47,.09); font-size: .78rem; font-weight: 800; line-height: 1.45; }
.cancelled-class-notice { position: relative; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1.2rem 1.3rem; border: 2px solid var(--danger); border-radius: var(--radius-lg); color: #792b25; background: linear-gradient(135deg,#fff8f7,#f8dfdc); box-shadow: 0 12px 32px rgba(169,55,47,.13); }
.cancelled-class-notice > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: var(--danger); font-size: 2rem; }
.cancelled-class-notice strong { display: block; color: var(--danger); font-size: 1.2rem; letter-spacing: .12em; }
.cancelled-class-notice h3 { margin: .2rem 0; font-size: 1.05rem; }
.cancelled-class-notice p { margin: 0; font-size: .8rem; line-height: 1.5; }
.cancelled-class-notice .text-action { align-self: start; color: var(--danger); font-size: 1.3rem; }

.student-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1.2rem; }
.compact-card { padding: 1rem; box-shadow: none; }
.compact-card .card-head { margin-bottom: .8rem; }
.private-note-list { display: grid; gap: .55rem; margin-top: .8rem; max-height: 250px; overflow-y: auto; }
.private-note { padding: .7rem; border-radius: 10px; background: rgba(47,79,95,.07); }
.private-note p { margin: 0; font-size: .78rem; line-height: 1.5; }
.private-note small { display: block; margin-top: .3rem; color: var(--muted); font-size: .68rem; }
.billing-summary strong { display: block; color: var(--earth); font-family: Georgia,serif; font-size: 2rem; }
.billing-summary p, .billing-summary small { color: var(--muted); }
.file-link { display: inline-flex; margin-top: .7rem; padding: .55rem .7rem; border: 1px solid rgba(47,79,95,.18); border-radius: 10px; color: var(--blue); background: rgba(47,79,95,.07); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.file-link:hover { background: rgba(47,79,95,.12); }

.progress-track { height: 8px; border-radius: 99px; overflow: hidden; background: rgba(80,68,56,.09); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--terracotta), var(--gold)); }

.level-path { display: grid; gap: .65rem; }
.level-row { display: grid; grid-template-columns: 43px 1fr auto; gap: .8rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: 13px; }
.level-row.locked { opacity: .48; }
.level-symbol { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--level-bg, rgba(193,107,72,.11)); font-size: 1.35rem; }
.level-symbol .level-emblem { width: 29px; height: 29px; }
.level-row strong { display: block; font-size: .87rem; }
.level-row small { display: block; margin-top: .18rem; color: var(--muted); }

.lesson-list { display: grid; gap: .85rem; }
.lesson-card { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.72); }
.lesson-thumb { display: grid; place-items: center; aspect-ratio: 1.35; border-radius: 12px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--level-color,var(--terracotta)) 68%, var(--earth)), var(--level-color,var(--terracotta))); font-size: 1.35rem; }
.lesson-thumb .level-emblem { width: 64%; height: 64%; padding: 5%; border-radius: 10px; background: rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(31,26,22,.12); }
.lesson-card h3 { font-family: inherit; font-size: 1rem; }
.lesson-card p { margin: .32rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.lesson-meta { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .55rem; }
.lesson-actions { display: flex; gap: .4rem; }

.level-filter { display: flex; gap: .45rem; overflow: auto; padding-bottom: .4rem; margin-bottom: 1rem; }
.filter-btn { display: inline-flex; align-items: center; gap: .38rem; white-space: nowrap; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.58); font-size: .78rem; font-weight: 800; }
.filter-btn .level-emblem { width: 19px; height: 19px; color: var(--level-color,currentColor); }
.filter-btn.active { color: #fff; border-color: var(--earth); background: var(--earth); }
.filter-btn.active .level-emblem { padding: 2px; border-radius: 50%; background: rgba(255,255,255,.92); }

.empty-state { padding: 2.3rem 1rem; border: 1px dashed rgba(80,68,56,.22); border-radius: 16px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: .35rem; color: var(--earth); }

.activity-item { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-item strong { display: block; font-size: .84rem; }
.activity-item span { display: block; margin-top: .2rem; color: var(--muted); font-size: .73rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem .7rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .8rem; vertical-align: middle; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.person-cell { display: flex; gap: .65rem; align-items: center; }
.person-cell .avatar { width: 34px; height: 34px; font-size: .75rem; }
.presence-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 .9rem; padding: .9rem 1.1rem; border: 1px solid rgba(79,116,92,.2); border-radius: var(--radius-lg); background: linear-gradient(135deg,rgba(79,116,92,.1),rgba(255,255,255,.72)); }
.student-insight-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin-bottom: .9rem; }
.student-insight-grid .presence-summary { margin: 0; }
.follow-up-summary { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border: 1px solid rgba(179,90,75,.22); border-radius: var(--radius-lg); background: linear-gradient(135deg,rgba(179,90,75,.1),rgba(255,255,255,.72)); }
.follow-up-summary > span, .follow-up-callout > span { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--terracotta); font-family: Georgia,serif; font-weight: 900; }
.follow-up-summary strong { color: var(--terracotta); font-family: Georgia,serif; font-size: 1.55rem; }
.follow-up-summary p, .follow-up-summary small { margin: 0; color: var(--muted); font-size: .72rem; }
.follow-up-summary small { margin-left: auto; }
.follow-up-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.follow-up-filter .attention.active { border-color: var(--terracotta); background: var(--terracotta); }
.follow-up-reasons { display: flex; flex-wrap: wrap; gap: .3rem; }
.follow-up-flag { display: inline-flex; padding: .3rem .48rem; border-radius: 99px; color: #873f35; background: rgba(179,90,75,.11); font-size: .65rem; font-weight: 800; }
.follow-up-callout { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; padding: .9rem; border: 1px solid rgba(179,90,75,.2); border-radius: 14px; background: rgba(179,90,75,.07); }
.follow-up-callout strong { display: block; margin-bottom: .45rem; font-size: .84rem; }
.attendance-history { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.58); }
.attendance-totals { display: flex; flex-wrap: wrap; gap: .35rem; }
.attendance-history-row { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.attendance-history-row strong, .attendance-history-row small { display: block; }
.attendance-history-row strong { font-size: .8rem; }
.attendance-history-row small { margin-top: .18rem; color: var(--muted); font-size: .68rem; }
.presence-summary > div { display: flex; align-items: center; gap: .55rem; }
.presence-summary strong { color: var(--success); font-family: Georgia,serif; font-size: 1.55rem; }
.presence-summary p, .presence-summary small { margin: 0; color: var(--muted); font-size: .75rem; }
.presence-live-dot, .presence-dot { display: block; flex: 0 0 auto; border-radius: 50%; }
.presence-live-dot { width: 11px; height: 11px; background: var(--success); box-shadow: 0 0 0 5px rgba(79,116,92,.13); animation: presence-pulse 2s infinite; }
.presence-status { display: grid; grid-template-columns: 10px minmax(150px,1fr); gap: .55rem; align-items: center; min-width: 185px; }
.presence-status .presence-dot { width: 9px; height: 9px; background: #a69d95; }
.presence-status.online .presence-dot { background: #3d8b57; box-shadow: 0 0 0 4px rgba(61,139,87,.13); }
.presence-status strong, .presence-status small { display: block; }
.presence-status strong { font-size: .76rem; }
.presence-status.online strong { color: #327047; }
.presence-status.offline strong, .presence-status.never strong { color: var(--muted); }
.presence-status small { margin-top: .12rem; color: var(--muted); font-size: .66rem; white-space: nowrap; }
.student-modal-presence { margin-top: .65rem; }
.student-modal-presence .presence-status { min-width: 0; }
.student-progress-cell { display: flex; align-items: center; gap: .55rem; }
.student-progress-cell .progress-track { width: 90px; }
@keyframes presence-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(79,116,92,.12); } 50% { box-shadow: 0 0 0 8px rgba(79,116,92,.04); } }

.toolbar { display: flex; justify-content: space-between; gap: .7rem; margin-bottom: 1rem; }
.search { min-width: min(330px, 100%); padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 11px; outline: none; background: rgba(255,255,255,.66); }

.switch { position: relative; display: inline-block; width: 43px; height: 24px; cursor: pointer; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(80,68,56,.22); transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::before { transform: translateX(19px); }
.switch input:disabled + span { opacity: .55; cursor: wait; }
.course-color-field { margin: 1rem 0 0; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; }
.course-color-field legend { padding: 0 .35rem; color: var(--earth); font-size: .8rem; font-weight: 850; }
.course-color-field > p { margin: 0 0 .8rem; color: var(--muted); font-size: .76rem; }
.course-color-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: .55rem; }
.course-color-option { display: grid; grid-template-columns: 28px 1fr; gap: .08rem .55rem; align-items: center; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.62); cursor: pointer; }
.course-color-option input { position: absolute; opacity: 0; pointer-events: none; }
.course-color-swatch { grid-row: 1 / span 2; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px rgba(80,68,56,.18); }
.course-color-option strong { font-size: .7rem; }
.course-color-option small { color: var(--success); font-size: .62rem; font-weight: 800; }
.course-color-option:has(input:checked) { border-color: var(--swatch); box-shadow: 0 0 0 2px color-mix(in srgb, var(--swatch) 22%, transparent); }
.course-color-option.unavailable { opacity: .42; cursor: not-allowed; filter: grayscale(.45); }
.course-color-option.unavailable small { color: var(--danger); }
.course-color-option:focus-within { outline: 3px solid rgba(47,79,95,.18); outline-offset: 2px; }
.course-color-status { margin-top: .7rem; color: var(--forest); font-size: .7rem; font-weight: 800; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem; }
.password-toggle { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; }
.password-toggle:hover, .password-toggle.visible { background: rgba(47,79,95,.09); color: var(--blue); }
.field-hint { min-height: 1.15rem; display: block; margin-top: .35rem; font-size: .78rem; }
.success-text { color: var(--success); }
.error-text { color: var(--danger); }
.heading-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.form-status { margin: 1rem 0 0; padding: .72rem .85rem; border-radius: 12px; color: var(--blue); background: rgba(47,79,95,.08); font-size: .76rem; font-weight: 700; line-height: 1.45; }
.form-status.error { color: #7d332c; background: rgba(169,55,47,.1); }
.form-status.success { color: var(--success); background: rgba(79,116,92,.1); }

.level-control { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.level-toggle { padding: .7rem .45rem; border: 1px solid var(--line); border-radius: 12px; text-align: center; background: rgba(255,255,255,.62); }
.level-toggle.locked { filter: grayscale(.7); opacity: .55; }
.level-toggle span { display: block; font-size: 1.25rem; }
.level-toggle span .level-emblem { width: 28px; height: 28px; margin: 0 auto; }
.level-toggle strong { display: block; margin-top: .3rem; font-size: .68rem; }

.drawer-backdrop, .modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(31,26,22,.48);
  backdrop-filter: blur(4px);
}
.drawer { position: fixed; z-index: 61; top: 0; right: 0; width: min(620px, 100%); height: 100vh; overflow-y: auto; padding: clamp(1.2rem, 4vw, 2.2rem); background: var(--cream); box-shadow: -24px 0 70px rgba(37,29,23,.24); }
.drawer-head { display: flex; justify-content: space-between; gap: 1rem; }
.drawer-close { border: 0; background: rgba(80,68,56,.08); border-radius: 50%; width: 38px; height: 38px; }
.drawer .eyebrow { display: flex; align-items: center; gap: .35rem; }
.drawer .eyebrow .level-emblem { width: 18px; height: 18px; }
.video-box { position: relative; display: grid; place-items: center; aspect-ratio: 16/9; margin: 1.3rem 0; overflow: hidden; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #41372e, #835943); }
.video-box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.14), transparent 35%); }
.play-button { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; background: rgba(255,255,255,.13); font-size: 1.25rem; }
.lesson-body { line-height: 1.72; }
.callout { padding: 1rem; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: rgba(201,164,92,.1); }

.modal-backdrop { display: grid; place-items: center; padding: 1rem; }
.modal { width: min(680px, 100%); max-height: 92vh; overflow-y: auto; padding: 1.4rem; border-radius: var(--radius-lg); background: var(--cream); box-shadow: var(--shadow); }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }

.account-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-top: 1.2rem; padding: 1.2rem 1.3rem; border: 1px solid rgba(161,73,62,.28); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(161,73,62,.07)); }
.account-danger-zone.compact { margin-top: 1.2rem; box-shadow: none; }
.account-danger-zone h3 { margin: .15rem 0 .35rem; color: #792b25; }
.account-danger-zone p:last-child { max-width: 680px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.account-danger-zone .btn { flex: 0 0 auto; }
.account-delete-modal { width: min(620px, 100%); }
.delete-warning { display: grid; grid-template-columns: 44px 1fr; gap: .85rem; align-items: start; margin-bottom: 1.2rem; padding: 1rem; border-radius: 14px; color: #792b25; background: rgba(161,73,62,.09); }
.delete-warning > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: var(--danger); font-size: 1.25rem; font-weight: 900; }
.delete-warning p { margin: .25rem 0 0; font-size: .8rem; line-height: 1.5; }
.delete-consent { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1rem; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.delete-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: .05rem; accent-color: var(--danger); }
.account-delete-modal .auth-alert { margin-top: 1rem; }
.btn-danger:disabled { cursor: not-allowed; opacity: .48; }

.blocked-screen { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.blocked-card { width: min(560px,100%); padding: 2rem; border: 1px solid var(--line); border-radius: 26px; text-align: center; background: rgba(255,255,255,.8); box-shadow: var(--shadow); }
.blocked-symbol { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 1.2rem; border-radius: 50%; color: var(--danger); background: rgba(161,73,62,.09); font-size: 1.8rem; }

.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .6rem; }
.toast { min-width: min(340px, calc(100vw - 2rem)); padding: .9rem 1rem; border-radius: 12px; color: #fff; background: var(--earth); box-shadow: var(--shadow); animation: toast-in .22s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.course-player-shell {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.course-player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.84);
}
.course-player-toolbar > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .55rem; }
.course-player-toolbar strong { font-size: .88rem; }
.course-player-toolbar small { grid-column: 2; color: var(--muted); font-size: .72rem; }
.course-live-dot { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(79,116,92,.12); }
.course-player-frame { display: block; width: 100%; min-height: 760px; height: calc(100vh - 185px); border: 0; background: #fffaf4; }
.integration-note { align-items: flex-start; }
.integration-note p { margin: .3rem 0 0; }

.mobile-menu { display: none; }
.mobile-only { display: none; }
.mobile-bottom-nav { display: none; }
.sidebar-mobile-head > .brand { margin: 0; }
.sidebar-mobile-close { display: none; }

.install-guide-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: end center; padding: 1rem; background: rgba(31,26,22,.5); backdrop-filter: blur(6px); }
.install-guide { position: relative; display: grid; grid-template-columns: 116px 1fr; gap: 1.2rem; width: min(610px,100%); padding: 1.25rem; border: 1px solid rgba(255,255,255,.45); border-radius: 25px; background: linear-gradient(145deg,#fffdf9,#f3e9dc); box-shadow: 0 24px 70px rgba(37,29,23,.3); animation: install-guide-in .28s ease-out; }
.install-guide-close { position: absolute; top: .7rem; right: .7rem; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--earth); background: rgba(80,68,56,.08); font-size: 1.25rem; }
.install-app-icon { display: grid; place-items: center; align-self: start; width: 108px; height: 108px; overflow: hidden; border-radius: 24px; background: linear-gradient(145deg,#fffaf2,#eadac6); box-shadow: 0 10px 24px rgba(86,64,46,.18), inset 0 0 0 1px rgba(80,68,56,.08); }
.install-app-icon img { width: 92%; height: 92%; object-fit: contain; }
.install-guide-copy { padding-right: 1.4rem; }
.install-guide-copy h2 { margin: .2rem 0 .45rem; font-size: 1.45rem; }
.install-guide-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.install-guide-copy ol { display: grid; gap: .35rem; margin: .8rem 0; padding-left: 1.25rem; color: var(--earth); font-size: .77rem; line-height: 1.45; }
.install-hint { margin-top: .7rem; padding: .65rem .8rem; border-radius: 10px; color: var(--blue); background: rgba(47,79,95,.08); font-size: .72rem; font-weight: 800; text-align: center; }
.install-hint.warning { color: #7d332c; background: rgba(169,55,47,.1); }
.install-browser-notice { display: grid; gap: .2rem; margin-top: .75rem; padding: .7rem .8rem; border-left: 4px solid var(--terracotta); border-radius: 0 12px 12px 0; color: var(--earth); background: rgba(193,107,72,.09); }
.install-browser-notice strong { font-size: .76rem; }
.install-browser-notice span { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.install-guide .btn-block { margin-top: .55rem; }
.install-guide .text-action { display: block; margin: .65rem auto 0; }
@keyframes install-guide-in { from { opacity: 0; transform: translateY(22px) scale(.98); } }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .welcome-banner { grid-template-columns: 1fr; }
  .today-focus { max-width: 420px; }
}

@media (max-width: 820px) {
  .install-guide { grid-template-columns: 76px 1fr; gap: .9rem; padding: 1rem; border-radius: 22px; }
  .install-app-icon { width: 72px; height: 72px; border-radius: 18px; }
  .install-guide-copy { padding-right: 1rem; }
  .install-guide-copy h2 { padding-right: .6rem; font-size: 1.2rem; }
  .student-insight-grid { grid-template-columns: 1fr; }
  .follow-up-summary small { display: none; }
  .attendance-row { grid-template-columns: 1fr; }
  .attendance-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .attendance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: min(64svh, 610px); padding: 1.5rem; }
  .hero-slide img { object-position: center 32%; }
  .hero-slide-copy { right: 1.5rem; bottom: 5.35rem; left: 1.5rem; }
  .hero-slide-copy h1 { font-size: clamp(2.15rem,10vw,3.4rem); }
  .hero-slide-copy > p:last-child { max-width: 94%; margin-top: .75rem; font-size: .86rem; line-height: 1.5; }
  .hero-carousel-controls { right: 1.5rem; bottom: 1.2rem; }
  .hero-arrow { width: 36px; height: 36px; }
  .hero-note { display: none; }
  .auth-panel { padding: 2rem 1.2rem 3.5rem; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 51; inset: 0 auto 0 0; width: min(300px, 88vw); transform: translateX(-105%); transition: .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mobile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
  .sidebar-mobile-head > .brand { min-width: 0; padding-bottom: 1rem; }
  .sidebar-mobile-close { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; margin-top: .15rem; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #fff; background: rgba(255,255,255,.1); font-size: 1.25rem; }
  .mobile-sidebar-backdrop { z-index: 49; display: block; background: rgba(31,26,22,.38); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mobile-menu, .mobile-only { display: inline-flex; }
  .topbar { min-height: 66px; }
  .content { padding-bottom: 4rem; }
  .level-control { grid-template-columns: repeat(3,1fr); }
  .space-grid { grid-template-columns: 1fr; }
  .student-center-strip, .student-admin-grid { grid-template-columns: 1fr; }
  .news-preview-list { grid-template-columns: 1fr; }
  .notification-item.compact { border-right: 0; border-bottom: 1px solid var(--line); }
  .news-page { grid-template-columns: 1fr; }
  .news-page-summary { position: static; }
  .mobile-bottom-nav { position: fixed; z-index: 42; right: .7rem; bottom: .65rem; left: .7rem; display: grid; grid-template-columns: repeat(5,1fr); padding: .4rem; border: 1px solid rgba(80,68,56,.14); border-radius: 20px; background: rgba(255,253,251,.94); box-shadow: 0 16px 46px rgba(43,33,26,.2); backdrop-filter: blur(18px); }
  .mobile-nav-btn { display: grid; justify-items: center; gap: .2rem; min-width: 0; padding: .42rem .15rem; border: 0; border-radius: 14px; color: var(--muted); background: transparent; }
  .mobile-nav-btn > span { position: relative; display: grid; place-items: center; }
  .mobile-nav-btn .nav-svg { width: 21px; height: 21px; }
  .mobile-nav-btn small { overflow: hidden; width: 100%; font-size: .62rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-btn i { position: absolute; top: -7px; right: -11px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; color: #fff; background: var(--danger); font-size: .55rem; font-style: normal; }
  .mobile-nav-btn.active { color: var(--terracotta-deep); background: rgba(193,107,72,.11); }
  .content { padding-bottom: 7rem; }
  .student-roster-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .student-roster-card .toolbar { flex-direction: column; align-items: stretch; padding: .85rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.74); }
  .student-roster-card .search { min-width: 0; width: 100%; }
  .student-roster-card .table-wrap { overflow: visible; }
  .student-roster-table, .student-roster-table tbody { display: block; width: 100%; }
  .student-roster-table thead { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); white-space: nowrap; }
  .student-roster-table tbody { display: grid; gap: .8rem; }
  .student-roster-table tr { display: block; padding: .25rem .95rem .9rem; border: 1px solid rgba(80,68,56,.14); border-radius: 18px; background: rgba(255,253,251,.92); box-shadow: 0 8px 24px rgba(74,58,44,.055); }
  .student-roster-table td { display: grid; grid-template-columns: minmax(88px,.7fr) minmax(0,1.5fr); gap: .8rem; align-items: center; padding: .62rem 0; border-bottom: 1px solid rgba(80,68,56,.09); }
  .student-roster-table td::before { content: attr(data-label); color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .student-roster-table .student-primary { display: block; padding: .85rem 0; }
  .student-roster-table .student-primary::before, .student-roster-table .student-action::before { content: none; }
  .student-roster-table .person-cell .avatar { width: 44px; height: 44px; }
  .student-roster-table .presence-status { min-width: 0; }
  .student-roster-table .presence-status small { white-space: normal; }
  .student-roster-table .student-action { display: block; padding: .85rem 0 0; border-bottom: 0; }
  .student-roster-table .student-action .btn { width: 100%; }
}

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

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .stat-card { padding: .9rem; }
  .stat-value { font-size: 1.65rem; }
  .field-row { grid-template-columns: 1fr; }
  .demo-actions { grid-template-columns: 1fr; }
  .welcome-banner { padding: 1.5rem; }
  .view-heading { align-items: start; flex-direction: column; }
  .lesson-card { grid-template-columns: 62px 1fr; }
  .lesson-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .level-row { grid-template-columns: 40px 1fr; }
  .level-row > :last-child { grid-column: 2; }
  .toolbar { flex-direction: column; }
  .topbar .role-chip { display: none; }
  .topbar-actions > .small { display: none; }
  .instagram-link { width: 42px; padding: 0; }
  .instagram-link-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .notification-label { display: none; }
  .notification-bell { width: 42px; padding: 0; justify-content: center; }
  .notification-panel { position: fixed; top: 72px; right: .75rem; left: .75rem; width: auto; max-height: min(62vh, 480px); }
  .notification-list { max-height: min(38vh, 300px); -webkit-overflow-scrolling: touch; }
  .level-control { grid-template-columns: 1fr 1fr; }
  .progress-summary { grid-template-columns: 1fr; }
  .course-progress-card { align-items: stretch; flex-direction: column; }
  .course-progress-card .course-progress-wrap { min-width: 0; }
  .course-access-row { grid-template-columns: 42px 1fr; }
  .course-access-row > .btn { grid-column: 2; justify-self: start; }
  .roster-summary { grid-template-columns: 1fr; }
  .course-player-toolbar { align-items: stretch; flex-direction: column; }
  .course-player-frame { min-height: 640px; height: 78vh; }
  .center-mini { grid-template-columns: 44px 1fr; }
  .center-mini > :last-child { grid-column: 2; justify-self: start; }
  .event-card { grid-template-columns: 58px 1fr; }
  .event-card.event-cancelled { grid-template-columns: 58px 1fr; }
  .presence-summary { align-items: flex-start; flex-direction: column; }
  .cancelled-class-notice { grid-template-columns: 44px 1fr; }
  .cancelled-class-notice > span { width: 44px; height: 44px; }
  .cancelled-class-notice .text-action { position: absolute; top: .6rem; right: .75rem; }
  .account-danger-zone { align-items: stretch; flex-direction: column; }
  .account-danger-zone .btn { width: 100%; }
  .account-delete-modal .modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .account-delete-modal .modal-footer .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
