@font-face {
  font-family: "IRANYekanXVF";
  src: url("/fonts/IRANYekanXVF.woff") format("woff-variations"), url("/fonts/IRANYekanXVF.woff") format("woff");
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/fonts/IRANYekanX-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/fonts/IRANYekanX-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Shabnam";
  src:
    url("/fonts/Shabnam.woff2") format("woff2"),
    local("Shabnam");
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src:
    url("/fonts/Vazirmatn.woff2") format("woff2"),
    local("Vazirmatn");
  font-display: swap;
}

@font-face {
  font-family: "B Nazanin";
  src:
    url("/fonts/B-NAZANIN.TTF") format("truetype"),
    local("B Nazanin"),
    local("BNazanin"),
    local("Nazanin");
  font-display: swap;
}

:root {
  color-scheme: light;
  --persian-font: "IRANYekanXVF", "IRANYekanX", "Shabnam", "Vazirmatn", Tahoma, Arial, sans-serif;
  --ink: #16211f;
  --muted: #64716e;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --forest: #103b36;
  --forest-2: #16534c;
  --teal: #0d766f;
  --gold: #c89b3c;
  --coral: #d85f4a;
  --red: #b83232;
  --line: rgba(22, 33, 31, 0.14);
  --soft: rgba(16, 59, 54, 0.08);
  --shadow: 0 24px 64px rgba(16, 59, 54, 0.16);
  font-family: var(--persian-font);
  font-variation-settings: "dots" 4;
  font-feature-settings: "ss02";
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.85;
}

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

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

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

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 118, 111, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: var(--forest);
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--forest);
  background: rgba(16, 59, 54, 0.06);
}

td small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 420px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: #fff;
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(16, 59, 54, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand,
.nav-links,
.header-action,
.hero-actions,
.site-footer,
.footer-links,
.form-actions,
.panel-title-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-family: Georgia, serif;
}

.nav-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.nav-links {
  justify-content: center;
  gap: clamp(12px, 2.5vw, 28px);
  font-size: 0.95rem;
}

.nav-links a {
  opacity: 0.86;
}

.nav-links a:hover,
.nav-links a.is-active {
  opacity: 1;
  color: #f8d88e;
}

.header-action {
  min-height: 42px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--gold);
  color: #251b09;
  box-shadow: 0 12px 28px rgba(200, 155, 60, 0.26);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.button.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
}

.button.danger {
  background: var(--red);
  color: #fff;
}

.button.tiny {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.button.full {
  width: 100%;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal);
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: end;
  padding: 160px clamp(22px, 6vw, 84px) 82px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16, 59, 54, 0.96), rgba(16, 59, 54, 0.58) 48%, rgba(16, 59, 54, 0.16)),
    var(--hero-image) center/cover;
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(0deg, rgba(247, 244, 238, 0.96), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.card-tag {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.section h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.7vw, 6.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.26rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.page-hero {
  min-height: 54vh;
  display: grid;
  align-content: end;
  padding: 140px clamp(22px, 6vw, 84px) 64px;
  background:
    linear-gradient(90deg, rgba(16, 59, 54, 0.96), rgba(16, 59, 54, 0.76)),
    url("/assets/dadyar-logo.jpeg") center/contain no-repeat #071b3d;
  color: #fff;
}

.page-hero h1,
.page-hero .hero-copy {
  max-width: 820px;
}

.stats-strip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(1120px, calc(100% - 32px));
  margin: -44px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.stats-strip div {
  background: #fff;
  padding: 24px;
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  color: var(--forest);
  font-size: 2rem;
  line-height: 1.2;
}

.stats-strip span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.section.narrow,
.narrow {
  width: min(820px, calc(100% - 32px));
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 6vw, 80px);
  align-items: start;
}

.section-heading {
  margin-bottom: 28px;
}

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

h2 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.28;
}

h3 {
  margin: 0;
  color: var(--forest);
  font-size: 1.18rem;
}

.lead,
.prose p,
.info-card p,
.timeline p,
.faq p,
.contact-cta p,
.side-panel p,
.article-row p,
.muted {
  color: var(--muted);
}

.lead {
  margin: 0;
  font-size: 1.08rem;
}

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

.info-card {
  min-height: 270px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.info-card h3 {
  margin-bottom: 12px;
}

.process-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.timeline li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.timeline span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.faq {
  padding-top: 32px;
}

details {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  padding: 22px 0;
  color: var(--forest);
  font-weight: 900;
}

details p {
  margin: 0;
  padding: 0 0 22px;
}

.contact-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 76px;
  padding: 42px;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow);
}

.contact-cta h2,
.contact-cta p {
  color: #fff;
}

.article-layout,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.prose {
  font-size: 1.05rem;
}

.prose h2 {
  margin-top: 24px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.side-panel,
.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(16, 59, 54, 0.08);
}

.side-panel {
  position: sticky;
  top: 92px;
}

.side-panel .button {
  width: 100%;
  margin-top: 14px;
}

.article-list {
  display: grid;
  gap: 16px;
}

.article-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.article-row time {
  color: var(--coral);
  font-weight: 900;
}

.article-row h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.form-card {
  display: grid;
  gap: 16px;
}

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.notice.success {
  border: 1px solid rgba(13, 118, 111, 0.22);
  background: rgba(13, 118, 111, 0.1);
  color: var(--forest);
}

.notice.error {
  border: 1px solid rgba(184, 50, 50, 0.25);
  background: rgba(184, 50, 50, 0.1);
  color: var(--red);
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer strong {
  color: var(--forest);
}

.site-footer p {
  margin: 2px 0 0;
}

.footer-links {
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--forest);
  font-weight: 900;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 59, 54, 0.94), rgba(13, 118, 111, 0.76)),
    url("/assets/dadyar-logo.jpeg") center/contain no-repeat #071b3d;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card .brand {
  color: var(--forest);
}

.login-card .brand-mark,
.admin-brand .brand-mark {
  border-color: rgba(16, 59, 54, 0.26);
  background: rgba(16, 59, 54, 0.08);
}

.login-card h1 {
  margin: 0;
  color: var(--forest);
  font-size: 1.8rem;
}

.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #eef3f1;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.admin-brand {
  color: var(--forest);
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav a {
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--forest);
  font-weight: 900;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  background: var(--soft);
}

.admin-sidebar form {
  margin-top: auto;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.admin-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(16, 59, 54, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--forest);
  box-shadow: 0 10px 20px rgba(16, 59, 54, 0.08);
}

.admin-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: currentColor;
}

.admin-menu-backdrop {
  display: none;
}

.admin-topbar h1 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.admin-topbar p {
  margin: 0;
  color: var(--muted);
}

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

.admin-stats div,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(16, 59, 54, 0.08);
}

.admin-stats div {
  padding: 20px;
}

.admin-stats strong {
  display: block;
  color: var(--forest);
  font-size: 2rem;
  line-height: 1.2;
}

.admin-stats span {
  color: var(--muted);
  font-weight: 800;
}

.admin-panel {
  padding: 22px;
}

.admin-panel h2 {
  margin-bottom: 18px;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.admin-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

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

.admin-form.compact {
  gap: 12px;
}

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

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

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.check-row input {
  width: auto;
}

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

.panel-title-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-title-row h2 {
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.inline-form {
  display: inline-flex;
  margin: 2px;
}

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

.admin-case-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(16, 59, 54, 0.04);
}

.admin-case-grid p {
  margin: 6px 0;
}

.admin-chat-thread {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.admin-chat-thread article {
  display: grid;
  gap: 8px;
  max-width: min(760px, 92%);
  padding: 12px 14px;
  border: 1px solid rgba(16, 59, 54, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(16, 59, 54, 0.06);
}

.admin-chat-thread article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-chat-thread article p {
  margin: 0;
  white-space: pre-wrap;
}

.admin-chat-thread small {
  color: var(--muted);
  font-weight: 800;
}

.admin-chat-thread .is-client {
  justify-self: end;
  background: #eef5ff;
}

.admin-chat-thread .is-assistant {
  justify-self: start;
  background: #fffaf0;
}

.admin-chat-thread .is-admin {
  justify-self: start;
  background: #f3fff7;
}

.admin-roadmap-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.admin-roadmap-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.admin-roadmap-list li::before {
  content: "در انتظار";
  justify-self: start;
  border-radius: 999px;
  padding: 2px 9px;
  background: rgba(100, 113, 110, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-roadmap-list li.is-done::before {
  content: "ثبت شده";
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.admin-roadmap-list li.is-active::before {
  content: "مرحله فعلی";
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.admin-roadmap-list strong,
.admin-ticket-list strong {
  color: var(--forest);
}

.admin-roadmap-list span {
  color: var(--muted);
  font-weight: 800;
}

.admin-ticket-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-ticket-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(16, 59, 54, 0.04);
}

.admin-ticket-list article.is-admin {
  background: rgba(13, 118, 111, 0.08);
}

.admin-ticket-list p {
  margin: 6px 0;
}

.admin-ticket-list small {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(16, 59, 54, 0.98);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
  }

  .card-grid,
  .stats-strip,
  .split,
  .article-layout,
  .contact-grid,
  .contact-cta,
  .admin-stats,
  .admin-case-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .admin-body {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 80;
    width: min(320px, 86vw);
    height: 100svh;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 180ms ease;
    box-shadow: -18px 0 40px rgba(16, 59, 54, 0.18);
  }

  .admin-body.is-menu-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    background: rgba(3, 17, 30, 0.36);
    backdrop-filter: blur(2px);
  }

  .admin-body.is-menu-open .admin-menu-backdrop {
    display: block;
  }

  .admin-menu-toggle {
    display: grid;
    flex: 0 0 auto;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -18px -18px 18px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(238, 243, 241, 0.94);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
    padding-inline: 14px;
  }

  .brand span:last-child {
    font-size: 0.9rem;
  }

  .header-action {
    display: none;
  }

  .hero {
    min-height: 82vh;
    padding: 126px 18px 62px;
    background:
      linear-gradient(0deg, rgba(16, 59, 54, 0.96), rgba(16, 59, 54, 0.62)),
      var(--hero-image) center/cover;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.65rem;
  }

  .page-hero {
    min-height: 50vh;
    padding: 120px 18px 48px;
  }

  .button,
  .article-row .button {
    width: 100%;
  }

  .stats-strip,
  .section,
  .contact-cta,
  .narrow {
    width: calc(100% - 24px);
  }

  .contact-cta {
    padding: 28px 20px;
  }

  .article-row,
  .timeline li,
  .form-grid.two,
  .admin-topbar {
    grid-template-columns: 1fr;
  }

  .article-row {
    display: grid;
  }

  .admin-topbar {
    display: grid;
  }

  .admin-panel,
  .side-panel,
  .form-card,
  .login-card {
    padding: 18px;
  }
}

body.legal-app-body {
  --legal-navy: #071b3d;
  --legal-navy-2: #0d2b5c;
  --legal-text: #12223a;
  --legal-muted: #64748b;
  --legal-line: #dce4ef;
  --legal-bg: #edf4f7;
  --legal-soft: #f6f9fc;
  --legal-accent: #087f8c;
  --legal-gold: #bd8b28;
  --legal-glass: rgba(255, 255, 255, 0.74);
  min-height: 100svh;
  background:
    radial-gradient(circle at 15% 6%, rgba(8, 127, 140, 0.16), transparent 30%),
    radial-gradient(circle at 92% 28%, rgba(189, 139, 40, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(7, 27, 61, 0.08), rgba(255, 255, 255, 0) 42%),
    var(--legal-bg);
  color: var(--legal-text);
  font-size: 18px;
  line-height: 1.6;
  overflow: hidden;
}

.legal-app-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(480px, 100%);
  height: 100svh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100svh;
  margin-inline: auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 253, 0.95)),
    #fff;
  box-shadow: 0 30px 90px rgba(7, 27, 61, 0.18);
}

.legal-app-shell::before {
  content: "";
  position: absolute;
  inset: 72px 0 74px;
  z-index: 0;
  background: url("/assets/dadyar-logo.jpeg") center 58% / min(78%, 360px) auto no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 9px;
  border-bottom: 0;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.16), transparent 34%),
    linear-gradient(180deg, var(--legal-navy), var(--legal-navy-2));
  color: #fff;
  box-shadow: 0 18px 36px rgba(7, 27, 61, 0.24);
}

.legal-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.legal-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--legal-navy);
  color: #fff;
  font-weight: 900;
}

.legal-brand-logo-wrap {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: #fff;
  color: var(--legal-navy);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.legal-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.legal-brand span:last-child {
  display: grid;
  min-width: 0;
}

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

.legal-brand strong {
  font-size: 1.24rem;
}

.legal-brand small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
}

.legal-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.legal-icon-button svg,
.legal-tab svg,
.legal-security-note svg,
.legal-case-timeline svg {
  width: 22px;
  height: 22px;
}

.legal-service-icon svg,
.legal-profile-card svg,
.legal-step-icon svg {
  width: 21px;
  height: 21px;
}

.legal-app-content {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 18px;
  background: transparent;
}

.legal-app-content.is-chat-mode {
  overflow-y: auto;
  padding: 10px 12px 10px;
}

.legal-tab-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

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

#tab-consult:not([hidden]) {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.legal-panel-heading {
  display: grid;
  gap: 6px;
}

.legal-panel-heading p,
.legal-consult-hero p {
  margin: 0;
  color: var(--legal-gold);
  font-size: 1rem;
  font-weight: 900;
}

.legal-panel-heading h1,
.legal-consult-hero h1 {
  margin: 0;
  color: var(--legal-navy);
  font-size: 2.05rem;
  line-height: 1.25;
}

.legal-form {
  display: grid;
  gap: 13px;
}

.legal-form label {
  gap: 7px;
  color: var(--legal-navy);
  font-size: 1.05rem;
}

.legal-input-hint {
  display: block;
  color: var(--legal-muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.5;
}

.legal-form input,
.legal-form textarea,
.legal-form select {
  border-color: var(--legal-line);
  background: var(--legal-soft);
  color: var(--legal-text);
  font-size: 1.08rem;
}

.legal-form input:focus,
.legal-form textarea:focus,
.legal-form select:focus {
  border-color: var(--legal-accent);
  box-shadow: 0 0 0 4px rgba(11, 114, 133, 0.12);
}

.legal-otp-area {
  display: grid;
  gap: 8px;
}

.legal-otp-area input {
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 1.35rem;
  font-weight: 900;
}

.legal-otp-tools {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.legal-otp-tools button {
  border: 0;
  background: transparent;
  color: var(--legal-navy);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
}

.legal-otp-tools small {
  color: var(--legal-muted);
  font-size: 0.92rem;
  font-weight: 900;
}

.legal-primary-action,
.legal-secondary-action,
.legal-auth-actions button,
.legal-service-list button,
.legal-profile-card,
.legal-choice-card,
.legal-voice-button {
  min-width: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.legal-primary-action,
.legal-secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 12px 16px;
  font-size: 1.06rem;
}

.legal-primary-action {
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(7, 27, 61, 0.98), rgba(13, 43, 92, 0.94));
  color: #fff;
  box-shadow: 0 15px 28px rgba(7, 27, 61, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.legal-secondary-action {
  border: 1px solid rgba(7, 27, 61, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(7, 27, 61, 0.07));
  color: var(--legal-navy);
  box-shadow: 0 10px 22px rgba(7, 27, 61, 0.08);
}

.legal-primary-action:hover,
.legal-secondary-action:hover,
.legal-auth-actions button:hover,
.legal-service-card:hover,
.legal-subservice-card:hover,
.legal-profile-card:hover,
.legal-choice-card:hover,
.legal-voice-button:hover,
.legal-custom-service-action:hover {
  transform: translateY(-1px);
}

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

.legal-auth-actions button {
  min-height: 44px;
  border: 1px solid rgba(7, 27, 61, 0.14);
  background: rgba(7, 27, 61, 0.08);
  color: var(--legal-navy);
  font-size: 1.05rem;
  box-shadow: 0 9px 18px rgba(7, 27, 61, 0.08);
}

.legal-security-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(11, 114, 133, 0.18);
  border-radius: 8px;
  background: rgba(11, 114, 133, 0.08);
  color: var(--legal-accent);
}

.legal-security-note p {
  margin: 0;
  color: var(--legal-text);
  font-size: 1.04rem;
  font-weight: 800;
}

.legal-office-info {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(7, 27, 61, 0.13);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--legal-glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px rgba(7, 27, 61, 0.1);
}

.legal-office-info strong {
  color: var(--legal-navy);
  font-size: 1.12rem;
  line-height: 1.45;
}

.legal-office-info p {
  margin: 0;
  color: var(--legal-muted);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.65;
}

.legal-office-info a {
  direction: ltr;
  justify-self: start;
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(7, 27, 61, 0.08);
  color: var(--legal-navy);
  font-weight: 900;
  text-decoration: none;
}

.legal-office-info-compact {
  background: rgba(7, 27, 61, 0.045);
}

.legal-login-view,
.legal-profile-dashboard {
  display: grid;
  gap: 16px;
}

.legal-profile-head {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(7, 27, 61, 0.12);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(7, 27, 61, 0.08));
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 38px rgba(7, 27, 61, 0.1);
}

.legal-profile-head p,
.legal-profile-head h1,
.legal-profile-head span {
  margin: 0;
}

.legal-profile-head p {
  color: var(--legal-gold);
  font-size: 1rem;
  font-weight: 900;
}

.legal-profile-head h1 {
  color: var(--legal-navy);
  font-size: 1.9rem;
  line-height: 1.3;
}

.legal-profile-head span {
  direction: ltr;
  justify-self: end;
  color: var(--legal-muted);
  font-size: 1rem;
  font-weight: 800;
}

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

.legal-profile-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  align-content: center;
  border: 1px solid rgba(7, 27, 61, 0.14);
  padding: 14px;
  background: linear-gradient(145deg, rgba(7, 27, 61, 0.14), rgba(7, 27, 61, 0.06));
  color: var(--legal-navy);
  text-align: right;
  box-shadow: 0 14px 28px rgba(7, 27, 61, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.legal-profile-card span {
  display: block;
  color: var(--legal-navy);
  font-size: 1.18rem;
  line-height: 1.45;
}

.legal-profile-card small {
  color: var(--legal-muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.6;
}

.legal-pro-card b {
  display: inline-grid;
  min-width: 34px;
  height: 20px;
  margin-inline-start: 4px;
  place-items: center;
  border-radius: 999px;
  background: var(--legal-gold);
  color: #fff;
  font-size: 0.66rem;
  letter-spacing: 0;
}

.legal-logout-card {
  border-color: rgba(184, 50, 50, 0.16);
  background: linear-gradient(145deg, rgba(184, 50, 50, 0.1), rgba(7, 27, 61, 0.035));
}

.legal-logout-card span {
  color: var(--red);
}

.legal-profile-news {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(7, 27, 61, 0.13);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 28px rgba(7, 27, 61, 0.1);
}

.legal-profile-news-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  border-bottom: 1px solid var(--legal-line);
  padding-bottom: 9px;
}

.legal-profile-news-head span {
  color: var(--legal-navy);
  font-size: 1.42rem;
  font-weight: 900;
}

.legal-profile-news-head small {
  color: var(--legal-gold);
  font-size: 0.96rem;
  font-weight: 900;
}

.legal-news-list {
  display: grid;
  gap: 9px;
}

.legal-profile-news article,
.legal-profile-news a {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(7, 27, 61, 0.1);
  border-radius: 8px;
  padding: 11px 12px;
  background: linear-gradient(145deg, rgba(7, 27, 61, 0.09), rgba(7, 27, 61, 0.035));
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.legal-profile-news a:hover {
  border-color: rgba(11, 114, 133, 0.28);
  box-shadow: 0 10px 20px rgba(7, 27, 61, 0.1);
  transform: translateY(-1px);
}

.legal-profile-news strong {
  color: var(--legal-navy);
  font-size: 1.08rem;
  line-height: 1.45;
}

.legal-profile-news p {
  margin: 0;
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.65;
}

.legal-documents-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(7, 27, 61, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.legal-documents-toolbar span {
  color: var(--legal-muted);
  font-weight: 900;
}

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

.legal-document-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(7, 27, 61, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(7, 27, 61, 0.08);
}

.legal-document-card strong,
.legal-document-card span {
  display: block;
}

.legal-document-card strong {
  color: var(--legal-navy);
  font-size: 1.16rem;
  line-height: 1.45;
}

.legal-document-card span {
  margin-top: 3px;
  color: var(--legal-muted);
  font-weight: 800;
}

.legal-document-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.legal-document-card dl div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(7, 27, 61, 0.055);
}

.legal-document-card dt,
.legal-document-card dd {
  margin: 0;
}

.legal-document-card dt {
  color: var(--legal-muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.legal-document-card dd {
  color: var(--legal-text);
  font-weight: 900;
  line-height: 1.5;
}

.legal-document-card dd.is-seen {
  color: #15803d;
}

.legal-document-card dd.is-waiting {
  color: #b45309;
}

.legal-consult-hero {
  position: relative;
  min-height: 212px;
  display: grid;
  align-content: end;
  overflow: hidden;
  border-radius: 8px;
  padding: 18px;
  isolation: isolate;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.18), transparent 36%),
    var(--legal-navy);
  box-shadow: 0 22px 46px rgba(7, 27, 61, 0.18);
}

.legal-consult-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(7, 27, 61, 0.92), rgba(7, 27, 61, 0.18));
}

.legal-consult-hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  padding: 24px;
  object-fit: contain;
  background: #fff;
  opacity: 0.34;
}

.legal-consult-hero h1,
.legal-consult-hero p {
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.2);
}

.legal-consult-success {
  margin: 0;
}

.legal-chat-panel {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.legal-ai-prequal {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(11, 114, 133, 0.22);
  border-radius: 8px;
  background: var(--legal-glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 46px rgba(7, 27, 61, 0.12);
}

.legal-ai-prequal p,
.legal-ai-prequal h2 {
  margin: 0;
}

.legal-ai-prequal p {
  color: var(--legal-gold);
  font-size: 1rem;
  font-weight: 1000;
}

.legal-ai-prequal > p[data-consult-prequal-step] {
  display: none;
}

.legal-ai-prequal h2 {
  color: var(--legal-navy);
  font-size: 1.34rem;
  line-height: 1.55;
}

.legal-ai-prequal textarea {
  min-height: 128px;
  resize: vertical;
  border-color: var(--legal-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--legal-text);
  font-size: 1.06rem;
}

.legal-ai-prequal-thread {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.legal-ai-prequal-message {
  width: fit-content;
  max-width: 92%;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--legal-text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.75;
}

.legal-ai-prequal-message.is-question {
  justify-self: stretch;
  width: auto;
  max-width: 100%;
  border: 1px dashed rgba(7, 27, 61, 0.16);
  background: rgba(7, 27, 61, 0.05);
  color: var(--legal-muted);
}

.legal-ai-prequal-message.is-user {
  justify-self: end;
  background: rgba(7, 27, 61, 0.92);
  color: #fff;
}

.legal-ai-prequal-message.is-ai {
  justify-self: start;
  border: 1px solid rgba(11, 114, 133, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(11, 114, 133, 0.09));
}

.legal-chat-phone {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(7, 27, 61, 0.14);
  border-radius: 8px;
  background: rgba(7, 27, 61, 0.06);
  box-shadow: 0 12px 24px rgba(7, 27, 61, 0.08);
}

.legal-chat-phone label {
  color: var(--legal-navy);
  font-size: 1.05rem;
}

.legal-chat-phone input,
.legal-chat-compose textarea {
  border-color: var(--legal-line);
  background: #fff;
  color: var(--legal-text);
  font-size: 1.08rem;
}

.legal-chat-compose textarea {
  min-height: 46px;
  max-height: 108px;
  resize: none;
  border-color: rgba(142, 142, 147, 0.26);
  border-radius: 18px;
  padding: 11px 14px;
  background: #fff;
  font-weight: 750;
  line-height: 1.55;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.legal-chat-compose textarea:focus {
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.legal-chat-phone.is-verified {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.08);
}

.legal-chat-phone.is-verified .legal-primary-action {
  background: #16a34a;
}

.legal-chat-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  height: min(100%, 72svh);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #f7f7f9;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.legal-chat-window[hidden] {
  display: none;
}

.legal-chat-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-radius: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 10px 12px;
  background: rgba(248, 248, 250, 0.92);
  color: #111827;
  font-weight: 900;
  backdrop-filter: blur(16px);
}

.legal-chat-status span {
  display: grid;
  gap: 2px;
}

.legal-chat-status small {
  color: #8e8e93;
  font-size: 0.78rem;
}

.legal-chat-status strong {
  direction: ltr;
  color: #8e8e93;
  font-size: 0.98rem;
}

.legal-chat-messages {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 8px 10px;
  background:
    linear-gradient(180deg, #f7f7f9, #fff 46%, #f7f7f9);
}

.legal-chat-message {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 82%;
  border-radius: 18px;
  padding: 8px 12px;
  color: var(--legal-text);
  font-size: 1.03rem;
  font-weight: 750;
  line-height: 1.52;
  box-shadow: none;
}

.legal-chat-message.is-bot {
  justify-self: start;
  border: 0;
  border-bottom-right-radius: 5px;
  background: #e9e9eb;
  color: #111827;
}

.legal-chat-message.is-user {
  justify-self: end;
  border: 0;
  border-bottom-left-radius: 5px;
  background: #007aff;
  color: #fff;
}

.legal-chat-message.is-admin {
  justify-self: start;
  border: 0;
  border-bottom-right-radius: 5px;
  background: #fff3cd;
  color: #3f2e08;
}

.legal-chat-message.is-file {
  border: 1px dashed rgba(142, 142, 147, 0.56);
}

.legal-chat-message.is-pending {
  background: #e9e9eb;
  color: #8e8e93;
  font-weight: 900;
}

.legal-chat-message.is-pending span::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  margin-inline-start: 4px;
  animation: legalTypingDots 1.1s steps(3) infinite;
}

.legal-office-info,
.legal-profile-head,
.legal-profile-card,
.legal-profile-news,
.legal-security-note,
.legal-ai-search,
.legal-service-card,
.legal-subservice-card,
.legal-custom-service-action,
.legal-service-choice-card,
.legal-ai-prequal,
.legal-chat-phone,
.legal-chat-window,
.legal-case-detail,
.legal-case-login-note,
.legal-empty-state,
.legal-document-card,
.legal-ticket-message,
.legal-intake-form,
.legal-intake-success,
.legal-choice-card {
  border-color: rgba(255, 255, 255, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow:
    0 18px 42px rgba(7, 27, 61, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.legal-service-card,
.legal-custom-service-action {
  background:
    linear-gradient(145deg, rgba(7, 27, 61, 0.72), rgba(7, 27, 61, 0.42)),
    rgba(255, 255, 255, 0.2);
  color: #fff;
}

.legal-service-card .legal-service-title,
.legal-custom-service-action strong,
.legal-custom-service-action span {
  color: #fff;
}

.legal-service-icon {
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 22px rgba(7, 27, 61, 0.18);
}

@keyframes legalTypingDots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

.legal-chat-message span.is-typing::after,
.legal-ai-prequal-message.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 4px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: legalTypingCursor 0.85s steps(1) infinite;
}

@keyframes legalTypingCursor {
  50% {
    opacity: 0;
  }
}

.legal-chat-file-meta {
  color: inherit;
  opacity: 0.58;
  font-size: 0.78rem;
  font-weight: 700;
}

.legal-chat-compose {
  display: grid;
  gap: 8px;
  padding: 9px 8px 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 248, 250, 0.94);
  backdrop-filter: blur(16px);
}

.legal-chat-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.legal-chat-actions .legal-secondary-action,
.legal-chat-actions .legal-primary-action {
  min-height: 44px;
  border-radius: 18px;
  font-size: 1.02rem;
}

.legal-chat-actions .legal-secondary-action {
  border: 1px solid rgba(142, 142, 147, 0.24);
  background: #fff;
  color: #007aff;
  box-shadow: none;
}

.legal-chat-actions .legal-primary-action {
  background: #007aff;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.22);
}

.legal-voice-input-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(142, 142, 147, 0.24);
  border-radius: 18px;
  background: #fff;
  color: #007aff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
}

.legal-voice-input-button svg {
  width: 22px;
  height: 22px;
}

.legal-voice-input-button.is-recording {
  border-color: rgba(255, 59, 48, 0.34);
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
}

.legal-chat-upload-button {
  min-height: 54px;
}

.legal-chat-compose p {
  margin: 0;
  color: var(--red);
  font-weight: 900;
}

#tab-consult:has(.legal-chat-window:not([hidden])) {
  gap: 8px;
  grid-template-rows: minmax(0, 1fr);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-consult-hero,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-consult-success {
  display: none;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-panel {
  height: 100%;
  min-height: 0;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-window {
  height: 100%;
  min-height: 0;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-status {
  min-height: 48px;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-messages {
  min-height: 180px;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-compose textarea {
  min-height: 46px;
  max-height: 108px;
  resize: none;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-voice-input-button,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-actions button {
  min-height: 42px;
}

.legal-case-summary {
  display: block;
  padding: 0;
  border: 1px solid var(--legal-line);
  border-radius: 8px;
  background: var(--legal-navy);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(7, 27, 61, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.legal-case-open {
  position: relative;
  display: grid;
  width: 100%;
  gap: 5px;
  border: 0;
  padding: 16px 16px 16px 58px;
  background: transparent;
  color: inherit;
  text-align: right;
  cursor: pointer;
}

.legal-case-open span,
.legal-case-open small,
.legal-case-open em {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

.legal-case-open strong {
  display: block;
  font-size: 1.38rem;
  line-height: 1.35;
}

.legal-case-open em {
  direction: ltr;
  justify-self: end;
  font-style: normal;
  font-size: 0.98rem;
}

.legal-case-chevron {
  position: absolute;
  left: 16px;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-50%);
  transition: transform 160ms ease, background 160ms ease;
}

.legal-case-chevron svg {
  width: 19px;
  height: 19px;
}

.legal-case-open[aria-expanded="true"] .legal-case-chevron {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) rotate(180deg);
}

.legal-case-login-note,
.legal-empty-state {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(11, 114, 133, 0.18);
  border-radius: 8px;
  background: rgba(11, 114, 133, 0.06);
  color: var(--legal-text);
  font-size: 1.04rem;
  font-weight: 800;
}

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

.legal-case-detail {
  display: grid;
  gap: 14px;
  margin-top: -4px;
  border: 1px solid rgba(7, 27, 61, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(7, 27, 61, 0.08);
}

.legal-case-detail[hidden] {
  display: none;
}

.legal-case-meta {
  display: grid;
  gap: 5px;
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 800;
}

.legal-case-date {
  justify-self: stretch;
  border: 1px solid rgba(7, 27, 61, 0.1);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(7, 27, 61, 0.045);
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 900;
}

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

.legal-case-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  min-height: 74px;
  padding: 7px 0 17px;
  border: 0;
  background: transparent;
}

.legal-case-timeline li::before {
  content: "";
  position: absolute;
  top: 42px;
  bottom: -2px;
  right: 19px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d8e2ef, #edf2f7);
}

.legal-case-timeline li:last-child::before {
  display: none;
}

.legal-case-timeline li.is-done::before {
  background: linear-gradient(180deg, #18a957, #b8ddca);
}

.legal-step-icon {
  position: relative;
  z-index: 1;
  display: grid;
  justify-self: center;
  align-self: start;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(216, 226, 239, 0.95);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #f5f8fc);
  color: #64748b;
  line-height: 0;
  box-shadow: 0 12px 22px rgba(7, 27, 61, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.legal-case-timeline li.is-done .legal-step-icon {
  border-color: rgba(34, 197, 94, 0.95);
  background: linear-gradient(145deg, #1fac5b, #16a34a);
  color: #fff;
}

.legal-case-timeline li.is-active .legal-step-icon {
  border-color: rgba(217, 119, 6, 0.95);
  background: linear-gradient(145deg, #fff7ed, #ffe8c2);
  color: #9a4b00;
  box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.1), 0 14px 26px rgba(217, 119, 6, 0.16);
}

.legal-step-icon svg {
  display: block;
  margin: auto;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.legal-case-timeline li > div > strong,
.legal-case-timeline li > div > span {
  display: block;
}

.legal-case-timeline li > div > strong {
  color: var(--legal-navy);
}

.legal-case-timeline li > div > span {
  margin-top: 3px;
  color: var(--legal-muted);
  font-size: 1rem;
  font-weight: 700;
}

.legal-ticket-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--legal-line);
  padding-top: 12px;
}

.legal-ticket-box h2 {
  margin: 0;
  color: var(--legal-navy);
  font-size: 1.36rem;
}

.legal-ticket-list {
  display: grid;
  gap: 8px;
}

.legal-ticket-empty {
  margin: 0;
  color: var(--legal-muted);
  font-size: 1rem;
  font-weight: 800;
}

.legal-ticket-message {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(7, 27, 61, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(7, 27, 61, 0.06);
}

.legal-ticket-message.is-admin {
  background: rgba(11, 114, 133, 0.1);
}

.legal-ticket-message strong {
  color: var(--legal-navy);
  font-size: 1.02rem;
}

.legal-ticket-message p {
  margin: 0;
  color: var(--legal-text);
  font-weight: 800;
}

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

.legal-ticket-form textarea {
  border-color: var(--legal-line);
  background: var(--legal-soft);
  font-size: 1.05rem;
}

.legal-ticket-status {
  margin: 0;
  color: var(--red);
  font-weight: 900;
}

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

.legal-custom-service-action {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  place-items: center;
  border: 1px solid rgba(196, 128, 27, 0.42);
  border-radius: 8px;
  padding: 14px 16px;
  background:
    linear-gradient(145deg, rgba(196, 128, 27, 0.2), rgba(7, 27, 61, 0.93)),
    rgba(7, 27, 61, 0.92);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 34px rgba(7, 27, 61, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.legal-custom-service-action strong {
  font-size: 1.24rem;
  font-weight: 1000;
  line-height: 1.45;
}

.legal-custom-service-action span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
  font-weight: 900;
}

.legal-custom-service-action.is-suggested {
  border-color: rgba(196, 128, 27, 0.85);
  background:
    linear-gradient(145deg, rgba(196, 128, 27, 0.42), rgba(7, 27, 61, 0.98)),
    var(--legal-navy);
  box-shadow: 0 22px 42px rgba(196, 128, 27, 0.2), 0 18px 34px rgba(7, 27, 61, 0.22);
}

.legal-service-choice-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(7, 27, 61, 0.38);
  backdrop-filter: blur(5px);
}

.legal-service-choice-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--legal-navy);
  box-shadow: 0 28px 70px rgba(7, 27, 61, 0.24);
}

.legal-service-choice-close {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 27, 61, 0.08);
  color: var(--legal-navy);
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
}

.legal-service-choice-card p,
.legal-service-choice-card h2 {
  margin: 0;
}

.legal-service-choice-card p {
  color: var(--legal-gold);
  font-size: 1rem;
  font-weight: 1000;
}

.legal-service-choice-card h2 {
  padding-left: 38px;
  font-size: clamp(1.18rem, 5.4vw, 1.46rem);
  line-height: 1.5;
}

.legal-service-choice-actions {
  display: grid;
  gap: 10px;
}

.legal-service-choice-actions button {
  display: grid;
  gap: 5px;
  min-height: 78px;
  border: 1px solid rgba(7, 27, 61, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(7, 27, 61, 0.12), rgba(7, 27, 61, 0.05));
  color: var(--legal-navy);
  text-align: right;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(7, 27, 61, 0.09);
}

.legal-service-choice-actions button:first-child {
  background: linear-gradient(145deg, rgba(11, 114, 133, 0.18), rgba(7, 27, 61, 0.08));
  border-color: rgba(11, 114, 133, 0.28);
}

.legal-service-choice-actions strong {
  font-size: clamp(1.05rem, 4.7vw, 1.18rem);
  font-weight: 1000;
}

.legal-service-choice-actions span {
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.55;
}

.legal-services-main,
.legal-service-details {
  display: grid;
  gap: 16px;
}

.legal-services-greeting {
  display: grid;
  min-height: 96px;
  place-items: center;
  text-align: center;
}

.legal-services-greeting h1 {
  max-width: 100%;
  margin: 0;
  color: var(--legal-navy);
  font-size: clamp(1.62rem, 5.1vw, 2rem);
  line-height: 1.35;
  white-space: nowrap;
}

.legal-ai-search {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(11, 114, 133, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(11, 114, 133, 0.08));
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px rgba(7, 27, 61, 0.08);
}

.legal-service-search-box {
  background: #fff;
}

.legal-service-result {
  min-height: 22px;
  margin: 0;
  color: var(--legal-muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.5;
}

.legal-ai-search label {
  color: var(--legal-navy);
  font-size: 1.04rem;
  font-weight: 900;
}

.legal-search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
}

.legal-search-input-row input {
  min-width: 0;
  border-color: var(--legal-line);
  background: #fff;
  color: var(--legal-text);
  font-size: 1.05rem;
}

.legal-search-input-row input:focus {
  border-color: var(--legal-accent);
  box-shadow: 0 0 0 4px rgba(11, 114, 133, 0.12);
}

.legal-search-input-row button {
  display: grid;
  width: 64px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.2), transparent 42%),
    var(--legal-navy);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
}

.legal-ai-search p {
  margin: 0;
  color: var(--legal-muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.legal-service-card.is-ai-match,
.legal-subservice-card.is-ai-match {
  border-color: rgba(11, 114, 133, 0.42);
  background: linear-gradient(145deg, rgba(11, 114, 133, 0.18), rgba(7, 27, 61, 0.08));
}

.legal-service-card,
.legal-subservice-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(7, 27, 61, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(7, 27, 61, 0.075)),
    rgba(255, 255, 255, 0.62);
  color: var(--legal-navy);
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 38px rgba(7, 27, 61, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.legal-service-card {
  min-height: 118px;
  place-items: center;
  align-content: center;
  padding: 13px 12px;
  text-align: center;
}

.legal-service-list {
  gap: 12px;
}

.legal-service-card {
  min-height: 116px;
}

.legal-service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.32), transparent 46%),
    rgba(7, 27, 61, 0.95);
  color: #fff;
  box-shadow: 0 10px 22px rgba(7, 27, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.legal-service-title,
.legal-subservice-card span {
  color: var(--legal-navy);
  font-weight: 900;
  line-height: 1.45;
}

.legal-service-title {
  font-size: 1.28rem;
  text-align: center;
}

.legal-subservice-card {
  align-items: center;
  justify-items: center;
  text-align: center;
}

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

.legal-subservice-card {
  min-height: 78px;
  padding: 13px 14px;
}

.legal-subservice-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(226, 238, 246, 0.78));
  color: var(--legal-navy);
  border-color: rgba(6, 23, 53, 0.1);
  box-shadow: 0 14px 30px rgba(6, 23, 53, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.legal-subservice-card span {
  color: var(--legal-navy);
}

.legal-service-card:focus-visible,
.legal-subservice-card:focus-visible,
.legal-auth-actions button:focus-visible,
.legal-primary-action:focus-visible,
.legal-secondary-action:focus-visible,
.legal-tab:focus-visible,
.legal-icon-button:focus-visible,
.legal-search-input-row button:focus-visible {
  outline: 3px solid rgba(11, 114, 133, 0.28);
  outline-offset: 2px;
}

.legal-service-list small,
.legal-subservice-card small {
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.legal-service-card small {
  display: none;
}

.legal-subservice-card small {
  line-height: 1.6;
}

.legal-service-detail {
  display: grid;
  gap: 14px;
}

.legal-service-detail-head {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--legal-line);
  border-radius: 8px;
  background: var(--legal-soft);
}

.legal-service-detail-head p,
.legal-service-detail-head h2,
.legal-service-detail-head span {
  margin: 0;
}

.legal-service-detail-head p {
  color: var(--legal-gold);
  font-size: 0.98rem;
  font-weight: 900;
}

.legal-service-detail-head h2 {
  color: var(--legal-navy);
  font-size: 1.75rem;
  line-height: 1.28;
}

.legal-service-detail-head span {
  color: var(--legal-muted);
  font-size: 1rem;
  font-weight: 800;
}

.legal-intake-panel {
  min-height: 100%;
  align-content: start;
  background: #fff;
}

.legal-back-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--legal-navy);
  font-weight: 900;
  cursor: pointer;
}

.legal-intake-top {
  display: grid;
  gap: 10px;
}

.legal-intake-top p {
  margin: 0;
  color: var(--legal-gold);
  font-size: 1rem;
  font-weight: 900;
}

.legal-intake-top h1,
.legal-intake-success h2 {
  margin: 0;
  color: var(--legal-navy);
  font-size: 1.9rem;
  line-height: 1.32;
}

.legal-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--legal-soft);
}

.legal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--legal-navy);
  transition: width 160ms ease;
}

.legal-intake-form,
.legal-intake-step,
.legal-intake-step label,
.legal-intake-success {
  display: grid;
  gap: 14px;
}

.legal-intake-step[hidden],
.legal-intake-success[hidden] {
  display: none;
}

.legal-intake-step label {
  color: var(--legal-navy);
  font-weight: 900;
}

.legal-intake-step input,
.legal-intake-step textarea,
.legal-intake-step select {
  border-color: var(--legal-line);
  background: var(--legal-soft);
  font-size: 1.08rem;
}

.legal-choice-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.legal-choice-group legend {
  margin: 0 0 4px;
  color: var(--legal-navy);
  font-weight: 900;
}

.legal-choice-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 46px 12px 14px;
  border: 1px solid rgba(7, 27, 61, 0.14);
  background: linear-gradient(145deg, rgba(7, 27, 61, 0.13), rgba(7, 27, 61, 0.055));
  color: var(--legal-navy);
  box-shadow: 0 12px 24px rgba(7, 27, 61, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.legal-choice-card input {
  position: absolute;
  top: 18px;
  right: 14px;
  width: 20px;
  height: 20px;
  accent-color: var(--legal-navy);
}

.legal-choice-card span {
  color: var(--legal-navy);
  font-size: 1.16rem;
  line-height: 1.4;
}

.legal-choice-card small {
  color: var(--legal-muted);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.55;
}

.legal-choice-card:has(input:checked) {
  border-color: rgba(7, 27, 61, 0.34);
  background: linear-gradient(145deg, rgba(7, 27, 61, 0.22), rgba(7, 27, 61, 0.1));
}

.legal-voice-button {
  min-height: 46px;
  border: 1px dashed rgba(7, 27, 61, 0.22);
  padding: 10px 12px;
  background: rgba(7, 27, 61, 0.08);
  color: var(--legal-navy);
  box-shadow: 0 10px 22px rgba(7, 27, 61, 0.08);
}

.legal-voice-button.is-active {
  border-style: solid;
  background: rgba(11, 114, 133, 0.12);
  color: var(--legal-accent);
}

.legal-intake-actions {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 10px;
}

.legal-intake-actions [hidden] {
  display: none;
}

.legal-intake-success {
  padding: 18px;
  border: 1px solid rgba(11, 114, 133, 0.2);
  border-radius: 8px;
  background: rgba(11, 114, 133, 0.06);
}

.legal-intake-success p {
  margin: 0;
  color: var(--legal-muted);
  font-weight: 800;
}

.legal-tabbar {
  position: relative;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 6px;
  direction: rtl;
  padding: 8px 8px max(9px, env(safe-area-inset-bottom));
  border-top: 0;
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.16), transparent 36%),
    linear-gradient(180deg, var(--legal-navy-2), var(--legal-navy));
  box-shadow: 0 -18px 38px rgba(7, 27, 61, 0.24);
}

.legal-tab {
  display: grid;
  min-width: 0;
  min-height: 64px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  padding: 5px 3px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.legal-tab span {
  display: block;
  max-width: 100%;
  min-height: 2.6em;
  overflow: hidden;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.legal-tab.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.legal-topbar,
.legal-tabbar {
  background:
    linear-gradient(135deg, rgba(11, 114, 133, 0.18), transparent 38%),
    rgba(7, 27, 61, 0.86);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
}

.legal-office-info,
.legal-profile-head,
.legal-profile-card,
.legal-profile-news,
.legal-security-note,
.legal-ai-search,
.legal-subservice-card,
.legal-service-choice-card,
.legal-ai-prequal,
.legal-chat-phone,
.legal-case-detail,
.legal-case-login-note,
.legal-empty-state,
.legal-document-card,
.legal-ticket-message,
.legal-intake-success,
.legal-choice-card {
  border-color: rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow:
    0 18px 42px rgba(7, 27, 61, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.legal-service-card,
.legal-custom-service-action {
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(145deg, rgba(7, 27, 61, 0.76), rgba(7, 27, 61, 0.46)),
    rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow:
    0 18px 42px rgba(7, 27, 61, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.legal-service-card .legal-service-title,
.legal-custom-service-action strong,
.legal-custom-service-action span {
  color: #fff;
}

.legal-chat-window {
  background: rgba(247, 247, 249, 0.72);
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-window {
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.12);
  background:
    linear-gradient(180deg, rgba(250, 250, 252, 0.84), rgba(255, 255, 255, 0.72)),
    rgba(247, 247, 249, 0.66);
  backdrop-filter: blur(22px) saturate(1.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.24);
  box-shadow:
    0 18px 46px rgba(7, 27, 61, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-status {
  min-height: 46px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(249, 249, 251, 0.78);
  color: #111827;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-status small,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-status strong {
  color: #8e8e93;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-messages {
  gap: 7px;
  padding: 14px 8px 11px;
  background: transparent;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-message {
  max-width: 82%;
  border: 0;
  border-radius: 18px;
  padding: 8px 12px;
  font-size: 1.03rem;
  font-weight: 750;
  line-height: 1.5;
  box-shadow: none;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-message.is-user {
  justify-self: end;
  border-bottom-left-radius: 5px;
  background: #007aff;
  color: #fff;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-message.is-bot,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-message.is-pending {
  justify-self: start;
  border-bottom-right-radius: 5px;
  background: rgba(229, 229, 234, 0.92);
  color: #111827;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-message.is-admin {
  justify-self: start;
  border-bottom-right-radius: 5px;
  background: rgba(255, 242, 204, 0.94);
  color: #3f2e08;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-compose {
  gap: 7px;
  padding: 8px;
  border-top: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(249, 249, 251, 0.78);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-compose textarea {
  min-height: 44px;
  max-height: 104px;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 1.05rem;
  font-weight: 750;
  resize: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-voice-input-button,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-actions button {
  min-height: 42px;
  border-radius: 20px;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-voice-input-button,
#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-actions .legal-secondary-action {
  border: 1px solid rgba(60, 60, 67, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: #007aff;
  box-shadow: none;
}

#tab-consult:has(.legal-chat-window:not([hidden])) .legal-chat-actions .legal-primary-action {
  border: 0;
  background: #007aff;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.22);
}

@media (min-width: 700px) {
  body.legal-app-body {
    padding: 0;
  }

  .legal-app-shell {
    min-height: 100svh;
    border: 1px solid var(--legal-line);
    border-top: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: 0 24px 70px rgba(7, 27, 61, 0.15);
  }
}

@media (max-width: 360px) {
  .legal-service-choice-modal {
    padding: 10px;
  }

  .legal-service-choice-card {
    padding: 16px 12px;
  }

  .legal-service-choice-actions button {
    min-height: 72px;
    padding: 12px;
  }

  .legal-app-content {
    padding-inline: 12px;
  }

  .legal-panel-heading h1,
  .legal-consult-hero h1 {
    font-size: 1.78rem;
  }

  .legal-tab span {
    font-size: 0.76rem;
  }
}

body.legal-app-body {
  font-family: "Shabnam", "Vazirmatn", "IRANYekanX", Tahoma, Arial, sans-serif;
  font-weight: 500;
}

.legal-services-main::before {
  display: none;
}

.legal-services-main {
  position: relative;
}

.legal-services-main > * {
  position: relative;
  z-index: 1;
}

body.legal-app-body :is(
  p,
  small,
  label,
  input,
  textarea,
  button,
  span,
  a,
  dd,
  dt,
  li
) {
  font-weight: 500;
}

body.legal-app-body :is(
  strong,
  h1,
  h2,
  h3,
  .legal-service-title,
  .legal-subservice-card span,
  .legal-primary-action,
  .legal-secondary-action,
  .legal-tab span,
  .legal-brand strong,
  .legal-panel-heading h1,
  .legal-consult-hero h1,
  .legal-ai-prequal h2,
  .legal-chat-status,
  .legal-case-open strong
) {
  font-weight: 700;
}

body.legal-app-body :is(
  .legal-muted,
  .legal-brand small,
  .legal-chat-file-meta,
  .legal-profile-card small,
  .legal-service-choice-actions span
) {
  font-weight: 500;
}

.legal-services-greeting h1 {
  font-weight: 700;
}

.legal-chat-message {
  font-weight: 500;
}

.legal-chat-message.is-user,
.legal-chat-message.is-pending {
  font-weight: 600;
}

.legal-service-card {
  border-color: rgba(255, 255, 255, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.08);
  color: var(--legal-navy);
  backdrop-filter: blur(2px) saturate(1.02);
  -webkit-backdrop-filter: blur(2px) saturate(1.02);
  box-shadow:
    0 12px 26px rgba(7, 27, 61, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.legal-service-card .legal-service-title {
  color: var(--legal-navy);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.56),
    0 0 18px rgba(255, 255, 255, 0.78);
}

.legal-service-icon {
  background:
    linear-gradient(145deg, rgba(7, 27, 61, 0.76), rgba(7, 27, 61, 0.46)),
    rgba(255, 255, 255, 0.12);
  box-shadow:
    0 9px 20px rgba(7, 27, 61, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.legal-office-info {
  display: none !important;
}
