:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --brand-red: #d2232a;
  --brand-red-dark: #b01d23;
  --brand-red-soft: #fde8e9;
  --brand-yellow: #f7941e;
  --brand-yellow-soft: #fff4e0;
  --brand-blue: #00aeef;
  --brand-blue-deep: #1b75bc;
  --brand-blue-soft: #e6f7fd;
  --primary: #1b75bc;
  --primary-dark: #155a94;
  --primary-soft: #e6f7fd;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f7941e;
  --warning-soft: #fff4e0;
  --danger: #d2232a;
  --danger-soft: #fde8e9;
  --shadow: 0 18px 45px rgba(27, 117, 188, 0.08);
  --radius: 18px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(210, 35, 42, 0.08), transparent 26rem),
    radial-gradient(circle at 92% 4%, rgba(0, 174, 239, 0.1), transparent 24rem),
    radial-gradient(circle at 70% 100%, rgba(247, 148, 30, 0.08), transparent 22rem),
    var(--bg);
  color: var(--text);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

button,
.button {
  align-items: center;
  background: var(--primary);
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  padding: 10px 14px;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  width: min(100%, 560px);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  min-height: 44px;
  padding-right: 40px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.14);
  outline: 0;
}

textarea {
  min-height: 120px;
}

label {
  color: #344054;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #0b1220;
  color: #dbeafe;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  overflow: hidden;
  padding: 24px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: stretch;
  display: flex;
  flex-shrink: 0;
  gap: 0;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.brand-glow {
  background:
    radial-gradient(circle at 18% 20%, rgba(210, 35, 42, 0.2), transparent 42%),
    radial-gradient(circle at 55% 40%, rgba(247, 148, 30, 0.16), transparent 46%),
    radial-gradient(circle at 82% 78%, rgba(0, 174, 239, 0.2), transparent 46%),
    linear-gradient(135deg, #fff7f7 0%, #ffffff 48%, #eef8fd 100%);
  inset: 0;
  position: absolute;
  z-index: 0;
}

.brand-frame {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex: 1;
  justify-content: center;
  margin: 3px;
  min-height: 78px;
  padding: 14px 16px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow), var(--brand-blue));
  border-radius: 16px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand-logo {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.08));
  height: 52px;
  max-height: 52px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0;
  transition: transform 180ms ease, filter 180ms ease;
  width: auto;
}

.brand:hover .brand-logo {
  filter: drop-shadow(0 10px 18px rgba(210, 35, 42, 0.16));
  transform: translateY(-1px) scale(1.02);
}

.brand strong {
  color: #ffffff;
  display: block;
  font-size: 18px;
}

.brand > span:not(.brand-glow):not(.brand-frame) {
  color: #93a4bd;
  display: block;
  font-size: 12px;
}

.nav-group {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.nav-group::-webkit-scrollbar {
  width: 6px;
}

.nav-group::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.nav-group::-webkit-scrollbar-track {
  background: transparent;
}

.nav-label {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 10px 0 4px;
  text-transform: uppercase;
}

.nav-section {
  margin: 4px 0 2px;
}

.nav-section > .nav-label {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 8px 0 4px;
  padding: 6px 8px;
  border-radius: 10px;
  user-select: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-section > .nav-label::-webkit-details-marker {
  display: none;
}

.nav-section > .nav-label::after {
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  display: inline-block;
  height: 6px;
  margin-left: auto;
  opacity: 0.7;
  transform: rotate(45deg);
  transition: transform 0.28s ease, opacity 0.18s ease;
  width: 6px;
}

.nav-section[open] > .nav-label::after,
.nav-section.is-open > .nav-label::after {
  transform: rotate(-135deg);
}

.nav-section > .nav-label:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e0f2fe;
}

.nav-section-body {
  display: grid;
  gap: 4px;
  padding: 0 0 4px 4px;
  transform-origin: top center;
}

.nav-section.is-animating > .nav-section-body {
  will-change: height, opacity;
}

.nav-section.is-animating > .nav-section-body .nav-link {
  pointer-events: none;
}

.nav-link,
.logout-button {
  align-items: center;
  background: transparent;
  border-radius: 12px;
  color: #cbd5e1;
  display: flex;
  font-weight: 700;
  gap: 10px;
  padding: 10px 12px;
}

.nav-link:hover,
.logout-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.logout-form {
  flex-shrink: 0;
  margin-top: auto;
}

.logout-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  width: 100%;
}

.main-panel {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  font-size: 20px;
  margin: 0;
}

.topbar-meta {
  color: var(--muted);
  font-size: 13px;
}

.content {
  margin: 0 auto;
  max-width: 1280px;
  padding: 28px;
}

.card,
.metric,
.map-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(228, 231, 236, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 22px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric {
  padding: 18px;
}

.metric strong {
  color: #101828;
  display: block;
  font-size: 32px;
  line-height: 1;
  margin-top: 10px;
}

.metric small {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.muted {
  color: var(--muted);
}

.clean-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.clean-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.clean-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

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

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

th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:hover td {
  background: #f8fbff;
}

.record-link {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #101828;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 11px;
}

.record-link:hover {
  background: var(--primary-soft);
  border-color: rgba(0, 174, 239, 0.35);
  color: var(--primary-dark);
}

.alert {
  border-radius: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 12px 14px;
}

.error {
  background: var(--danger-soft);
  color: #991b1b;
}

.success {
  background: var(--success-soft);
  color: #166534;
}

.alert.warning {
  background: #fff7e6;
  color: #92400e;
}

.auth-page {
  align-items: stretch;
  display: flex;
  min-height: 100vh;
  padding: 0;
}

.auth-stage {
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.auth-backdrop {
  background:
    radial-gradient(ellipse 72% 58% at 10% 16%, rgba(210, 35, 42, 0.28), transparent 58%),
    radial-gradient(ellipse 58% 48% at 90% 10%, rgba(0, 174, 239, 0.32), transparent 52%),
    radial-gradient(ellipse 52% 42% at 72% 90%, rgba(247, 148, 30, 0.26), transparent 50%),
    radial-gradient(ellipse 40% 35% at 48% 48%, rgba(27, 117, 188, 0.1), transparent 60%),
    linear-gradient(160deg, #eef6fc 0%, #fff1e4 46%, #fdeced 100%);
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.auth-grid {
  background-image:
    linear-gradient(rgba(27, 117, 188, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 35, 42, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  inset: 0;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 20%, transparent 75%);
  opacity: 1;
  position: absolute;
}

.auth-orb {
  border-radius: 50%;
  filter: blur(2px);
  position: absolute;
}

.auth-orb-a {
  animation: auth-drift 14s ease-in-out infinite;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.48), rgba(0, 174, 239, 0.12) 45%, transparent 70%);
  height: 360px;
  left: -80px;
  top: 8%;
  width: 360px;
}

.auth-orb-b {
  animation: auth-drift 18s ease-in-out infinite reverse;
  background: radial-gradient(circle, rgba(210, 35, 42, 0.42), rgba(210, 35, 42, 0.12) 48%, transparent 72%);
  height: 300px;
  right: -40px;
  top: 18%;
  width: 300px;
}

.auth-orb-c {
  animation: auth-drift 16s ease-in-out infinite;
  animation-delay: -4s;
  background: radial-gradient(circle, rgba(247, 148, 30, 0.4), rgba(247, 148, 30, 0.12) 50%, transparent 72%);
  bottom: -60px;
  height: 340px;
  left: 36%;
  width: 340px;
}

@keyframes auth-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.06); }
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  margin: 0 auto;
  max-width: 1120px;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px);
  position: relative;
  width: 100%;
  z-index: 1;
}

.auth-brand-panel {
  animation: auth-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.auth-logo {
  display: block;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.08));
  height: auto;
  max-width: min(100%, 360px);
  width: 100%;
}

.auth-tagline {
  color: #64748b;
  font-family: Sora, Manrope, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.auth-headline {
  color: #0f172a;
  font-family: Sora, Manrope, sans-serif;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  max-width: 14ch;
}

.auth-support {
  color: #64748b;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  max-width: 36ch;
}

.auth-panel {
  animation: auth-rise 850ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 60px rgba(15, 23, 42, 0.08);
  padding: 32px 28px;
  width: 100%;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.auth-panel-head h2 {
  color: #0f172a;
  font-family: Sora, Manrope, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.auth-panel-head p {
  color: #667085;
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-form input {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  font: inherit;
  max-width: none;
  padding: 13px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.auth-form input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(27, 117, 188, 0.12);
  outline: none;
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 76px;
}

.auth-password-toggle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-height: auto;
  padding: 0;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
}

.auth-password-toggle:hover {
  background: transparent !important;
  color: var(--brand-blue-deep);
  transform: translateY(-50%);
}

.auth-submit {
  background: linear-gradient(135deg, var(--brand-red), #e85a2a 48%, var(--brand-yellow));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(210, 35, 42, 0.22);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-top: 4px;
  min-height: 48px;
  padding: 14px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  width: 100%;
}

.auth-submit:hover {
  box-shadow: 0 18px 34px rgba(210, 35, 42, 0.28);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit-link {
  display: block;
  margin-top: 22px;
  text-align: center;
  text-decoration: none;
}

.auth-label-row {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.auth-link {
  color: var(--brand-blue-deep);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-footnote {
  margin: 18px 0 0;
  text-align: center;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.checkbox-panel {
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 12px;
  padding: 12px 14px;
}

.checkbox-panel ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.checkbox-panel li {
  margin: 0;
}

.checkbox-panel label {
  align-items: center;
  display: flex;
  font-weight: 600;
  gap: 10px;
}

.checkbox-panel input[type="checkbox"] {
  width: auto;
}

.form-field select,
.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field textarea {
  max-width: none;
  width: 100%;
}

.field-error {
  color: #b01d23;
  font-size: 13px;
  font-weight: 600;
}

.request-form-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.request-form-head h2 {
  margin: 0 0 6px;
}

.request-form-head p {
  margin: 0;
}

.request-form-grid {
  align-items: start;
  display: grid;
  gap: 16px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-form-grid .form-field {
  align-content: start;
}

.request-form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.request-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .request-form-grid {
    grid-template-columns: 1fr;
  }

  .request-form-actions > * {
    flex: 1;
    text-align: center;
  }
}

.dys-file {
  align-items: center;
  background: #fff;
  border: 1px dashed var(--line, #d0d5dd);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  min-height: 48px;
  padding: 6px 8px;
  position: relative;
}

.form-field .dys-file input[type="file"],
.dys-file input[type="file"] {
  border: 0;
  height: 1px;
  left: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  top: 0;
  width: 1px;
}

.dys-file-button {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 9px;
  color: #1d4ed8;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
}

.dys-file-button:hover {
  background: #e0eaff;
}

.dys-file input[type="file"]:focus-visible + .dys-file-button {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.dys-file-name {
  color: var(--muted, #667085);
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dys-file.has-file .dys-file-name {
  color: var(--text, #101828);
  font-weight: 600;
}

.dys-file:has(input.is-invalid) {
  border-color: #f04438;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #f04438 !important;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12) !important;
}

.dys-field-msg {
  align-items: flex-start;
  animation: dys-field-msg-in 0.18s ease-out;
  background: linear-gradient(135deg, #fff5f4, #fff8f1);
  border: 1px solid #fecdca;
  border-radius: 10px;
  color: #b42318;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  line-height: 1.4;
  margin-top: 2px;
  padding: 7px 10px;
}

.dys-field-msg::before {
  background: linear-gradient(135deg, #e11d2a, #f97316);
  border-radius: 50%;
  color: #fff;
  content: "!";
  display: inline-grid;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 900;
  height: 18px;
  place-items: center;
  width: 18px;
}

@keyframes dys-field-msg-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dys-field-msg {
    animation: none;
  }
}

.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  accent-color: var(--primary);
  flex-shrink: 0;
  height: 1.05em;
  margin: 0.2em 0 0;
  width: auto;
}

.facility-option {
  align-items: flex-start;
  display: flex;
  font-weight: 500;
  gap: 10px;
  line-height: 1.45;
  margin: 0;
}

.facility-option-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.form-help,
.form-field .helptext {
  color: var(--muted);
  font-size: 12px;
}

.errorlist {
  background: var(--danger-soft);
  border-radius: 12px;
  color: #991b1b;
  list-style: none;
  margin: 0;
  padding: 10px 12px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.empty-state {
  color: var(--muted);
  padding: 24px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    max-height: none;
    overflow: visible;
    position: static;
  }

  .nav-group {
    flex: none;
    max-height: none;
    overflow: visible;
  }

  .topbar {
    position: static;
  }

  .auth-shell {
    gap: 28px;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 18px 40px;
  }

  .auth-logo {
    max-width: 260px;
  }

  .auth-headline {
    max-width: none;
  }
}

/* Professional app shell refresh */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #101828;
  --muted: #667085;
  --line: #e5e7eb;
  --brand-red: #d2232a;
  --brand-red-dark: #b01d23;
  --brand-red-soft: #fde8e9;
  --brand-yellow: #f7941e;
  --brand-yellow-soft: #fff4e0;
  --brand-blue: #00aeef;
  --brand-blue-deep: #1b75bc;
  --brand-blue-soft: #e6f7fd;
  --primary: #1b75bc;
  --primary-dark: #155a94;
  --primary-soft: #e6f7fd;
  --warning: #f7941e;
  --warning-soft: #fff4e0;
  --danger: #d2232a;
  --danger-soft: #fde8e9;
  --shadow: 0 10px 30px rgba(27, 117, 188, 0.08);
  --radius: 16px;
  --sidebar-width: 272px;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(210, 35, 42, 0.07), transparent 24rem),
    radial-gradient(circle at 90% 0%, rgba(0, 174, 239, 0.1), transparent 22rem),
    radial-gradient(circle at 55% 100%, rgba(247, 148, 30, 0.07), transparent 20rem),
    var(--bg);
  color: var(--text);
}

.app-shell {
  background: transparent;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 28px rgba(27, 117, 188, 0.05);
  color: var(--text);
  gap: 18px;
  padding: 22px 18px;
}

.brand {
  background:
    linear-gradient(135deg, rgba(210, 35, 42, 0.16), rgba(247, 148, 30, 0.12), rgba(0, 174, 239, 0.16));
  border: 1px solid rgba(210, 35, 42, 0.22);
  border-radius: 18px;
  box-shadow:
    0 14px 28px rgba(210, 35, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04);
  justify-content: center;
  min-height: 92px;
  overflow: hidden;
  padding: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.brand:hover {
  border-color: rgba(0, 174, 239, 0.45);
  box-shadow:
    0 18px 34px rgba(0, 174, 239, 0.12),
    0 4px 10px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.brand:focus-visible {
  outline: 2px solid rgba(210, 35, 42, 0.4);
  outline-offset: 3px;
}

.brand-mark {
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(210, 35, 42, 0.22);
}

.brand strong {
  color: var(--text);
  font-size: 16px;
}

.nav-group {
  gap: 4px;
}

.nav-label {
  color: #475467;
  font-size: 10px;
  letter-spacing: 0.12em;
  margin: 16px 8px 6px;
}

.nav-section > .nav-label {
  color: #475467;
  margin: 10px 4px 4px;
}

.nav-section > .nav-label:hover {
  background: rgba(15, 23, 42, 0.04);
  color: #101828;
}

.nav-section-body {
  gap: 2px;
}

.nav-link,
.logout-button {
  border: 1px solid transparent;
  color: #344054;
  font-size: 14px;
  min-height: 40px;
  padding: 9px 11px;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  background: linear-gradient(90deg, transparent, #d0d5dd 18%, #e5e7eb 82%, transparent);
  bottom: -3px;
  content: "";
  height: 1px;
  left: 10px;
  opacity: 0.82;
  position: absolute;
  right: 10px;
}

.nav-link:hover {
  background: var(--primary-soft);
  border-color: rgba(0, 174, 239, 0.35);
  color: var(--brand-blue-deep);
}

.logout-button:hover {
  background: var(--brand-red);
  border-color: transparent;
  color: #ffffff;
}

.nav-link:hover::after {
  background: linear-gradient(90deg, transparent, var(--brand-red) 18%, var(--brand-yellow) 50%, var(--brand-blue) 82%, transparent);
  opacity: 1;
}

.nav-group-locked .nav-link {
  background: var(--primary-soft);
  border-color: rgba(0, 174, 239, 0.35);
  color: var(--brand-blue-deep);
}

.nav-group-locked .nav-link::after {
  display: none;
}

.logout-form {
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
}

.logout-button {
  background: #101828;
  color: #ffffff;
  justify-content: flex-start;
}

.main-panel {
  background: transparent;
}

.topbar {
  background: rgba(246, 248, 251, 0.86);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
}

.topbar h1 {
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.notif-menu {
  position: relative;
}

.notif-bell {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-red), #e85a2a 55%, var(--brand-yellow));
  border: 1px solid transparent;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  position: relative;
  transition: filter 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  width: 40px;
}

.notif-bell:hover,
.notif-menu.is-open .notif-bell {
  box-shadow: 0 8px 18px rgba(210, 35, 42, 0.22);
  color: #ffffff;
  filter: brightness(1.05);
}

.notif-bell-icon {
  display: inline-flex;
  line-height: 0;
}

.notif-badge {
  align-items: center;
  background: var(--brand-red);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(210, 35, 42, 0.35);
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 18px;
  padding: 0 4px;
  position: absolute;
  right: -5px;
  top: -5px;
}

.notif-panel {
  background: #ffffff;
  border: 1px solid rgba(210, 35, 42, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  z-index: 40;
}

.notif-panel-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 6px 8px 10px;
}

.notif-panel-head strong {
  font-size: 14px;
}

.notif-panel-count {
  background: var(--brand-red-soft);
  border-radius: 999px;
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.notif-list {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-list a {
  border-radius: 12px;
  color: inherit;
  display: grid;
  gap: 2px;
  padding: 10px;
  text-decoration: none;
}

.notif-list a:hover {
  background: rgba(0, 174, 239, 0.08);
}

.notif-list li.is-unread a {
  background: rgba(210, 35, 42, 0.05);
}

.notif-list strong {
  font-size: 13px;
  line-height: 1.35;
}

.notif-list span,
.notif-list time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.notif-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 16px 10px;
  text-align: center;
}

.notif-panel-footer {
  border-top: 1px solid var(--line);
  color: var(--brand-blue-deep);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-top: 6px;
  padding: 10px 8px 4px;
  text-align: center;
  text-decoration: none;
}

.notif-panel-footer:hover {
  color: var(--brand-red);
}

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

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

.notif-page-list > li {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.notif-page-list > li.is-unread {
  border-color: rgba(210, 35, 42, 0.22);
  box-shadow: inset 3px 0 0 var(--brand-red);
}

.notif-page-list strong {
  display: inline;
  margin-right: 8px;
}

.notif-page-list p {
  margin: 6px 0;
}

.notif-page-new {
  background: var(--brand-red-soft);
  border-radius: 999px;
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  vertical-align: middle;
}

.context-pill {
  background: #ffffff;
  border: 1px solid rgba(210, 35, 42, 0.18);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(210, 35, 42, 0.06);
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
}

.content {
  max-width: 1440px;
  padding: 24px;
}

.card,
.metric,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    max-height: none;
    overflow: visible;
    position: static;
  }

  .nav-group {
    flex: none;
    max-height: none;
    overflow: visible;
  }

  .topbar {
    position: static;
  }
}

/* Youth portal themes — DENEYAP brand */
.portal-student,
.portal-instructor,
.portal-responsible {
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 174, 239, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(210, 35, 42, 0.12), transparent 24rem),
    radial-gradient(circle at 60% 100%, rgba(247, 148, 30, 0.1), transparent 22rem),
    linear-gradient(135deg, #f7fbff 0%, #fff8f0 52%, #fff5f5 100%);
}

.portal-student .sidebar,
.portal-instructor .sidebar,
.portal-responsible .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(230, 247, 253, 0.92)),
    #ffffff;
}

.portal-student .brand,
.portal-instructor .brand,
.portal-responsible .brand {
  background: linear-gradient(135deg, rgba(210, 35, 42, 0.18), rgba(247, 148, 30, 0.14), rgba(0, 174, 239, 0.18));
  border-color: rgba(210, 35, 42, 0.28);
  box-shadow:
    0 14px 28px rgba(210, 35, 42, 0.1),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

.portal-student .brand-glow,
.portal-instructor .brand-glow,
.portal-responsible .brand-glow {
  background:
    radial-gradient(circle at 18% 20%, rgba(210, 35, 42, 0.22), transparent 42%),
    radial-gradient(circle at 55% 45%, rgba(247, 148, 30, 0.16), transparent 46%),
    radial-gradient(circle at 82% 78%, rgba(0, 174, 239, 0.2), transparent 46%),
    linear-gradient(135deg, #fff7f7 0%, #ffffff 48%, #eef8fd 100%);
}

.portal-student .topbar,
.portal-instructor .topbar,
.portal-responsible .topbar {
  background: rgba(255, 255, 255, 0.86);
}

.portal-student .card,
.portal-instructor .card,
.portal-responsible .card,
.portal-student .metric,
.portal-instructor .metric,
.portal-responsible .metric {
  border-color: rgba(0, 174, 239, 0.28);
  box-shadow: 0 18px 45px rgba(27, 117, 188, 0.1);
}

.portal-student .content > .card:first-child,
.portal-instructor .content > .card:first-child,
.portal-responsible .content > .card:first-child {
  background:
    radial-gradient(circle at 8% 12%, rgba(210, 35, 42, 0.12), transparent 16rem),
    radial-gradient(circle at 92% 18%, rgba(247, 148, 30, 0.14), transparent 14rem),
    radial-gradient(circle at 50% 100%, rgba(0, 174, 239, 0.12), transparent 16rem),
    linear-gradient(135deg, #ffffff, #f5fbff);
  border: 1px solid rgba(0, 174, 239, 0.28);
  overflow: visible;
  position: relative;
}

.portal-student .content > .card:first-child::after,
.portal-instructor .content > .card:first-child::after,
.portal-responsible .content > .card:first-child::after {
  background:
    radial-gradient(circle, rgba(210, 35, 42, 0.2) 0 28%, transparent 30%),
    radial-gradient(circle, rgba(247, 148, 30, 0.18) 0 26%, transparent 28%),
    radial-gradient(circle, rgba(0, 174, 239, 0.18) 0 26%, transparent 28%);
  background-position: 0 0, 22px 18px, 11px 34px;
  background-size: 48px 48px;
  content: "";
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  position: absolute;
}

.portal-student .content > .card:first-child > *,
.portal-instructor .content > .card:first-child > *,
.portal-responsible .content > .card:first-child > * {
  position: relative;
  z-index: 1;
}

.portal-student .metric:nth-child(4n + 1),
.portal-instructor .metric:nth-child(4n + 1),
.portal-responsible .metric:nth-child(4n + 1) {
  background: linear-gradient(135deg, #e6f7fd, #ffffff);
}

.portal-student .metric:nth-child(4n + 2),
.portal-instructor .metric:nth-child(4n + 2),
.portal-responsible .metric:nth-child(4n + 2) {
  background: linear-gradient(135deg, #fff4e0, #ffffff);
}

.portal-student .metric:nth-child(4n + 3),
.portal-instructor .metric:nth-child(4n + 3),
.portal-responsible .metric:nth-child(4n + 3) {
  background: linear-gradient(135deg, #fde8e9, #ffffff);
}

.portal-student .metric:nth-child(4n + 4),
.portal-instructor .metric:nth-child(4n + 4),
.portal-responsible .metric:nth-child(4n + 4) {
  background: linear-gradient(135deg, #f0f9ff, #ffffff);
}

.portal-student .button,
.portal-instructor .button,
.portal-responsible .button,
.portal-student button,
.portal-instructor button,
.portal-responsible button {
  background: linear-gradient(135deg, var(--brand-red), #e85a2a 55%, var(--brand-yellow));
  box-shadow: 0 10px 22px rgba(210, 35, 42, 0.18);
}

.portal-student .button:hover,
.portal-instructor .button:hover,
.portal-responsible .button:hover,
.portal-student button:hover,
.portal-instructor button:hover,
.portal-responsible button:hover {
  background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-yellow));
}

.portal-student .nav-link:hover,
.portal-instructor .nav-link:hover,
.portal-responsible .nav-link:hover {
  background: linear-gradient(135deg, #e6f7fd, #fff4e0);
  border-color: rgba(0, 174, 239, 0.4);
  color: var(--brand-blue-deep);
}

/* Student-friendly portal */
:is(.portal-student, .portal-instructor, .portal-responsible) {
  --student-ink: #0f2a3d;
  --student-accent: #00aeef;
  --student-accent-2: #f7941e;
  --student-sky: #e6f7fd;
  --student-sand: #fff4e0;
  background:
    radial-gradient(circle at 8% 0%, rgba(210, 35, 42, 0.12), transparent 26rem),
    radial-gradient(circle at 55% 0%, rgba(247, 148, 30, 0.12), transparent 22rem),
    radial-gradient(circle at 100% 8%, rgba(0, 174, 239, 0.14), transparent 22rem),
    linear-gradient(160deg, #f7fbff 0%, #fff8f0 52%, #fff5f5 100%);
  color: var(--student-ink);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(230, 247, 253, 0.94)),
    #ffffff;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .brand {
  background: linear-gradient(135deg, rgba(210, 35, 42, 0.18), rgba(247, 148, 30, 0.14), rgba(0, 174, 239, 0.18));
  border-color: rgba(210, 35, 42, 0.28);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .topbar h1,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero h2,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-panel h3,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card h3,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-action-label {
  font-family: "Outfit", "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .nav-label {
  color: #5b6b7c;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .nav-link {
  border-radius: 14px;
  font-weight: 600;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .button {
  background: linear-gradient(135deg, var(--brand-red), #e85a2a 55%, var(--brand-yellow));
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(210, 35, 42, 0.2);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .button:hover {
  background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-yellow));
}

:is(.portal-student, .portal-instructor, .portal-responsible) .button.secondary {
  background: #ffffff;
  border: 1px solid rgba(0, 174, 239, 0.28);
  box-shadow: none;
  color: var(--brand-blue-deep);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .button.secondary:hover {
  background: var(--student-sky);
  border-color: var(--brand-blue);
  color: var(--brand-blue-deep);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .logout-button {
  background: #101828;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  color: #ffffff;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .logout-button:hover {
  background: var(--brand-red);
  color: #ffffff;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .content > .card.student-hero:first-child {
  background:
    radial-gradient(circle at 12% 18%, rgba(210, 35, 42, 0.12), transparent 18rem),
    radial-gradient(circle at 55% 10%, rgba(247, 148, 30, 0.14), transparent 16rem),
    radial-gradient(circle at 88% 12%, rgba(0, 174, 239, 0.14), transparent 16rem),
    linear-gradient(135deg, #ffffff 0%, #f5fbff 58%, #fff7ed 100%);
  border: 1px solid rgba(210, 35, 42, 0.2);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .content > .card.student-hero:first-child::after {
  display: none;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero {
  align-items: flex-start;
  animation: studentRise 520ms ease both;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 174, 239, 0.16), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(247, 148, 30, 0.14), transparent 16rem),
    linear-gradient(135deg, #ffffff 0%, #f5fbff 58%, #fff7ed 100%);
  border: 1px solid rgba(0, 174, 239, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: flex-start;
  overflow: visible;
  padding: 28px;
  position: relative;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero::before {
  background:
    linear-gradient(120deg, transparent 0 40%, rgba(0, 174, 239, 0.08) 40% 42%, transparent 42% 70%, rgba(247, 148, 30, 0.08) 70% 72%, transparent 72%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero > * {
  position: relative;
  z-index: 1;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero-copy {
  flex: 1 1 18rem;
  margin-right: auto;
  max-width: 42rem;
  min-width: 0;
  text-align: left;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero-aside {
  display: grid;
  gap: 12px;
  margin-left: auto;
  min-width: min(100%, 220px);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-kicker {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  margin: 0 0 10px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-hero-lead {
  color: #4b5c6b;
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 16px;
  max-width: none;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-chip {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow));
  border-radius: 12px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  padding: 7px 11px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-chip.soft {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 174, 239, 0.28);
  color: var(--brand-blue-deep);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-progress {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 174, 239, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-progress span,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-meta span {
  color: #5b6b7c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-progress strong {
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: 1.35rem;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 18px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action {
  animation: studentRise 640ms ease both;
  background:
    linear-gradient(160deg, #ffffff, #f5fbff);
  border: 1px solid rgba(0, 174, 239, 0.18);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 42, 61, 0.06);
  color: inherit;
  display: grid;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(2) { animation-delay: 40ms; }
:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(3) { animation-delay: 80ms; }
:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(4) { animation-delay: 120ms; }
:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(5) { animation-delay: 160ms; }
:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(6) { animation-delay: 200ms; }

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:hover {
  border-color: rgba(0, 174, 239, 0.45);
  box-shadow: 0 18px 34px rgba(0, 174, 239, 0.12);
  transform: translateY(-3px);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(3n + 2) {
  background: linear-gradient(160deg, #ffffff, var(--student-sand));
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action:nth-child(3n) {
  background: linear-gradient(160deg, #ffffff, #eef6ff);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action-label {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action strong {
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: 1.15rem;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-action small {
  color: #5b6b7c;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-panels {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-panel {
  animation: studentRise 700ms ease both;
  border-color: rgba(0, 174, 239, 0.18);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-panel-head {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-panel-head h3 {
  margin: 0 0 4px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-panel-head .muted {
  margin: 0;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed a,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed-static {
  align-items: center;
  background: rgba(248, 252, 252, 0.9);
  border: 1px solid rgba(0, 174, 239, 0.12);
  border-radius: 14px;
  color: inherit;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed a:hover {
  background: #ffffff;
  border-color: rgba(0, 174, 239, 0.35);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed a > div,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-feed-static > div {
  display: grid;
  gap: 2px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-empty,
:is(.portal-student, .portal-instructor, .portal-responsible) .student-empty-panel {
  color: #5b6b7c;
  padding: 8px 2px;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-empty-panel {
  padding: 28px;
  text-align: center;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-status {
  border-radius: 10px;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 6px 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-status.ok {
  background: #dcfce7;
  color: #166534;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-status.warn {
  background: #ffedd5;
  color: #c2410c;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-status.danger {
  background: #fee2e2;
  color: #b91c1c;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-status.soft {
  background: #e0f2fe;
  color: #075985;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card {
  animation: studentRise 560ms ease both;
  background:
    linear-gradient(165deg, #ffffff, #f5fbff);
  border: 1px solid rgba(0, 174, 239, 0.18);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 42, 61, 0.06);
  color: inherit;
  display: grid;
  gap: 10px;
  padding: 18px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card:hover {
  box-shadow: 0 18px 36px rgba(0, 174, 239, 0.14);
  transform: translateY(-3px);
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card .muted {
  margin: 0;
}

:is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-meta {
  align-items: end;
  border-top: 1px solid rgba(0, 174, 239, 0.12);
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
}

@keyframes studentRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes studentOrbDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.08); }
}

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

@keyframes studentSpark {
  0%, 100% {
    opacity: 0.25;
    transform: translateY(0) scale(0.85);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-10px) scale(1.15);
  }
}

@keyframes studentChipFlow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes studentShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes studentBar {
  0% { width: 28%; }
  100% { width: 86%; }
}

@keyframes studentLivePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(210, 35, 42, 0.28);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(210, 35, 42, 0);
  }
}

@keyframes studentStatusPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Student-only motion layer */
.portal-student .student-motion {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute !important;
  z-index: 0 !important;
}

.portal-student .student-orb {
  border-radius: 50%;
  filter: blur(2px);
  position: absolute;
}

.portal-student .student-orb-a {
  animation: studentOrbDrift 11s ease-in-out infinite;
  background: radial-gradient(circle, rgba(210, 35, 42, 0.22), transparent 70%);
  height: 180px;
  right: -40px;
  top: -50px;
  width: 180px;
}

.portal-student .student-orb-b {
  animation: studentOrbDriftAlt 14s ease-in-out infinite;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.2), transparent 70%);
  bottom: -60px;
  height: 160px;
  left: 18%;
  width: 160px;
}

.portal-student .student-orb-c {
  animation: studentOrbDrift 16s ease-in-out infinite reverse;
  background: radial-gradient(circle, rgba(247, 148, 30, 0.2), transparent 70%);
  height: 120px;
  right: 28%;
  top: 36%;
  width: 120px;
}

.portal-student .student-spark {
  animation: studentSpark 3.2s ease-in-out infinite;
  background: var(--brand-yellow);
  border-radius: 999px;
  height: 7px;
  position: absolute;
  width: 7px;
}

.portal-student .student-spark-a {
  animation-delay: 0s;
  background: var(--brand-red);
  right: 18%;
  top: 22%;
}

.portal-student .student-spark-b {
  animation-delay: 0.8s;
  background: var(--brand-blue);
  right: 8%;
  top: 58%;
}

.portal-student .student-spark-c {
  animation-delay: 1.4s;
  right: 32%;
  top: 72%;
}

.portal-student .student-chip:not(.soft) {
  background: var(--brand-red);
  isolation: isolate;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.portal-student .student-chip:not(.soft)::before {
  animation: studentChipFlow 6s linear infinite;
  /* Left half === right half so translateX(-50%) loops with no seam */
  background-image: linear-gradient(
    110deg,
    var(--brand-red) 0%,
    var(--brand-yellow) 16.666%,
    var(--brand-blue) 33.333%,
    var(--brand-red) 50%,
    var(--brand-yellow) 66.666%,
    var(--brand-blue) 83.333%,
    var(--brand-red) 100%
  );
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 200%;
  will-change: transform;
  z-index: -1;
}

.portal-student .student-chip:not(.soft) > * {
  position: relative;
  z-index: 1;
}

.portal-student .student-progress-bar {
  background: rgba(0, 174, 239, 0.12);
  border-radius: 999px;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
}

.portal-student .student-progress-bar span {
  animation: studentBar 2.8s ease-in-out infinite alternate;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-blue));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 18%;
}

.portal-student .student-action.is-live {
  animation: studentRise 640ms ease both, studentLivePulse 2.4s ease-in-out infinite;
  border-color: rgba(210, 35, 42, 0.35);
}

.portal-student .student-action.is-live .student-action-label::after {
  animation: studentStatusPulse 1.8s ease-in-out infinite;
  background: var(--brand-red);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 7px;
  margin-left: 6px;
  vertical-align: middle;
  width: 7px;
}

.portal-student .student-status.warn {
  animation: studentStatusPulse 2s ease-in-out infinite;
}

.portal-student .student-feed a:hover,
.portal-student .student-feed-static:hover {
  transform: translateX(3px);
  transition: transform 180ms ease, background 160ms ease, border-color 160ms ease;
}

@media (max-width: 900px) {
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-panels {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-hero,
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-action,
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-panel,
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card {
    animation: none;
  }

  :is(.portal-student, .portal-instructor, .portal-responsible) .student-action:hover,
  :is(.portal-student, .portal-instructor, .portal-responsible) .student-homework-card:hover {
    transform: none;
  }

  .portal-student .student-orb,
  .portal-student .student-spark,
  .portal-student .student-chip:not(.soft)::before,
  .portal-student .student-progress-bar span,
  .portal-student .student-action.is-live,
  .portal-student .student-action.is-live .student-action-label::after,
  .portal-student .student-status.warn {
    animation: none !important;
  }
}

/* SweetAlert polish */
.dys-swal-popup {
  border: 1px solid rgba(210, 35, 42, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  padding: 26px;
  position: relative;
}

.dys-swal-popup::before {
  background:
    radial-gradient(circle at top left, rgba(210, 35, 42, 0.16), transparent 12rem),
    radial-gradient(circle at top right, rgba(247, 148, 30, 0.14), transparent 10rem),
    radial-gradient(circle at bottom, rgba(0, 174, 239, 0.12), transparent 12rem);
  border-radius: 28px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.dys-swal-title,
.dys-swal-text,
.dys-swal-popup .swal2-icon,
.dys-swal-popup .swal2-actions {
  position: relative;
  z-index: 1;
}

.dys-swal-title {
  color: #0f172a;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.dys-swal-text {
  color: #667085;
  font-size: 14px;
}

.dys-swal-confirm,
.dys-swal-cancel {
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  cursor: pointer;
  display: inline-flex !important;
  font: inherit;
  font-weight: 800 !important;
  justify-content: center;
  margin: 0 6px;
  min-width: 7.5rem;
  padding: 11px 18px !important;
}

.dys-swal-popup .dys-swal-confirm,
.dys-swal-popup button.dys-swal-confirm {
  background: linear-gradient(135deg, #d2232a, #f7941e) !important;
  box-shadow: 0 12px 24px rgba(210, 35, 42, 0.22) !important;
  color: #ffffff !important;
}

.dys-swal-popup .dys-swal-confirm:hover,
.dys-swal-popup button.dys-swal-confirm:hover {
  background: linear-gradient(135deg, #b71c22, #e08510) !important;
  color: #ffffff !important;
}

.dys-swal-popup .dys-swal-cancel,
.dys-swal-popup button.dys-swal-cancel {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475467 !important;
}

.dys-swal-popup .dys-swal-cancel:hover,
.dys-swal-popup button.dys-swal-cancel:hover {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

.dys-swal-actions {
  gap: 4px;
}

.dys-swal-toast {
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Profile detail panels */
.profile-hero {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
}

.profile-hero-main h2 {
  margin-bottom: 6px;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-status-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 16px;
}

.info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-item {
  background: var(--surface-soft, #f9fafb);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.info-item span {
  color: var(--muted, #667085);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.info-item strong {
  color: var(--text, #101828);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.info-item.wide {
  grid-column: 1 / -1;
}

.profile-notes {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #475467;
  line-height: 1.55;
  margin: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
}

.profile-section-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-section-head h3 {
  margin: 0;
}

.button.secondary {
  background: #ffffff;
  border: 1px solid var(--line, #e5e7eb);
  color: var(--text, #101828);
  box-shadow: none;
}

.button.secondary:hover {
  background: #f8fafc;
  border-color: rgba(0, 174, 239, 0.45);
  color: var(--brand-blue-deep);
}

#profil-duzenle {
  scroll-margin-top: 24px;
}

/* Management home — DENEYAP accent */
.portal-management {
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(210, 35, 42, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 35% at 100% 8%, rgba(0, 174, 239, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 30% at 70% 100%, rgba(247, 148, 30, 0.05), transparent 45%);
}

.portal-management .mgmt-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

.portal-management .mgmt-kpi {
  background: #ffffff;
  border: 1px solid rgba(210, 35, 42, 0.12);
  border-radius: 14px;
  border-top: 3px solid var(--brand-blue);
  padding: 12px 14px;
}

.portal-management .mgmt-kpi:nth-child(2) {
  border-top-color: var(--brand-yellow);
}

.portal-management .mgmt-kpi:nth-child(3) {
  border-top-color: var(--brand-blue-deep);
}

.portal-management .mgmt-kpi:nth-child(4) {
  border-top-color: var(--brand-yellow);
}

.portal-management .mgmt-kpi:nth-child(5) {
  border-top-color: var(--brand-red);
}

.portal-management .mgmt-kpi:nth-child(6) {
  border-top-color: var(--brand-blue);
}

.portal-management .mgmt-kpi span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-management .mgmt-kpi strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.portal-management .mgmt-kpi:nth-child(4) strong {
  color: var(--brand-blue-deep);
}

.portal-management .mgmt-kpi:nth-child(5) strong {
  color: var(--brand-red);
}

.portal-management .mgmt-section-head {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.portal-management .mgmt-section-head h2 {
  margin: 0 0 4px;
}

.portal-management .mgmt-section-head .muted {
  margin: 0;
}

.portal-management .map-dashboard {
  border-color: rgba(210, 35, 42, 0.14);
}

.portal-management .admin-analytics-grid .card {
  border-color: rgba(0, 174, 239, 0.16);
}

.portal-management .admin-analytics-grid .card h2,
.portal-management .admin-analytics-grid .card h4 {
  color: var(--brand-blue-deep);
}

.portal-management .critical-panel {
  border-color: rgba(210, 35, 42, 0.2);
}

.portal-management .critical-panel h3 {
  color: var(--brand-red);
}

@media (max-width: 1100px) {
  .portal-management .mgmt-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-management .mgmt-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.text-danger {
  color: var(--brand-red);
}

.score-breakdown {
  display: grid;
  gap: 12px;
}

.score-breakdown-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1fr) auto;
}

.score-breakdown-meta {
  display: grid;
  gap: 2px;
}

.score-breakdown-meta strong {
  font-size: 0.95rem;
}

.score-breakdown-track {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.score-breakdown-track span {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2px;
}

.score-breakdown-points {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .score-breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .score-breakdown-track {
    grid-column: 1 / -1;
    order: 3;
  }
}

.approval-hero {
  align-items: flex-start;
  background:
    radial-gradient(circle at 12% 18%, rgba(210, 35, 42, 0.1), transparent 16rem),
    radial-gradient(circle at 88% 12%, rgba(0, 174, 239, 0.12), transparent 14rem),
    linear-gradient(135deg, #ffffff 0%, #f5fbff 62%, #fff7ed 100%);
  border: 1px solid rgba(0, 174, 239, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: space-between;
}

.approval-hero-copy {
  flex: 1 1 18rem;
  min-width: 0;
}

.approval-kicker {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.approval-hero h2 {
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.approval-lead {
  color: #4b5c6b;
  line-height: 1.55;
  margin: 0 0 16px;
  max-width: 38rem;
}

.approval-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.approval-chip,
.approval-status {
  border-radius: 12px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}

.approval-chip {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow));
  color: #ffffff;
}

.approval-chip.soft {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 174, 239, 0.28);
  color: var(--brand-blue-deep);
}

.approval-status.ok {
  background: var(--success-soft);
  color: #166534;
}

.approval-status.warn {
  background: var(--warning-soft);
  color: #c2410c;
}

.profile-card-head {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.profile-card-head h2 {
  margin-top: 0;
}

.approval-badge {
  align-items: center;
  flex-shrink: 0;
  gap: 7px;
  white-space: nowrap;
}

.approval-badge-dot {
  animation: approval-badge-pulse 1.6s ease-in-out infinite;
  background: currentColor;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

@keyframes approval-badge-pulse {
  50% { opacity: 0.35; }
}

.submitted-modal {
  align-items: center;
  animation: submitted-fade 0.2s ease-out;
  background: rgba(16, 24, 40, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.submitted-modal-card {
  animation: submitted-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.25);
  max-width: 440px;
  padding: 32px 28px 26px;
  text-align: center;
  width: 100%;
}

.submitted-modal-icon {
  align-items: center;
  background: var(--success-soft);
  border-radius: 50%;
  color: var(--success);
  display: inline-flex;
  height: 72px;
  justify-content: center;
  margin-bottom: 14px;
  width: 72px;
}

.submitted-modal-card h2 {
  font-family: "Outfit", "Manrope", sans-serif;
  margin: 0 0 10px;
}

.submitted-modal-card p {
  color: #4b5c6b;
  margin: 0 0 10px;
}

.submitted-modal-card .submitted-modal-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.submitted-modal-card .button {
  min-width: 140px;
}

@keyframes submitted-fade {
  from { opacity: 0; }
}

@keyframes submitted-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}

.approval-status.danger {
  background: var(--danger-soft);
  color: #b91c1c;
}

.approval-count {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 174, 239, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  min-width: min(100%, 160px);
  padding: 14px 16px;
}

.approval-count span,
.approval-count small {
  color: #5b6b7c;
  font-size: 12px;
  font-weight: 700;
}

.approval-count span {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.approval-count strong {
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.approval-docs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 16px;
}

.approval-doc {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  padding: 16px;
}

.approval-doc.is-ready {
  border-color: rgba(22, 163, 74, 0.28);
}

.approval-doc.is-missing {
  background: #fffaf3;
  border-color: rgba(247, 148, 30, 0.35);
}

.approval-doc-mark {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  flex: 0 0 36px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.approval-doc.is-ready .approval-doc-mark {
  background: var(--success-soft);
  color: #166534;
}

.approval-doc.is-missing .approval-doc-mark {
  background: var(--warning-soft);
  color: #c2410c;
}

.approval-doc-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.approval-doc-copy strong {
  font-size: 0.98rem;
}

.approval-doc-copy small {
  color: var(--muted);
}

.approval-doc .button {
  flex: 0 0 auto;
  padding: 8px 14px;
}

.approval-decision {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-top: 16px;
}

.approval-decision h3 {
  font-family: "Outfit", "Manrope", sans-serif;
  margin: 0 0 6px;
}

.approval-decision p {
  color: #4b5c6b;
  margin: 0;
  max-width: 36rem;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.approval-actions .button.reject {
  background: #ffffff;
  border: 1px solid rgba(210, 35, 42, 0.35);
  box-shadow: none;
  color: var(--brand-red-dark);
}

.approval-actions .button.reject:hover {
  background: var(--danger-soft);
  color: var(--brand-red-dark);
}

.approval-actions .button:disabled {
  background: #e4e7ec;
  box-shadow: none;
  color: #98a2b3;
  cursor: not-allowed;
}
