:root {
  --ui-primary: #0f766e;
  --ui-primary-2: #14b8a6;
  --ui-primary-soft: rgba(20, 184, 166, 0.12);
  --ui-accent: #f59e0b;
  --ui-accent-soft: rgba(245, 158, 11, 0.14);
  --ui-ink: #102133;
  --ui-ink-soft: #476075;
  --ui-muted: #6f8699;
  --ui-line: rgba(148, 163, 184, 0.2);
  --ui-glass: rgba(255, 255, 255, 0.72);
  --ui-glass-strong: rgba(255, 255, 255, 0.9);
  --ui-shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
  --ui-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --ui-shadow-glow: 0 16px 38px rgba(15, 118, 110, 0.18);
  --ui-radius-sm: 14px;
  --ui-radius-md: 20px;
  --ui-radius-lg: 28px;
}

body.public-shell,
body.student-portal {
  font-family: "Readex Pro", "Tajawal", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 24rem),
    radial-gradient(circle at left center, rgba(56, 189, 248, 0.14), transparent 26rem),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.12), transparent 22rem),
    linear-gradient(180deg, #f7fdfa 0%, #f5f7fb 50%, #fdfaf4 100%);
  color: var(--ui-ink);
  min-height: 100vh;
  overflow-x: hidden;
}

body.public-shell > :not(.public-shell-backdrop),
body.student-portal > :not(.public-shell-backdrop) {
  position: relative;
  z-index: 1;
}

.public-shell-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.public-shell-backdrop__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
  animation: uiFloat 18s ease-in-out infinite;
}

.public-shell-backdrop__orb--a {
  top: 4rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28) 0%, rgba(20, 184, 166, 0.06) 58%, transparent 72%);
}

.public-shell-backdrop__orb--b {
  top: 36%;
  left: -5rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.24) 0%, rgba(56, 189, 248, 0.05) 60%, transparent 74%);
  animation-delay: -6s;
}

.public-shell-backdrop__orb--c {
  bottom: -5rem;
  right: 18%;
  width: 17rem;
  height: 17rem;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.05) 56%, transparent 74%);
  animation-delay: -11s;
}

@keyframes uiFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -14px, 0) scale(1.04); }
}

body.public-shell h1,
body.public-shell h2,
body.public-shell h3,
body.public-shell h4,
body.public-shell h5,
body.public-shell h6,
body.student-portal h1,
body.student-portal h2,
body.student-portal h3,
body.student-portal h4,
body.student-portal h5,
body.student-portal h6,
body.public-shell .fw-title,
body.student-portal .fw-title {
  font-family: "Tajawal", sans-serif;
  color: var(--ui-ink);
  letter-spacing: -0.02em;
}

body.public-shell .ec-card,
body.public-shell .glass-card,
body.public-shell .table-responsive,
body.public-shell .modal-content,
body.public-shell .ec-tabs,
body.student-portal .glass-card,
body.student-portal .table-responsive,
body.student-portal .modal-content,
body.student-portal .kv,
body.student-portal .section-head {
  background: var(--ui-glass);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
}

body.public-shell .ec-card,
body.public-shell .glass-card,
body.student-portal .glass-card {
  border-radius: var(--ui-radius-md);
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 180ms ease;
}

body.public-shell .ec-card:hover,
body.public-shell .glass-card:hover,
body.student-portal .glass-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui-shadow-glow);
  border-color: rgba(20, 184, 166, 0.22);
}

body.public-shell .ec-tab,
body.public-shell .btn,
body.public-shell .ec-btn,
body.student-portal .btn,
body.student-portal .btn-theme {
  border-radius: 999px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 220ms ease, background-color 180ms ease, border-color 180ms ease;
}

body.public-shell .btn:hover,
body.public-shell .ec-btn:hover,
body.student-portal .btn:hover,
body.student-portal .btn-theme:hover {
  transform: translateY(-2px);
}

body.public-shell .ec-btn-primary,
body.public-shell .btn-primary,
body.student-portal .btn-theme {
  background: linear-gradient(135deg, var(--ui-primary), var(--ui-primary-2));
  border: none;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
}

body.public-shell .ec-btn-soft,
body.public-shell .btn-light,
body.public-shell .btn-outline-secondary,
body.student-portal .btn-minimal {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--ui-line);
  color: var(--ui-ink-soft);
}

body.public-shell .ec-tabs {
  padding: 0.45rem;
  border-radius: var(--ui-radius-lg);
  margin-bottom: 1.25rem;
}

body.public-shell .ec-tab {
  min-height: 46px;
  border: 1px solid transparent;
  color: var(--ui-ink-soft);
  background: transparent;
}

body.public-shell .ec-tab.active {
  background: linear-gradient(135deg, var(--ui-primary), var(--ui-primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

body.public-shell .ec-muted,
body.student-portal .sub,
body.student-portal .mini-hint,
body.student-portal .k {
  color: var(--ui-muted) !important;
}

body.public-shell .ec-badge,
body.student-portal .badge-st,
body.student-portal .status-badge {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.public-shell .ec-table,
body.student-portal .table-modern {
  background: transparent;
}

body.public-shell .ec-table th,
body.student-portal .table-modern thead th {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ui-ink-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 800;
}

body.public-shell .ec-table td,
body.student-portal .table-modern td {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

body.public-shell .ec-record-title,
body.student-portal .table-modern .fw-bold {
  color: var(--ui-ink);
}

body.public-shell .ec-notes,
body.student-portal .note-details {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--ui-radius-sm);
  padding: 0.75rem 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.public-shell .ec-note-label {
  color: var(--ui-primary);
}

body.public-shell .ec-empty,
body.student-portal .empty-state {
  background: rgba(255, 255, 255, 0.52);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--ui-radius-lg);
}

.public-shell-footer {
  position: relative;
  z-index: 1;
  padding: 0 1rem 1.4rem;
}

.public-shell-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-soft);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.public-shell-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.public-shell-footer__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(245, 158, 11, 0.12));
  color: var(--ui-primary);
  border: 1px solid rgba(20, 184, 166, 0.14);
}

.public-shell-footer__title {
  font-family: "Tajawal", sans-serif;
  font-weight: 900;
  color: var(--ui-ink);
  line-height: 1.1;
}

.public-shell-footer__sub,
.public-shell-footer__meta {
  color: var(--ui-ink-soft);
  font-size: 0.84rem;
}

body.student-portal .app-sidebar,
body.student-portal .app-topbar {
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

body.student-portal .section-head,
body.student-portal .kv {
  border-radius: var(--ui-radius-md);
}

body.student-portal .section-head {
  padding: 1rem 1.15rem;
}

body.student-portal .kv {
  border: 1px solid rgba(255, 255, 255, 0.66);
}

body.student-portal .app-sections {
  position: relative;
  z-index: 1;
}

@media (max-width: 767.98px) {
  .public-shell-backdrop__orb--a,
  .public-shell-backdrop__orb--b,
  .public-shell-backdrop__orb--c {
    transform: scale(0.8);
  }

  body.public-shell .ec-tabs {
    border-radius: 20px;
  }

  .public-shell-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
