:root {
  color-scheme: dark;
  --bg: #06080c;
  --panel: rgba(15, 20, 28, 0.86);
  --panel-strong: rgba(18, 25, 35, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --muted: rgba(236, 241, 247, 0.64);
  --text: #f7f7f4;
  --brand: #e63d37;
  --brand-strong: #ff5a50;
  --green: #33d69f;
  --cyan: #55d6ff;
  --yellow: #ffc857;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(230, 61, 55, 0.2), transparent 24rem),
    linear-gradient(180deg, #070a0f 0%, #05070a 100%);
  color: var(--text);
  font-family: "Sora", "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.86);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand strong {
  display: block;
  letter-spacing: 0.32em;
  font-size: 0.9rem;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portal-sidebar .brand > span > span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-strong), #c52e2f);
  box-shadow: 0 18px 42px rgba(230, 61, 55, 0.26);
}

.button.slim {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 0.88rem;
}

.hero {
  display: grid;
  gap: 24px;
  padding: 56px 0 32px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 0;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h1 span,
h2 span {
  color: var(--brand-strong);
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.58fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 56px;
}

.panel,
.dashboard-card,
.sidebar,
.admin-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.panel {
  padding: 24px;
}

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

.field {
  display: grid;
  gap: 8px;
}

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

label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  outline: none;
  padding: 12px 14px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 90, 80, 0.64);
  box-shadow: 0 0 0 4px rgba(230, 61, 55, 0.12);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.category-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.category-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-card:has(input:checked) {
  border-color: rgba(255, 90, 80, 0.72);
  background: rgba(230, 61, 55, 0.13);
}

.category-card strong {
  line-height: 1.3;
}

.category-card small {
  color: var(--muted);
  line-height: 1.45;
}

.status-box {
  display: grid;
  gap: 14px;
}

.ticket-card {
  display: none;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(51, 214, 159, 0.26);
  border-radius: 16px;
  background: rgba(51, 214, 159, 0.08);
}

.ticket-card.is-visible {
  display: grid;
}

.ticket-code {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #12151a;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.hint-list li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--brand-strong);
  box-shadow: 0 0 18px rgba(230, 61, 55, 0.6);
}

.app-frame {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0 48px;
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
  align-self: start;
  padding: 18px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a,
.sidebar button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
}

.sidebar .active,
.sidebar a:hover,
.sidebar button:hover {
  background: rgba(230, 61, 55, 0.16);
  color: #fff;
}

.login-card {
  width: min(520px, calc(100% - 32px));
  margin: 58px auto;
}

.login-card h1 {
  max-width: 100%;
  font-size: clamp(3rem, 5vw, 4.65rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  padding-bottom: 0.12em;
}

.verification-card {
  display: grid;
  gap: 18px;
}

.verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.mail-center-wide {
  grid-column: 1 / -1;
}

.mail-operation-list {
  display: grid;
  gap: 10px;
}

.mail-operation-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.mail-operation-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.mail-operation-row strong,
.mail-operation-row span,
.mail-operation-row small {
  overflow-wrap: anywhere;
}

.mail-operation-row span,
.mail-operation-row small {
  color: var(--muted);
  line-height: 1.45;
}

.mail-error {
  color: var(--brand-strong) !important;
}

.dashboard {
  display: none;
  gap: 16px;
}

.dashboard.is-visible {
  display: grid;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  padding: 18px;
}

.kpi span,
.meta-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 1.9rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 16px;
}

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

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-strong), var(--green));
}

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

.timeline li {
  display: grid;
  gap: 4px;
  padding-left: 16px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.timeline time {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-shell {
  display: grid;
  gap: 16px;
  padding-bottom: 48px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
}

.admin-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: 680px;
  overflow: auto;
}

.request-row {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.request-row.is-active {
  border-color: rgba(255, 90, 80, 0.64);
  background: rgba(230, 61, 55, 0.14);
}

.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
}

.error,
.success {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.5;
}

.error.is-visible {
  display: block;
  border: 1px solid rgba(255, 90, 80, 0.3);
  background: rgba(230, 61, 55, 0.12);
}

.success.is-visible {
  display: block;
  border: 1px solid rgba(51, 214, 159, 0.26);
  background: rgba(51, 214, 159, 0.1);
}

.portal-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.48fr);
  gap: 28px;
  align-items: center;
  margin: 58px auto;
  overflow: hidden;
}

.portal-login-form {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.portal-auth-panels {
  position: relative;
  min-height: 430px;
}

.portal-auth-panel {
  position: absolute;
  inset: 0;
  align-content: start;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 14px, 0) scale(0.985);
  visibility: hidden;
  transition:
    opacity 240ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 260ms;
}

.portal-auth-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  visibility: visible;
  transition:
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
  z-index: 1;
}

.portal-auth-stack {
  display: grid;
  gap: 12px;
}

.portal-auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.portal-auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.portal-auth-tabs button.active,
.portal-auth-tabs button:hover,
.portal-auth-tabs button:focus-visible {
  background: rgba(230, 61, 55, 0.18);
  color: #fff;
}

.portal-auth-error,
.portal-auth-success {
  margin: 0;
}

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

.portal-security-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.86rem;
}

.portal-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0 56px;
}

.portal-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(230, 61, 55, 0.18), transparent 16rem),
    rgba(8, 11, 16, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.portal-sidebar nav {
  display: grid;
  gap: 7px;
}

.portal-sidebar a,
.portal-sidebar button {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.portal-sidebar .active,
.portal-sidebar a:hover,
.portal-sidebar button:hover {
  background: rgba(230, 61, 55, 0.16);
  color: #fff;
}

.portal-sidebar .active {
  box-shadow: inset 3px 0 0 var(--brand);
  transform: translateX(2px);
}

.claim-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.claim-box strong {
  letter-spacing: -0.02em;
}

.claim-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.claim-box input {
  min-height: 40px;
}

.portal-sidebar .claim-box .button {
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  padding: 0 14px;
  text-align: center;
}

.portal-main,
.admin-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.project-command,
.admin-command {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at 82% 10%, rgba(230, 61, 55, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
}

.project-command h1 {
  max-width: 840px;
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.command-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.project-switcher {
  min-width: min(360px, 72vw);
  min-height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.account-empty-state {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 320px;
}

.portal-kpi-grid,
.billing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-kpi-grid {
  align-items: stretch;
  gap: 10px;
}

.portal-kpi-grid .kpi {
  align-self: stretch;
  min-height: clamp(168px, 18vw, 220px);
  padding: clamp(16px, 1.65vw, 22px);
  overflow: hidden;
}

.portal-kpi-grid .kpi span {
  font-size: clamp(0.66rem, 0.72vw, 0.78rem);
  letter-spacing: 0.12em;
}

.portal-kpi-grid .kpi strong {
  margin-top: 14px;
  max-width: 100%;
  font-size: clamp(1.25rem, 1.65vw, 1.72rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  word-break: normal;
}

.portal-kpi-grid .kpi #portalNextStep {
  font-size: clamp(0.82rem, 1vw, 1rem);
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.portal-grid.two-column,
.admin-module-grid,
.admin-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.analytics-panel {
  display: grid;
  gap: 16px;
}

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

.portal-analytics-grid {
  grid-template-columns: 1.15fr repeat(2, minmax(0, 1fr));
}

.chart-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  align-content: start;
}

.chart-card::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 150px;
  background: radial-gradient(circle, rgba(230, 61, 55, 0.18), transparent 62%);
  pointer-events: none;
}

.chart-card-feature {
  min-height: 300px;
  background:
    radial-gradient(circle at 80% 0%, rgba(230, 61, 55, 0.2), transparent 28rem),
    rgba(255, 255, 255, 0.045);
}

.chart-card h3 {
  margin: 4px 0 16px;
  font-size: clamp(1.05rem, 1.22vw, 1.24rem);
  line-height: 1.24;
}

.chart-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 0.98vw, 1rem);
  line-height: 1.58;
  overflow-wrap: break-word;
}

.radial-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 156px;
  aspect-ratio: 1;
  margin: 10px 0 16px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel-strong) 0 58%, transparent 59%),
    conic-gradient(var(--brand) calc(var(--value) * 1%), rgba(255, 255, 255, 0.09) 0);
  box-shadow: 0 24px 70px rgba(230, 61, 55, 0.14);
}

.radial-chart::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
}

.radial-chart div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  text-align: center;
}

.radial-chart strong {
  font-size: 1.85rem;
  letter-spacing: -0.05em;
}

.radial-chart span,
.chart-bar-row span,
.chart-bar-row strong,
.sparkline-labels,
.chart-chip-row,
.mail-checklist p,
.mail-chip-list span {
  color: var(--muted);
  font-size: clamp(0.82rem, 0.88vw, 0.9rem);
}

.chart-bar-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, 0.62fr) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.chart-bar-row + .chart-bar-row {
  margin-top: 11px;
}

.chart-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.chart-bar i {
  display: block;
  width: calc(var(--value) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
}

.sparkline {
  width: 100%;
  min-height: 88px;
  margin-top: 4px;
  overflow: visible;
}

.sparkline polyline {
  fill: none;
  stroke: var(--brand-strong);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(230, 61, 55, 0.25));
}

.sparkline circle {
  fill: var(--text);
  stroke: var(--brand);
  stroke-width: 2;
}

.sparkline-labels,
.chart-chip-row,
.mail-link-row,
.mail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sparkline-labels {
  justify-content: space-between;
}

.chart-chip-row span,
.mail-chip-list span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-record-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.timeline-record-grid {
  display: block;
}

#adminMilestoneList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

#adminMilestoneList .admin-inline-form,
#adminMilestoneList .record-card {
  min-width: 0;
  height: 100%;
}

.portal-section,
.admin-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: 96px;
}

.portal-motion-ready .portal-section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.portal-motion-ready .portal-section.is-in-view {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.section-heading h2,
.admin-section h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
}

.section-heading > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tech-summary,
.scope-grid,
.file-grid,
.milestone-track,
.card-list,
.thread-list {
  display: grid;
  gap: 12px;
}

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

.tech-summary div,
.scope-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.tech-summary span,
.record-meta,
.milestone-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.tech-summary strong {
  display: block;
  margin-top: 7px;
  font-size: 1rem;
}

.tech-summary p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.scope-card:first-child {
  grid-column: 1 / -1;
}

.scope-card p,
.record-card p,
.file-card p {
  color: var(--muted);
  line-height: 1.65;
}

.milestone-track {
  position: relative;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.milestone-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 210px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(10, 14, 20, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.milestone-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 16px 56px;
  height: 1px;
  background: linear-gradient(90deg, rgba(230, 61, 55, 0.8), transparent);
  opacity: 0.22;
}

.milestone-card:hover {
  border-color: rgba(230, 61, 55, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  transform: translateY(-3px);
}

.milestone-step {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.milestone-step span {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.035);
}

.milestone-card.status-devam-ediyor .milestone-step span,
.milestone-card.status-on-inceleme .milestone-step span,
.milestone-card.status-planlama .milestone-step span {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 7px rgba(230, 61, 55, 0.12), 0 0 22px rgba(230, 61, 55, 0.35);
}

.milestone-card.status-tamamlandi .milestone-step span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(51, 214, 159, 0.1), 0 0 22px rgba(51, 214, 159, 0.28);
}

.milestone-body {
  display: grid;
  align-content: start;
  gap: 12px;
}

.milestone-title-row,
.milestone-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.milestone-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.milestone-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.62;
}

.milestone-card small,
.milestone-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.milestone-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.record-card,
.thread-card,
.file-card {
  display: grid;
  gap: 12px;
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.record-head h3 {
  margin: 8px 0;
}

.record-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-review-form,
.inline-reply-form,
.admin-inline-form {
  display: grid;
  gap: 10px;
}

.inline-review-form {
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr) auto;
}

.inline-reply-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.deliverable-card {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 92% 10%, rgba(85, 214, 255, 0.08), transparent 16rem),
    rgba(255, 255, 255, 0.045);
}

.deliverable-review {
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.deliverable-review label {
  display: grid;
  gap: 7px;
}

.deliverable-review label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.deliverable-review textarea,
.inline-reply-form textarea {
  resize: vertical;
}

.review-helper {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(236, 241, 247, 0.54);
  font-size: 0.82rem;
  line-height: 1.55;
}

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

.reply-list {
  display: grid;
  gap: 10px;
}

.reply {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.reply.from-ogeday {
  border-color: rgba(230, 61, 55, 0.22);
  background: rgba(230, 61, 55, 0.08);
}

.reply.from-customer {
  margin-left: clamp(0px, 6vw, 76px);
  border-color: rgba(85, 214, 255, 0.16);
  background: rgba(85, 214, 255, 0.055);
}

.reply p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.reply time,
.empty-state {
  color: var(--muted);
}

.note-box {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(51, 214, 159, 0.18);
  border-radius: 14px;
  background: rgba(51, 214, 159, 0.07);
}

.portal-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: min(360px, calc(100% - 36px));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.admin-grid-wide {
  grid-template-columns: minmax(280px, 0.28fr) minmax(0, 1fr);
}

.admin-hero {
  position: relative;
  padding-bottom: 10px;
}

.admin-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

.admin-session {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-command h2 {
  margin-bottom: 6px;
}

.admin-list-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.admin-filter-form {
  display: grid;
  gap: 10px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 13px;
}

.admin-tabs button.active,
.admin-tabs button:hover,
.admin-tabs button:focus-visible {
  background: rgba(230, 61, 55, 0.18);
  color: #fff;
}

.admin-tab-panel {
  display: none;
  gap: 16px;
}

.admin-tab-panel.active {
  display: grid;
}

.mail-center-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 14px;
}

.mail-center-card {
  align-content: start;
}

.mail-checklist {
  display: grid;
  gap: 10px;
}

.mail-checklist div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.mail-checklist span {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 1px solid rgba(230, 61, 55, 0.7);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(230, 61, 55, 0.25);
}

.mail-checklist p {
  margin: 0;
  line-height: 1.55;
}

.admin-list-panel .request-row span:nth-child(3) {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
  line-height: 1.45;
}

.admin-inline-form input,
.admin-inline-form select,
.admin-inline-form textarea {
  min-height: 40px;
  padding: 10px 12px;
}

@media (max-width: 980px) {
  .layout,
  .app-frame,
  .portal-app,
  .portal-login,
  .admin-grid,
  .admin-grid-wide,
  .dashboard-grid,
  .portal-grid.two-column,
  .admin-module-grid,
  .analytics-grid,
  .portal-analytics-grid,
  .mail-center-grid,
  .admin-record-grid {
    grid-template-columns: 1fr;
  }

  #adminMilestoneList {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .portal-sidebar,
  .admin-list-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

  .kpi-grid,
  .portal-kpi-grid,
  .billing-summary,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .kpi-grid,
  .portal-kpi-grid,
  .billing-summary,
  .category-grid,
  .portal-auth-tabs {
    grid-template-columns: 1fr;
  }

  .portal-auth-panels {
    min-height: 680px;
  }

  .project-command,
  .admin-command,
  .record-head,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .command-meta {
    justify-items: start;
  }

  .scope-grid,
  .tech-summary,
  .inline-review-form,
  .inline-reply-form,
  .chart-bar-row {
    grid-template-columns: 1fr;
  }

  .scope-card:first-child {
    grid-column: auto;
  }

  h1 {
    font-size: 2.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .portal-motion-ready .portal-section,
  .portal-auth-panel {
    transition: none;
    transform: none;
  }

  .portal-motion-ready .portal-section {
    opacity: 1;
  }
}
