:root {
  --navy-950: #04111d;
  --navy-900: #071827;
  --navy-800: #0d263a;
  --navy-700: #17364c;
  --navy-100: #dbe6ed;
  --navy-50: #eef4f7;
  --gold-600: #a9823e;
  --gold-500: #c49a50;
  --gold-400: #d4b370;
  --gold-100: #f4ead7;
  --ink: #13202a;
  --muted: #687782;
  --line: #dce4e8;
  --surface: #ffffff;
  --background: #f3f6f7;
  --success: #247159;
  --success-bg: #e5f3ee;
  --warning: #965d20;
  --warning-bg: #fff0dc;
  --danger: #9d3b45;
  --danger-bg: #f9e7e9;
  --info: #2d657f;
  --info-bg: #e6f0f5;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 14px rgba(7, 24, 39, 0.06);
  --shadow-md: 0 16px 42px rgba(7, 24, 39, 0.12);
  --sidebar-width: 272px;
  color-scheme: light;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
select,
input[type="checkbox"],
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--navy-900);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 26px 18px 20px;
  color: #eaf0f3;
  background:
    radial-gradient(circle at 12% 8%, rgba(196, 154, 80, 0.1), transparent 26%),
    var(--navy-900);
}

[dir="rtl"] .sidebar {
  inset: 0 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 28px;
}

.brand img {
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.brand div {
  display: grid;
  gap: 2px;
}

.brand strong {
  color: white;
  font-size: 0.91rem;
  letter-spacing: 0.18em;
}

.brand span {
  color: var(--gold-400);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.primary-nav {
  display: grid;
  gap: 6px;
}

.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  color: #aebdc6;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 11px;
  transition: 160ms ease;
}

[dir="rtl"] .nav-button {
  text-align: right;
}

.nav-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav-button.active {
  color: white;
  background: rgba(196, 154, 80, 0.16);
  box-shadow: inset 3px 0 var(--gold-500);
}

[dir="rtl"] .nav-button.active {
  box-shadow: inset -3px 0 var(--gold-500);
}

.nav-button.active svg {
  color: var(--gold-400);
}

.nav-badge {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 7px;
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  background: var(--gold-400);
  border-radius: 99px;
}

[dir="rtl"] .nav-badge {
  margin-right: auto;
  margin-left: 0;
}

.sidebar-note {
  display: flex;
  gap: 11px;
  margin-top: auto;
  padding: 14px;
  color: #b6c5cc;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.sidebar-note svg {
  flex: 0 0 auto;
  color: var(--gold-400);
}

.sidebar-note div {
  display: grid;
  gap: 4px;
}

.sidebar-note strong {
  color: #edf2f4;
  font-size: 0.76rem;
}

.sidebar-note span {
  font-size: 0.68rem;
  line-height: 1.45;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px 0;
  color: #81939e;
}

.environment-pill {
  padding: 4px 7px;
  color: var(--gold-400);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid rgba(212, 179, 112, 0.3);
  border-radius: 99px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

[dir="rtl"] .workspace {
  margin-right: var(--sidebar-width);
  margin-left: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  padding: 13px clamp(20px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(220, 228, 232, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-title {
  display: grid;
  gap: 3px;
}

.topbar-title span {
  color: var(--gold-600);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topbar-title h1 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

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

[dir="rtl"] .topbar-actions {
  margin-right: auto;
  margin-left: 0;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.language-switch svg {
  width: 16px;
  height: 16px;
  margin-right: 2px;
}

[dir="rtl"] .language-switch svg {
  margin-right: 0;
  margin-left: 2px;
}

.language-option {
  padding: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.language-option.active {
  color: var(--navy-900);
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy-700);
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.icon-button.light {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--gold-500);
  border: 2px solid white;
  border-radius: 50%;
}

.profile-button {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 10px;
  padding: 5px 9px 5px 5px;
  color: var(--ink);
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

[dir="rtl"] .profile-button {
  padding: 5px 5px 5px 9px;
  text-align: right;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-100);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--navy-800);
  border-radius: 9px;
}

.profile-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  max-width: 112px;
  font-size: 0.76rem;
}

.profile-copy small {
  color: var(--muted);
  font-size: 0.66rem;
}

.profile-button > svg {
  width: 15px;
  height: 15px;
  margin-left: auto;
  transform: rotate(90deg);
}

[dir="rtl"] .profile-button > svg {
  margin-right: auto;
  margin-left: 0;
  transform: rotate(-90deg);
}

.profile-menu {
  position: absolute;
  z-index: 25;
  top: 72px;
  right: clamp(20px, 3vw, 44px);
  display: grid;
  width: 230px;
  gap: 5px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .profile-menu {
  right: auto;
  left: clamp(20px, 3vw, 44px);
}

.profile-menu > span {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.profile-menu button:hover,
.profile-menu button.selected {
  background: var(--navy-50);
}

.role-radio {
  width: 14px;
  height: 14px;
  border: 1px solid #9aabb5;
  border-radius: 50%;
}

.profile-menu button.selected .role-radio {
  background: var(--gold-500);
  border: 4px solid var(--navy-900);
}

#mainContent {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 42px);
  outline: none;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.75fr);
  gap: 24px;
}

.stack {
  display: grid;
  align-content: start;
  gap: 22px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 230px;
  grid-template-columns: minmax(0, 1.2fr) minmax(210px, 0.65fr);
  align-items: center;
  padding: clamp(25px, 4vw, 42px);
  color: white;
  background:
    linear-gradient(120deg, rgba(7, 24, 39, 0.97), rgba(13, 38, 58, 0.94)),
    var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(212, 179, 112, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(212, 179, 112, 0.035), 0 0 0 85px rgba(212, 179, 112, 0.025);
}

[dir="rtl"] .hero-card::after {
  right: auto;
  left: -80px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow,
.section-eyebrow {
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h2 {
  max-width: 620px;
  margin: 11px 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

[dir="rtl"] .hero-copy h2 {
  line-height: 1.35;
}

.hero-copy p {
  max-width: 580px;
  margin: 0 0 23px;
  color: #c8d3d9;
  font-size: 0.92rem;
  line-height: 1.65;
}

.hero-actions,
.button-row,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.bridge-diagram {
  position: relative;
  width: 190px;
  height: 150px;
}

.bridge-diagram .node {
  position: absolute;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding: 10px;
  color: #dbe5ea;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

.bridge-diagram .node:first-child {
  top: 6px;
  left: 0;
}

.bridge-diagram .node:last-child {
  right: 0;
  bottom: 3px;
  color: var(--gold-100);
  border-color: rgba(212, 179, 112, 0.42);
}

.bridge-line {
  position: absolute;
  top: 73px;
  left: 55px;
  width: 91px;
  height: 3px;
  background: var(--gold-500);
  transform: rotate(22deg);
  transform-origin: left center;
  box-shadow: 0 -8px 0 -2px rgba(212, 179, 112, 0.35), 0 8px 0 -2px rgba(212, 179, 112, 0.35);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: white;
  font-size: 0.81rem;
  font-weight: 750;
  text-decoration: none;
  background: var(--navy-800);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(7, 24, 39, 0.15);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.button-gold {
  color: var(--navy-950);
  background: var(--gold-400);
}

.button-outline {
  color: var(--navy-800);
  background: white;
  border-color: var(--line);
}

.hero-card .button-outline {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

.button-ghost {
  color: var(--navy-700);
  background: transparent;
}

.button-danger {
  color: var(--danger);
  background: var(--danger-bg);
}

.button svg {
  width: 17px;
  height: 17px;
}

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

.stat-card {
  display: grid;
  gap: 11px;
  padding: 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--navy-700);
  background: var(--navy-50);
  border-radius: 9px;
}

.stat-icon.gold {
  color: var(--gold-600);
  background: var(--gold-100);
}

.stat-icon.warn {
  color: var(--warning);
  background: var(--warning-bg);
}

.stat-value {
  color: var(--navy-900);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 1px rgba(7, 24, 39, 0.02);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
}

.section-title {
  display: grid;
  gap: 4px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1rem;
}

.section-title span {
  color: var(--muted);
  font-size: 0.72rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  color: var(--gold-600);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
  background: transparent;
  border: 0;
}

.text-link svg {
  width: 15px;
  height: 15px;
}

[dir="rtl"] .text-link svg {
  transform: rotate(180deg);
}

.case-list {
  display: grid;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, 0.8fr) 106px 30px;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
}

[dir="rtl"] .case-row {
  text-align: right;
}

.case-row:hover {
  background: #fafcfc;
}

.case-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.case-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-600);
  font-size: 0.75rem;
  font-weight: 850;
  background: var(--gold-100);
  border-radius: 10px;
}

.case-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.case-copy strong {
  overflow: hidden;
  color: var(--navy-900);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-copy span,
.case-meta {
  color: var(--muted);
  font-size: 0.69rem;
}

.status-badge,
.priority-badge,
.risk-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  font-size: 0.66rem;
  font-weight: 750;
  border-radius: 99px;
}

.status-badge::before,
.priority-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.status-review,
.status-submitted {
  color: var(--info);
  background: var(--info-bg);
}

.status-evidence,
.status-quote {
  color: var(--warning);
  background: var(--warning-bg);
}

.status-delivered,
.status-closed {
  color: var(--success);
  background: var(--success-bg);
}

.priority-high,
.risk-high {
  color: var(--danger);
  background: var(--danger-bg);
}

.priority-medium,
.risk-medium {
  color: var(--warning);
  background: var(--warning-bg);
}

.priority-standard,
.risk-low {
  color: var(--success);
  background: var(--success-bg);
}

.case-arrow {
  color: #9aabb5;
}

[dir="rtl"] .case-arrow {
  transform: rotate(180deg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 0 22px 22px;
}

.service-card {
  position: relative;
  display: grid;
  min-height: 170px;
  align-content: start;
  gap: 10px;
  padding: 18px;
  color: inherit;
  text-align: left;
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 13px;
}

[dir="rtl"] .service-card {
  text-align: right;
}

.service-card:hover,
.service-card.selected {
  background: var(--gold-100);
  border-color: rgba(169, 130, 62, 0.38);
}

.service-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--navy-800);
  border-radius: 8px;
}

.service-card strong {
  color: var(--navy-900);
  font-size: 0.79rem;
  line-height: 1.45;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.attention-list {
  display: grid;
  gap: 1px;
}

.attention-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.attention-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--warning);
  background: var(--warning-bg);
  border-radius: 9px;
}

.attention-copy {
  display: grid;
  gap: 3px;
}

.attention-copy strong {
  color: var(--navy-900);
  font-size: 0.76rem;
}

.attention-copy span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.boundary-card {
  padding: 20px;
  color: #d6e0e5;
  background: var(--navy-800);
  border: 0;
}

.boundary-card svg {
  color: var(--gold-400);
}

.boundary-card h3 {
  margin: 12px 0 8px;
  color: white;
  font-size: 0.95rem;
}

.boundary-card p {
  margin: 0;
  color: #b8c7ce;
  font-size: 0.72rem;
  line-height: 1.65;
}

.boundary-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 700;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-intro h2 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -0.035em;
}

.page-intro p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.filter-button {
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.filter-button.active {
  color: var(--navy-900);
  background: var(--gold-100);
  border-color: rgba(169, 130, 62, 0.35);
}

.case-table-header {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, 0.8fr) 106px 30px;
  gap: 14px;
  padding: 11px 22px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}

.form-card {
  padding: clamp(20px, 3vw, 30px);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
}

.step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #9aa8b0;
  font-size: 0.66rem;
  text-align: center;
}

.step::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.step:first-child::before {
  display: none;
}

[dir="rtl"] .step::before {
  right: auto;
  left: 50%;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: white;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.step.active,
.step.done {
  color: var(--navy-900);
  font-weight: 700;
}

.step.active .step-number {
  color: var(--navy-950);
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.step.done .step-number {
  color: white;
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.step.done::before,
.step.active::before {
  background: var(--navy-800);
}

.form-section h2 {
  margin: 0 0 7px;
  color: var(--navy-900);
  font-size: 1.12rem;
}

.form-section > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.6;
}

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

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

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

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

.field label,
.field > span {
  color: var(--navy-800);
  font-size: 0.72rem;
  font-weight: 750;
}

.required {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfdade;
  border-radius: 9px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(196, 154, 80, 0.14);
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.upload-zone {
  position: relative;
  display: grid;
  min-height: 185px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfc;
  border: 1.5px dashed #b9c8cf;
  border-radius: 13px;
}

.upload-zone:hover {
  background: var(--navy-50);
  border-color: var(--gold-500);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.upload-zone svg {
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  color: var(--gold-600);
}

.upload-zone strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-800);
  font-size: 0.8rem;
}

.upload-zone span {
  font-size: 0.68rem;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: var(--navy-700);
  font-size: 0.7rem;
  background: var(--navy-50);
  border-radius: 8px;
}

.file-chip svg {
  width: 16px;
  height: 16px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  color: var(--info);
  font-size: 0.7rem;
  line-height: 1.55;
  background: var(--info-bg);
  border-radius: 10px;
}

.notice.warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.notice svg {
  flex: 0 0 auto;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 0.73rem;
  line-height: 1.55;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--navy-800);
}

.review-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.review-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 14px;
  background: white;
}

.review-row span {
  color: var(--muted);
  font-size: 0.7rem;
}

.review-row strong {
  color: var(--navy-900);
  font-size: 0.73rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-side-card {
  padding: 20px;
}

.form-side-card h3 {
  margin: 0 0 13px;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.process-list {
  display: grid;
  gap: 0;
}

.process-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 17px;
}

.process-item::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 13px;
  width: 1px;
  height: calc(100% - 10px);
  background: var(--line);
}

[dir="rtl"] .process-item::before {
  right: 13px;
  left: auto;
}

.process-item:last-child::before {
  display: none;
}

.process-dot {
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--gold-600);
  font-size: 0.64rem;
  font-weight: 800;
  background: var(--gold-100);
  border-radius: 50%;
}

.process-copy {
  display: grid;
  gap: 3px;
}

.process-copy strong {
  color: var(--navy-800);
  font-size: 0.73rem;
}

.process-copy span {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-back {
  margin-bottom: 10px;
}

.detail-header h2 {
  margin: 0 0 8px;
  color: var(--navy-900);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  letter-spacing: -0.035em;
}

.detail-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 340px;
  gap: 22px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  overflow-x: auto;
  padding: 22px;
}

.timeline-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 90px;
  color: #95a4ac;
  font-size: 0.64rem;
  text-align: center;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.timeline-item:first-child::before {
  display: none;
}

[dir="rtl"] .timeline-item::before {
  right: auto;
  left: 50%;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: white;
  background: #b6c2c8;
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #b6c2c8;
}

.timeline-item.done,
.timeline-item.current {
  color: var(--navy-800);
  font-weight: 700;
}

.timeline-item.done .timeline-dot {
  background: var(--navy-800);
  box-shadow: 0 0 0 1px var(--navy-800);
}

.timeline-item.current .timeline-dot {
  background: var(--gold-500);
  box-shadow: 0 0 0 1px var(--gold-500), 0 0 0 5px var(--gold-100);
}

.timeline-item.done::before,
.timeline-item.current::before {
  background: var(--navy-800);
}

.detail-section {
  padding: 22px;
}

.detail-section h3 {
  margin: 0 0 15px;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.description-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

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

.meta-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fafcfc;
  border: 1px solid var(--line);
  border-radius: 9px;
}

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

.meta-item strong {
  color: var(--navy-800);
  font-size: 0.74rem;
}

.document-row,
.activity-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.document-row:first-of-type,
.activity-row:first-of-type {
  border-top: 0;
}

.document-icon,
.activity-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-600);
  background: var(--gold-100);
  border-radius: 8px;
}

.document-copy,
.activity-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.document-copy strong,
.activity-copy strong {
  overflow: hidden;
  color: var(--navy-800);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-copy span,
.activity-copy span {
  color: var(--muted);
  font-size: 0.65rem;
}

.document-row button {
  margin-left: auto;
}

[dir="rtl"] .document-row button {
  margin-right: auto;
  margin-left: 0;
}

.admin-action-card {
  padding: 20px;
  border-top: 3px solid var(--gold-500);
}

.admin-action-card h3 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.admin-action-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.admin-action-card .button {
  width: 100%;
  margin-top: 8px;
}

.messages-layout {
  display: grid;
  min-height: 610px;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}

.thread-list {
  border-right: 1px solid var(--line);
}

[dir="rtl"] .thread-list {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.thread-list-header,
.chat-header {
  min-height: 70px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.thread-list-header h2,
.chat-header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.thread-button {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 15px 18px;
  color: inherit;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
}

[dir="rtl"] .thread-button {
  text-align: right;
}

.thread-button.active {
  background: var(--navy-50);
  box-shadow: inset 3px 0 var(--gold-500);
}

[dir="rtl"] .thread-button.active {
  box-shadow: inset -3px 0 var(--gold-500);
}

.thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.thread-top strong {
  color: var(--navy-900);
  font-size: 0.74rem;
}

.thread-top span,
.thread-button > span {
  color: var(--muted);
  font-size: 0.64rem;
}

.chat-pane {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.chat-messages {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: #fafcfc;
}

.message-bubble {
  max-width: 72%;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.73rem;
  line-height: 1.55;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px 13px 13px 3px;
}

[dir="rtl"] .message-bubble {
  border-radius: 13px 13px 3px 13px;
}

.message-bubble.own {
  align-self: flex-end;
  color: white;
  background: var(--navy-800);
  border-color: var(--navy-800);
  border-radius: 13px 13px 3px 13px;
}

[dir="rtl"] .message-bubble.own {
  border-radius: 13px 13px 13px 3px;
}

.message-bubble small {
  display: block;
  margin-top: 5px;
  color: #82949f;
  font-size: 0.59rem;
}

.message-bubble.own small {
  color: #b8c7ce;
}

.chat-compose {
  display: flex;
  gap: 9px;
  padding: 14px;
  background: white;
  border-top: 1px solid var(--line);
}

.chat-compose input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-card {
  padding: 22px;
}

.settings-card h2 {
  margin: 0 0 5px;
  color: var(--navy-900);
  font-size: 1rem;
}

.settings-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.setting-copy {
  display: grid;
  gap: 3px;
}

.setting-copy strong {
  color: var(--navy-800);
  font-size: 0.73rem;
}

.setting-copy span {
  color: var(--muted);
  font-size: 0.65rem;
}

.toggle {
  position: relative;
  width: 40px;
  height: 23px;
  flex: 0 0 auto;
  background: #bcc8ce;
  border: 0;
  border-radius: 99px;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  background: white;
  border-radius: 50%;
  transition: 150ms ease;
}

.toggle.on {
  background: var(--navy-800);
}

.toggle.on::after {
  left: 20px;
}

[dir="rtl"] .toggle::after {
  right: 3px;
  left: auto;
}

[dir="rtl"] .toggle.on::after {
  right: 20px;
  left: auto;
}

.install-banner {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: min(460px, calc(100vw - 36px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px 13px 17px;
  color: white;
  background: var(--navy-900);
  border: 1px solid rgba(212, 179, 112, 0.28);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .install-banner {
  right: auto;
  left: 18px;
}

.install-banner > div:first-child {
  display: grid;
  gap: 3px;
}

.install-banner strong {
  font-size: 0.79rem;
}

.install-banner span {
  color: #b9c7ce;
  font-size: 0.66rem;
}

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

.toast-region {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
}

[dir="rtl"] .toast-region {
  right: auto;
  left: 18px;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  color: white;
  font-size: 0.74rem;
  line-height: 1.45;
  background: var(--navy-800);
  border-left: 3px solid var(--gold-400);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease-out;
}

[dir="rtl"] .toast {
  border-right: 3px solid var(--gold-400);
  border-left: 0;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-only,
.mobile-nav {
  display: none;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.empty-state div {
  display: grid;
  max-width: 420px;
  justify-items: center;
  gap: 10px;
}

.empty-state svg {
  width: 40px;
  height: 40px;
  color: var(--gold-600);
}

.empty-state h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.1rem;
}

.empty-state p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .page-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-grid > .stack:last-child,
  .detail-grid > .stack:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .form-layout > .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  :root {
    --sidebar-width: 276px;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  [dir="rtl"] .sidebar {
    transform: translateX(105%);
  }

  .sidebar.open,
  [dir="rtl"] .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 29;
    inset: 0;
    background: rgba(4, 17, 29, 0.55);
    backdrop-filter: blur(2px);
  }

  .workspace,
  [dir="rtl"] .workspace {
    margin: 0;
  }

  .mobile-only {
    display: inline-grid;
  }

  .topbar {
    gap: 12px;
    min-height: 72px;
  }

  .topbar-title h1 {
    font-size: 1.1rem;
  }

  .topbar-title span {
    display: none;
  }

  .notification-button,
  .profile-copy,
  .profile-button > svg {
    display: none;
  }

  .language-switch {
    padding: 8px;
  }

  .language-switch svg {
    display: none;
  }

  .profile-button {
    min-width: auto;
    padding: 2px;
    border: 0;
  }

  .profile-menu {
    top: 64px;
  }

  #mainContent {
    padding-bottom: 90px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 24;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    min-height: 66px;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }

  .mobile-nav .nav-button {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 3px;
    padding: 6px 2px;
    color: var(--muted);
    font-size: 0.59rem;
    text-align: center;
  }

  .mobile-nav .nav-button.active {
    color: var(--navy-900);
    background: transparent;
    box-shadow: none;
  }

  .mobile-nav .nav-button.active svg {
    color: var(--gold-600);
  }

  .mobile-nav .nav-badge {
    position: absolute;
    top: 3px;
    right: 18%;
    min-width: 16px;
    padding: 1px 4px;
    font-size: 0.55rem;
  }
}

@media (max-width: 680px) {
  #mainContent {
    padding: 19px 14px 88px;
  }

  .topbar {
    padding: 10px 14px;
  }

  .profile-menu {
    right: 14px;
  }

  [dir="rtl"] .profile-menu {
    right: auto;
    left: 14px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 24px;
  }

  .hero-copy h2 {
    font-size: 1.75rem;
  }

  .hero-visual {
    display: none;
  }

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

  .stat-card {
    padding: 15px;
  }

  .service-grid,
  .form-service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .case-table-header {
    display: none;
  }

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

  .case-row .case-meta {
    display: none;
  }

  .case-row .status-badge {
    grid-column: 1;
    margin-left: 50px;
  }

  [dir="rtl"] .case-row .status-badge {
    margin-right: 50px;
    margin-left: 0;
  }

  .case-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .page-intro,
  .detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-intro .button,
  .detail-header .button-row .button {
    flex: 1;
  }

  .field-grid,
  .profile-grid,
  .page-grid > .stack:last-child,
  .detail-grid > .stack:last-child,
  .form-layout > .stack {
    grid-template-columns: 1fr;
  }

  .step span:last-child {
    display: none;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .thread-list {
    display: none;
  }

  .message-bubble {
    max-width: 88%;
  }

  .install-banner {
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
  }

  [dir="rtl"] .install-banner {
    right: auto;
    left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
