:root {
  color-scheme: light;
  --ink: #17252b;
  --muted: #64737a;
  --line: #d9e4e6;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --soft: #f3f8f9;
  --page-bg: #f3f8f9;
  --hover-bg: #f2fafb;
  --teal: #00a7b5;
  --teal-dark: #08727d;
  --teal-soft: #def7f9;
  --amber: #8fa0a7;
  --graphite: #2f3f45;
  --steel: #7f9299;
  --navy: #00a7b5;
  --navy-dark: #2f3f45;
  --red: #00a7b5;
  --red-dark: #08727d;
  --shadow: 0 18px 50px rgba(26, 44, 49, 0.12);
  --shadow-soft: 0 8px 28px rgba(26, 44, 49, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

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

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

.topbar,
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.site-header {
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 44, 49, 0.1);
}

.audience-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  min-height: 38px;
  padding-inline: clamp(18px, 5vw, 70px);
  background: var(--graphite);
  color: #fff;
}

.audience-bar a,
.audience-bar span,
.language-select {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
}

.audience-bar a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.language-select select {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: var(--graphite);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 24px 0 8px;
}

.language-select select:focus {
  outline: 2px solid rgba(10, 177, 194, 0.5);
  outline-offset: 2px;
}

.main-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px clamp(18px, 5vw, 70px);
  background: #fff;
  border-bottom: 1px solid rgba(217, 224, 223, 0.9);
}

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

.brand-logo-img {
  display: block;
  width: 176px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #0a8ef2;
  box-shadow: 0 10px 24px rgba(26, 44, 49, 0.12);
}

.brand-mark,
.brand-seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-weight: 800;
  border: 4px solid #e6eef8;
}

.university-brand strong {
  display: block;
  color: var(--teal-dark);
  font-size: 1.1rem;
}

.brand small,
.profile small {
  display: block;
  color: var(--muted);
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.nav a,
.panel-link {
  padding: 12px 14px;
  border-radius: 0;
  color: var(--ink);
  font-weight: 800;
}

.nav a:hover,
.nav a.active,
.panel-link:hover,
.panel-link.active {
  color: var(--teal-dark);
  background: #f2fafb;
}

.nav a.active {
  box-shadow: inset 0 -3px 0 var(--teal);
}

.quick-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: var(--teal);
  font-size: 0.84rem;
  font-weight: 900;
}

.quick-menu-button:hover {
  background: var(--teal-dark);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dbe7ea;
  transition: background 160ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(23, 37, 43, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track {
  background: #0d555d;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(20px);
  background: #7fe3ea;
}

.theme-toggle-text {
  font-size: 0.76rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 190px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.auth-user-name {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 180px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-name[hidden],
.auth-button[hidden],
.admin-link[hidden] {
  display: none;
}

.auth-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.auth-button.solid {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.auth-button.admin-link {
  text-decoration: none;
  color: var(--teal-dark);
  border-color: rgba(6, 168, 177, 0.28);
  background: var(--teal-soft);
}

.auth-button.logout {
  border-color: #f2c7c3;
  color: #a33127;
  background: #fff7f6;
}

.admin-hero {
  display: grid;
  align-items: end;
  min-height: 280px;
  padding: 54px var(--page-pad);
  color: #fff;
  background: linear-gradient(135deg, #15444d, #06747d);
}

.admin-hero > div {
  width: min(980px, 100%);
}

.admin-hero h1 {
  margin: 8px 0 12px;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

.admin-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.admin-page {
  display: grid;
  gap: 22px;
}

.admin-locked {
  max-width: 720px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.admin-metrics article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-metrics span,
.admin-table td small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-metrics strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 2rem;
}

.admin-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.admin-table-shell .section-title-row {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  background: #f7fbfc;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table td strong {
  display: block;
  margin-bottom: 4px;
}

.admin-role-select {
  width: min(260px, 100%);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.admin-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}

.auth-modal {
  width: min(440px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  z-index: 10000;
}

.auth-modal::backdrop {
  background: rgba(23, 37, 43, 0.52);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.auth-feedback {
  min-height: 20px;
  margin: 0;
  color: #b42318;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--graphite);
}

.news-hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--graphite);
}

.news-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(47, 63, 69, 0.78), rgba(0, 167, 181, 0.26) 52%, rgba(255, 255, 255, 0.02)),
    linear-gradient(0deg, rgba(26, 44, 49, 0.64), rgba(26, 44, 49, 0.08) 58%);
}

.news-hero-content {
  position: relative;
  width: min(900px, calc(100% - 36px));
  margin: 0 clamp(18px, 6vw, 78px) clamp(46px, 8vh, 78px);
  color: #fff;
}

.news-hero h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
}

.news-hero p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.date-pill,
.read-more {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
  font-size: 0.82rem;
}

.read-more {
  margin-top: 12px;
  background: #fff;
  color: var(--teal-dark);
}

.section-compact {
  padding: clamp(30px, 5vw, 56px) clamp(18px, 5vw, 70px);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  background: #fff;
}

.quick-panel {
  background: var(--teal);
  color: #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.quick-panel h2,
.announcements h2,
.site-footer h2 {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

.quick-panel a {
  display: block;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 800;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.search-box {
  width: min(300px, 100%);
  color: var(--muted);
}

.search-box span {
  display: block;
  margin-bottom: 6px;
}

.announcement-list {
  display: grid;
  gap: 12px;
}

.announcement-list article {
  padding: 18px 20px;
  border-left: 5px solid var(--teal);
  background: #f8fcfc;
  box-shadow: 0 8px 24px rgba(26, 44, 49, 0.06);
}

.announcement-list time {
  color: var(--teal-dark);
  font-weight: 900;
  font-size: 0.82rem;
}

.announcement-list h3 {
  margin-top: 6px;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: clamp(34px, 5vw, 62px) clamp(18px, 5vw, 70px);
  color: #fff;
  background: var(--graphite);
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.86);
}

.compact-footer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

section {
  scroll-margin-top: 78px;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 28, 31, 0.76), rgba(18, 28, 31, 0.24) 54%, rgba(18, 28, 31, 0.08)),
    linear-gradient(0deg, rgba(18, 28, 31, 0.58), rgba(18, 28, 31, 0.08) 42%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin: 0 clamp(18px, 6vw, 78px) clamp(48px, 9vh, 92px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8fe0d8;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4.2rem, 13vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.page-title,
.panel-title {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.panel-title {
  font-size: clamp(1.9rem, 4vw, 3.5rem);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 680px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.button.compact {
  min-height: 38px;
  padding-inline: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 70px);
}

.page-hero {
  padding: clamp(72px, 10vw, 132px) clamp(18px, 6vw, 78px) clamp(42px, 7vw, 82px);
  background: #fff;
}

.institutional-hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(47, 63, 69, 0.88), rgba(0, 167, 181, 0.48)),
    url("assets/arkis-banner.png") center/cover;
}

.institutional-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.9);
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.project-band {
  background: #fff;
}

.section-head {
  max-width: 820px;
  margin-bottom: 30px;
}

.section-head p,
.split p {
  color: var(--muted);
  line-height: 1.65;
}

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

.feature,
.track-preview,
.sidebar,
.workspace,
.metrics article,
.course-card,
.upload-form,
.draft-card,
.audit-log,
.permissions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(26, 44, 49, 0.06);
}

.feature {
  min-height: 196px;
  padding: 22px;
}

.link-card {
  display: block;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 1.2rem;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(26px, 5vw, 68px);
  align-items: center;
  background: #eef7f8;
}

.academic-section {
  background:
    linear-gradient(90deg, #fbfefe 0%, #fbfefe 54%, #eef7f8 54%, #eef7f8 100%);
}

.academy-section-logo {
  display: block;
  width: min(360px, 100%);
  height: 128px;
  margin-bottom: 22px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #0a8ef2;
  box-shadow: var(--shadow);
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.role-tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.role-tab.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.track-preview {
  padding: clamp(20px, 4vw, 34px);
}

.track-header,
.workspace-head,
.course-top,
.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.track-header span,
.status,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 0.82rem;
}

.track-header strong {
  font-size: 2.25rem;
  color: var(--teal);
}

.module-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.module-list li,
.timeline-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  background: var(--steel);
  font-weight: 900;
}

.done .step-dot {
  background: var(--teal);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(18px, 4vw, 42px);
  background: #f3f8f9;
}

.student-system {
  border-top: 5px solid var(--teal);
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 84px;
  padding: 16px;
  z-index: 1;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

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

.panel-academy-logo {
  display: block;
  width: 100%;
  height: 88px;
  margin-bottom: 16px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #0a8ef2;
}

.field-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

.panel-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.panel-link {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.panel-link[hidden] {
  display: none;
}

.workspace {
  min-height: 680px;
  padding: clamp(18px, 3vw, 28px);
}

.workspace-head {
  margin-bottom: 20px;
}

.workspace-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metrics article {
  padding: 18px;
  box-shadow: none;
}

.metrics span,
.course-card p,
.draft-card p,
.audit-log p {
  color: var(--muted);
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.timeline,
.course-board,
.drafts,
.audit-log {
  display: grid;
  gap: 12px;
}

.timeline-item {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.timeline-marker {
  width: 10px;
  height: 48px;
  border-radius: 8px;
  background: var(--teal);
}

.course-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card {
  min-height: 220px;
  padding: 18px;
}

.course-card.empty-state {
  grid-column: 1 / -1;
  min-height: 170px;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7eeee;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #8fa0a7);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.section-actions {
  margin-top: 22px;
}

.upload-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: none;
}

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

label {
  color: var(--muted);
  font-weight: 800;
}

label input,
label select,
label textarea {
  margin-top: 7px;
  color: var(--ink);
  font-weight: 500;
}

.drafts {
  margin-top: 16px;
}

.draft-card {
  padding: 16px;
}

.teacher-panel,
.announcement-admin,
.founder-grid {
  display: grid;
  gap: 16px;
}

.teacher-panel {
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
}

.teacher-panel .drafts {
  grid-column: 1 / -1;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
}

.chat-roster,
.chat-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 28px rgba(26, 44, 49, 0.06);
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.toggle-line input {
  width: auto;
  margin: 0;
}

.roster-summary,
.roster-empty {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.roster-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 800;
}

.roster-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.roster-item > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aebbc0;
}

.roster-item.online > span {
  background: #0aaa7a;
}

.roster-item small {
  grid-column: 2;
  color: var(--muted);
}

.directory-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 6vw, 72px);
  background: linear-gradient(135deg, #0b5f63, #0ab1c2);
  color: #fff;
}

.directory-hero h1 {
  margin: 6px 0 10px;
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.directory-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.directory-section {
  padding: clamp(28px, 5vw, 56px) clamp(18px, 6vw, 72px);
  background: var(--soft);
}

.directory-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.directory-card,
.directory-empty {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 26px rgba(26, 44, 49, 0.06);
}

.directory-empty {
  display: block;
  line-height: 1.7;
}

.directory-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #e6f8fa;
  color: var(--teal-dark);
  font-weight: 900;
}

.directory-main strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.directory-main p,
.directory-main small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 900;
  font-size: 0.8rem;
}

.presence-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aebbc0;
}

.presence-pill.active {
  border-color: rgba(10, 170, 122, 0.28);
  color: #057553;
  background: #eafaf4;
}

.presence-pill.active::before {
  background: #0aaa7a;
}

.chat-window {
  display: grid;
  gap: 14px;
}

.chat-target {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-messages {
  display: grid;
  gap: 10px;
  min-height: 230px;
  align-content: start;
}

.message {
  max-width: min(620px, 92%);
  padding: 12px;
  border-radius: 8px;
  background: #f3f8f9;
}

.message.mine {
  justify-self: end;
  color: #fff;
  background: var(--teal-dark);
}

.message p {
  margin: 6px 0 0;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.founder-grid {
  grid-template-columns: minmax(240px, 0.7fr) minmax(280px, 1fr);
}

.founder-grid .audit-log {
  grid-column: 1 / -1;
}

input:disabled,
textarea:disabled,
button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.audit-log,
.permissions {
  padding: 18px;
}

.permission-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.permission-row:last-child {
  border-bottom: 0;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f8fa;
  --muted: #b8c6cb;
  --line: #253941;
  --surface: #050708;
  --surface-raised: #0b1114;
  --soft: #0f171a;
  --page-bg: #030506;
  --hover-bg: #102126;
  --teal-soft: #073a40;
  --graphite: #05080a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell {
  background: var(--page-bg);
  color: var(--ink);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .main-nav-row {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .nav a,
html[data-theme="dark"] .panel-link,
html[data-theme="dark"] .auth-user-name,
html[data-theme="dark"] .admin-table td strong,
html[data-theme="dark"] .admin-metrics strong {
  color: var(--ink);
}

html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .nav a.active,
html[data-theme="dark"] .panel-link:hover,
html[data-theme="dark"] .panel-link.active {
  color: #7fe3ea;
  background: var(--hover-bg);
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .auth-button:not(.solid):not(.admin-link):not(.logout),
html[data-theme="dark"] .button:not(.primary):not(.secondary),
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .role-tab:not(.active),
html[data-theme="dark"] .read-more {
  background: var(--surface-raised);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .theme-toggle-track {
  background: #24383f;
}

html[data-theme="dark"] .role-badge,
html[data-theme="dark"] .auth-button.admin-link,
html[data-theme="dark"] .track-header span,
html[data-theme="dark"] .status,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .feature-icon {
  color: #8fe0d8;
  background: var(--teal-soft);
  border-color: rgba(127, 227, 234, 0.22);
}

html[data-theme="dark"] .auth-button.logout {
  color: #ffb0aa;
  border-color: rgba(255, 176, 170, 0.3);
  background: #21100f;
}

html[data-theme="dark"] .admin-locked,
html[data-theme="dark"] .admin-metrics article,
html[data-theme="dark"] .admin-table-shell,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .home-grid,
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .project-band,
html[data-theme="dark"] .feature,
html[data-theme="dark"] .track-preview,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .metrics article,
html[data-theme="dark"] .course-card,
html[data-theme="dark"] .upload-form,
html[data-theme="dark"] .draft-card,
html[data-theme="dark"] .audit-log,
html[data-theme="dark"] .permissions,
html[data-theme="dark"] .directory-card,
html[data-theme="dark"] .directory-empty,
html[data-theme="dark"] .chat-roster,
html[data-theme="dark"] .chat-window {
  background: var(--surface-raised);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .split,
html[data-theme="dark"] .directory-section,
html[data-theme="dark"] .section,
html[data-theme="dark"] .section-compact {
  background: var(--page-bg);
}

html[data-theme="dark"] .academic-section {
  background: linear-gradient(90deg, #050708 0%, #050708 54%, #0f171a 54%, #0f171a 100%);
}

html[data-theme="dark"] .institutional-hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 8, 10, 0.92), rgba(0, 93, 101, 0.54)),
    url("assets/arkis-banner.png") center/cover;
}

html[data-theme="dark"] .institutional-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .announcement-list article,
html[data-theme="dark"] .module-list li,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .message {
  background: #0f171a;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .admin-table th {
  background: #10181c;
  color: var(--muted);
}

html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td,
html[data-theme="dark"] .admin-table-shell .section-title-row,
html[data-theme="dark"] .permission-row,
html[data-theme="dark"] .chat-target {
  border-color: var(--line);
}

html[data-theme="dark"] select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .admin-role-select {
  background: #050708;
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8da0a6;
}

html[data-theme="dark"] .progress {
  background: #23363d;
}

html[data-theme="dark"] .message.mine,
html[data-theme="dark"] .button.primary,
html[data-theme="dark"] .auth-button.solid,
html[data-theme="dark"] .quick-menu-button,
html[data-theme="dark"] .role-tab.active {
  color: #fff;
}

@media (max-width: 980px) {
  .feature-grid,
  .metrics,
  .course-board {
    grid-template-columns: 1fr 1fr;
  }

  .split,
  .home-grid,
  .teacher-panel,
  .chat-layout,
  .founder-grid,
  .app-shell,
  .audit-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar,
  .main-nav-row,
  .audience-bar {
    flex-wrap: wrap;
  }

  .audience-bar {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .audience-bar a,
  .audience-bar span,
  .language-select {
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .directory-hero {
    display: grid;
    align-items: flex-start;
  }

  .directory-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .icon-button {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 4;
  }

  .nav.open {
    display: flex;
  }

  .hero {
    min-height: 82vh;
  }

  .news-hero {
    min-height: 600px;
  }

  .quick-menu-button {
    min-height: 38px;
    padding-inline: 12px;
  }

  .auth-actions {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .role-badge {
    max-width: 100%;
  }

  .auth-user-name {
    max-width: 100%;
  }

  .feature-grid,
  .metrics,
  .admin-metrics,
  .course-board,
  .form-grid,
  .site-footer,
  .compact-footer {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-head,
  .track-header,
  .course-top,
  .permission-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-list li,
  .timeline-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .module-list .tag,
  .timeline-item .status {
    grid-column: 2;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }
}

/* ─── BAŞVURU SİSTEMİ ─────────────────────────────────────────────────────── */

.application-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.application-info {
  margin-bottom: 1.25rem;
}

.application-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.application-info h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0.25rem 0 0.5rem;
}

.application-info p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.application-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.application-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal-soft);
}

.application-section label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink);
}

.application-section label small {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 0.1rem;
}

.application-section input,
.application-section textarea {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  background: var(--soft);
  color: var(--ink);
  transition: border-color 0.2s;
  resize: vertical;
}

.application-section input:focus,
.application-section textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}

.req {
  color: #e05555;
  font-size: 0.85em;
}

/* Durum mesajı */
.application-status-msg {
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--line);
  background: var(--soft);
}

.application-status-msg.status-approved {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #166534;
}

.application-status-msg.status-rejected {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.application-status-msg.status-pending {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

/* Başvuru kartları */
.application-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s;
}

.application-card:hover {
  box-shadow: var(--shadow);
}

.application-card-top {
  align-items: flex-start;
  justify-content: space-between;
}

.application-card-top > div strong {
  font-size: 1rem;
  font-weight: 700;
  display: block;
}

.application-card-top > div small {
  color: var(--muted);
  font-size: 0.82rem;
}

.application-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-meta-item {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Başvuru durum rozeti */
.app-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.app-status-badge.status-pending {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.app-status-badge.status-approved {
  background: #dcfce7;
  color: #166534;
}

.app-status-badge.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Cevaplar */
.application-answers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--soft);
  border-radius: 10px;
  padding: 1rem;
}

.app-qa {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-q {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-a {
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Eylem butonları */
.application-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.app-vote-group {
  display: flex;
  gap: 0.5rem;
}

.app-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.app-vote-btn:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.app-vote-btn.voted {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
}

.app-vote-btn.voted-down {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
}

.app-decide-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-action-btn {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
}

.app-action-btn.approve {
  background: #22c55e;
  color: #fff;
}

.app-action-btn.approve:hover {
  background: #16a34a;
}

.app-action-btn.reject {
  background: #ef4444;
  color: #fff;
}

.app-action-btn.reject:hover {
  background: #dc2626;
}

.application-empty {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* Dark mode uyumları */
[data-theme="dark"] .application-status-msg.status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

[data-theme="dark"] .application-status-msg.status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

[data-theme="dark"] .app-status-badge.status-approved {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

[data-theme="dark"] .app-status-badge.status-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

[data-theme="dark"] .app-vote-btn.voted {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border-color: #22c55e;
}

[data-theme="dark"] .app-vote-btn.voted-down {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: #ef4444;
}
