:root {
  --red: #c62828;
  --red-strong: #991b1b;
  --red-soft: #ffecec;
  --red-line: #efb0b0;
  --navy: #0b1f4d;
  --navy-soft: #22376c;
  --navy-line: #29427f;
  --white: #ffffff;
  --bg: #eef2fb;
  --surface: #f8faff;
  --line: #d6def0;
  --text: #0f2048;
  --muted: #4f6290;
  --success: #0f8a4c;
  --danger: #c62828;
  --shadow-xl: 0 24px 48px rgba(11, 31, 77, 0.18);
  --shadow-lg: 0 14px 28px rgba(11, 31, 77, 0.14);
  --shadow-md: 0 10px 22px rgba(11, 31, 77, 0.12);
  --shadow-sm: 0 6px 18px rgba(11, 31, 77, 0.1);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.bg-shape {
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  animation: floatingShape 12s ease-in-out infinite;
}

.bg-shape-a {
  width: 520px;
  height: 520px;
  right: -220px;
  top: -180px;
}

.bg-shape-b {
  width: 380px;
  height: 380px;
  left: -170px;
  bottom: -130px;
  animation-delay: -6s;
}

@keyframes floatingShape {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(12px);
  }
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.app-main {
  width: min(1260px, 96vw);
  margin: 22px auto 42px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen-enter {
  animation: screenReveal 420ms var(--ease-standard) both;
}

@keyframes screenReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-shell {
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.entry-footer-note {
  margin: 10px auto 0;
  text-align: center;
  font-size: 0.72rem;
  color: #4e618d;
  max-width: min(92vw, 860px);
}

.entry-promo {
  background: var(--navy);
  color: var(--white);
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  align-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.entry-promo::before,
.entry-promo::after {
  content: "";
  position: absolute;
  background: var(--red);
}

.entry-promo::before {
  width: 220px;
  height: 220px;
  border-radius: 40px;
  right: -72px;
  top: -58px;
  opacity: 0.24;
}

.entry-promo::after {
  width: 310px;
  height: 22px;
  border-radius: 999px;
  left: -74px;
  bottom: 58px;
  opacity: 0.34;
  transform: rotate(-27deg);
}

.entry-promo > * {
  opacity: 0;
  transform: translateY(10px);
  animation: staggerIn 560ms var(--ease-standard) forwards;
}

.entry-promo > *:nth-child(1) {
  animation-delay: 50ms;
}

.entry-promo > *:nth-child(2) {
  animation-delay: 120ms;
}

.entry-promo > *:nth-child(3) {
  animation-delay: 190ms;
}

.entry-promo > *:nth-child(4) {
  animation-delay: 260ms;
}

.entry-promo > *:nth-child(5) {
  animation-delay: 330ms;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.promo-tag {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.entry-promo h1 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.entry-promo h2 {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: #d8e2ff;
}

.hero-highlight {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.promo-points {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.promo-points.compact {
  max-width: 440px;
}

.promo-point {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  transition: transform 0.22s var(--ease-standard), background-color 0.22s var(--ease-standard);
}

.promo-point:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.08);
}

.promo-point .material-symbols-outlined {
  font-size: 1.2rem;
  margin-top: 2px;
}

.promo-point p {
  font-size: 0.93rem;
  line-height: 1.45;
  color: #e9eeff;
}

.entry-panel {
  background: var(--white);
  padding: clamp(22px, 4vw, 54px);
  display: grid;
  place-items: center;
}

.entry-card,
.auth-card {
  width: min(470px, 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: clamp(18px, 2.5vw, 30px);
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.entry-card::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--red);
  opacity: 0.28;
}

.entry-card > *,
.auth-card > * {
  opacity: 0;
  transform: translateY(8px);
  animation: staggerIn 460ms var(--ease-standard) forwards;
}

.entry-card > *:nth-child(1),
.auth-card > *:nth-child(1) {
  animation-delay: 50ms;
}

.entry-card > *:nth-child(2),
.auth-card > *:nth-child(2) {
  animation-delay: 100ms;
}

.entry-card > *:nth-child(3),
.auth-card > *:nth-child(3) {
  animation-delay: 150ms;
}

.entry-card > *:nth-child(4),
.auth-card > *:nth-child(4) {
  animation-delay: 200ms;
}

.entry-card > *:nth-child(5),
.auth-card > *:nth-child(5) {
  animation-delay: 250ms;
}

.entry-card > *:nth-child(6),
.auth-card > *:nth-child(6) {
  animation-delay: 300ms;
}

.section-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-card h3,
.auth-card h3 {
  font-family: "Sora", "Manrope", sans-serif;
  color: var(--navy);
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.role-grid {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.role-btn {
  min-height: 96px;
  border: 1px solid #c9d5ef;
  background: var(--white);
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease-standard), transform 0.25s var(--ease-standard), box-shadow 0.25s var(--ease-standard), background-color 0.25s var(--ease-standard);
}

.role-btn::after {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: var(--red-soft);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s var(--ease-standard), transform 0.25s var(--ease-standard);
}

.role-btn:hover {
  border-color: var(--navy-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.role-btn:hover::after {
  opacity: 0.5;
  transform: scale(1);
}

.role-btn.active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.role-icon {
  font-size: 1.45rem;
}

.help-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.help-box p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.instagram-btn {
  width: fit-content;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.2s var(--ease-standard), background-color 0.2s var(--ease-standard);
}

.instagram-btn:hover {
  background: var(--navy-soft);
  transform: translateY(-1px);
}

.auth-shell .entry-promo {
  gap: 14px;
}

.auth-shell .entry-promo h3 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--white);
  transition: border-color 0.2s var(--ease-standard), box-shadow 0.2s var(--ease-standard);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--navy-soft);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 55, 108, 0.18);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.small-btn {
  border: 0;
  border-radius: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.22s var(--ease-standard), color 0.22s var(--ease-standard), transform 0.22s var(--ease-standard), box-shadow 0.22s var(--ease-standard);
}

.primary-btn {
  background: var(--red);
  color: var(--white);
  padding: 11px 16px;
  box-shadow: 0 6px 12px rgba(198, 40, 40, 0.24);
}

.primary-btn:hover {
  background: var(--red-strong);
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.small-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-btn {
  background: var(--navy);
  color: var(--white);
  padding: 11px 16px;
  box-shadow: 0 6px 12px rgba(11, 31, 77, 0.2);
}

.secondary-btn:hover {
  background: var(--navy-soft);
  transform: translateY(-1px);
}

.ghost-btn {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--navy-line);
  padding: 10px 15px;
}

.ghost-btn:hover {
  background: #eff4ff;
}

.danger-btn {
  background: var(--red-strong);
  color: var(--white);
  padding: 10px 15px;
}

.small-btn {
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  padding: 7px 12px;
}

.small-btn.danger-light {
  background: #fff0f0;
  color: var(--red-strong);
  border: 1px solid #f6c2c2;
}

.small-btn.danger-light:hover {
  background: #ffe3e3;
}

.link-like-btn {
  border: none;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.link-like-btn:hover {
  color: var(--red);
  text-decoration: underline;
}

.small-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

.compact {
  padding: 8px 14px;
}

.inline-feedback {
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.9rem;
  font-weight: 700;
  animation: feedbackIn 240ms var(--ease-standard) both;
}

@keyframes feedbackIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inline-feedback.info {
  background: #ecf2ff;
  color: var(--navy);
  border: 1px solid #bfd1fd;
}

.inline-feedback.success {
  background: #e8ffef;
  color: var(--success);
  border: 1px solid #b3eac8;
}

.inline-feedback.error {
  background: #fff0f0;
  color: var(--danger);
  border: 1px solid #ffc9c9;
}

.app-header {
  width: min(1280px, 96vw);
  margin: 14px auto 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 10px;
  z-index: 200;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 1.2rem;
}

.brand-title {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--red);
}

.brand-subtitle {
  font-size: 0.84rem;
  color: var(--navy);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user-name {
  margin-right: 6px;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--navy);
}

.header-student-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #ccdaf7;
  border-radius: 12px;
  background: #f6f9ff;
}

.header-student-search input {
  width: clamp(200px, 26vw, 300px);
  border: none;
  background: transparent;
  padding: 0 8px;
  font-size: 0.86rem;
  color: var(--navy);
}

.header-student-search input:focus {
  outline: none;
}

.icon-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.2s var(--ease-standard), border-color 0.2s var(--ease-standard), background-color 0.2s var(--ease-standard);
}

.icon-btn:hover {
  border-color: var(--navy-line);
  background: #eef3ff;
  transform: translateY(-1px);
}

.icon-btn.icon-only {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
}

.icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.icon-btn .material-symbols-outlined {
  font-size: 1.14rem;
}

.dashboard-wrap {
  display: grid;
  gap: 14px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  animation: statIn 420ms var(--ease-standard) forwards;
}

.stat-box:nth-child(1) {
  animation-delay: 40ms;
}

.stat-box:nth-child(2) {
  animation-delay: 90ms;
}

.stat-box:nth-child(3) {
  animation-delay: 140ms;
}

@keyframes statIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--red);
  opacity: 0.22;
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.stat-label .material-symbols-outlined {
  font-size: 1rem;
  color: var(--navy);
}

.stat-box strong {
  display: block;
  margin-top: 5px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--red);
}

.dashboard-lists {
  display: grid;
  gap: 12px;
}

.list-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.list-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.08rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.list-panel h3 .material-symbols-outlined {
  color: var(--red);
  font-size: 1.15rem;
}

.list-featured {
  border-width: 2px;
  border-color: #f0b4b4;
}

.olympiad-list {
  display: grid;
  gap: 10px;
}

.olympiad-card {
  --stagger: 0;
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: 13px;
  padding: 14px;
  background: var(--white);
  cursor: pointer;
  transition: transform 0.18s var(--ease-standard), box-shadow 0.18s var(--ease-standard), border-color 0.18s var(--ease-standard);
  opacity: 0;
  transform: translateY(10px);
  animation: cardIn 380ms var(--ease-standard) forwards;
  animation-delay: calc(var(--stagger) * 55ms);
  position: relative;
}

.olympiad-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--navy);
  opacity: 0.08;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.olympiad-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.olympiad-card.open {
  border-left-color: var(--red);
}

.olympiad-card.open::before {
  background: var(--red);
  opacity: 0.12;
}

.olympiad-card.closed {
  opacity: 0.92;
}

.olympiad-card h4 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.04rem;
  color: var(--navy);
  margin-bottom: 7px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border-radius: 999px;
  border: 1px solid;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.pill.red {
  background: #fff1f1;
  border-color: var(--red-line);
  color: var(--red);
}

.pill.navy {
  background: #edf3ff;
  border-color: #c7d6fb;
  color: var(--navy);
}

.pill.green {
  background: #e9fff1;
  border-color: #b3ebc8;
  color: var(--success);
}

.class-display-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.class-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid;
  white-space: nowrap;
}

.class-chip-fundamental {
  background: #edf3ff;
  color: var(--navy);
  border-color: #c4d4fb;
}

.class-chip-medio {
  background: #fff1f1;
  color: var(--red);
  border-color: #f1b0b0;
}

.field-help {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed #aebee6;
  border-radius: 12px;
  color: #5d75aa;
  text-align: center;
  padding: 22px 14px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(238, 242, 251, 0.86);
  display: grid;
  place-items: center;
  z-index: 1200;
}

.loading-box {
  width: min(300px, 90vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  text-align: center;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #dbe4fb;
  border-top-color: var(--red);
  border-radius: 999px;
  margin: 0 auto 8px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(12, 28, 66, 0.52);
  padding: 16px;
  animation: backdropIn 180ms ease-out both;
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-card {
  width: min(780px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  animation: modalIn 260ms var(--ease-standard) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-head h3 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.2rem;
  color: var(--navy);
}

.close-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-standard), transform 0.2s var(--ease-standard);
}

.close-btn:hover {
  background: #eff3ff;
  transform: scale(1.03);
}

.form-grid {
  display: grid;
  gap: 10px;
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-group {
  display: grid;
  gap: 8px;
}

.check-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.check-row input {
  width: auto;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.divider {
  border-top: 1px solid var(--line);
  margin: 9px 0;
}

.inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-row-end {
  align-items: flex-end;
}

.inline-row-bottom {
  margin-bottom: 8px;
}

.field-help-top {
  margin-top: 8px;
}

.field-help-top-lg {
  margin-top: 24px;
}

.table-empty {
  text-align: center;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e3e9f7;
  text-align: left;
  padding: 8px;
  font-size: 0.9rem;
}

th {
  background: #f3f7ff;
  color: var(--navy);
  font-weight: 800;
}

tbody tr {
  transition: background-color 0.18s var(--ease-standard);
}

tbody tr:hover {
  background: #f8fbff;
}

.payment-btn.pending {
  background: #fff0f0;
  color: var(--danger);
  border: 1px solid #ffb8b8;
}

.payment-btn.paid {
  background: #e8fff1;
  color: var(--success);
  border: 1px solid #a9e8c0;
}

.badge-inline {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-inline.pending {
  background: #fff0f0;
  color: var(--red);
}

.badge-inline.paid {
  background: #e8fff1;
  color: var(--success);
}

@media (max-width: 1060px) {
  .entry-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .entry-promo {
    min-height: 320px;
  }

  .dashboard-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-main {
    width: min(100%, 100vw);
    margin: 12px auto 22px;
    padding-inline: 10px;
  }

  .app-header {
    width: calc(100% - 20px);
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-student-search {
    width: 100%;
  }

  .header-student-search input {
    width: 100%;
  }

  .entry-promo,
  .entry-panel,
  .entry-card,
  .auth-card,
  .list-panel,
  .modal-card {
    padding: 14px;
  }

  .role-grid,
  .two-cols,
  .three-cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}











fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
}

legend {
  padding: 0 8px;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.9rem;
}
