:root {
  --ink: #091a31;
  --ink-soft: #3f4e63;
  --muted: #758195;
  --canvas: #eef2f7;
  --surface: rgba(255, 255, 255, 0.91);
  --surface-solid: #ffffff;
  --line: rgba(18, 48, 82, 0.1);
  --line-strong: rgba(18, 48, 82, 0.17);
  --gold: #27b9d2;
  --gold-dark: #087996;
  --gold-soft: rgba(39, 185, 210, 0.12);
  --navy: #071b34;
  --navy-soft: #0c2948;
  --brand-red: #ed2851;
  --brand-red-dark: #d41542;
  --brand-purple: #6f3f85;
  --green: #3f725b;
  --green-soft: rgba(63, 114, 91, 0.11);
  --amber: #d97721;
  --amber-soft: rgba(217, 119, 33, 0.12);
  --red: #9d4b42;
  --red-soft: rgba(157, 75, 66, 0.1);
  --shadow: 0 18px 50px rgba(8, 27, 52, 0.09);
  --shadow-soft: 0 8px 24px rgba(8, 27, 52, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% 2%, rgba(39, 185, 210, 0.09), transparent 32rem),
    radial-gradient(circle at 9% 92%, rgba(111, 63, 133, 0.055), transparent 28rem),
    linear-gradient(135deg, #f8fafc 0%, var(--canvas) 48%, #e9eef5 100%);
}

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

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(39, 185, 210, 0.3);
  outline-offset: 2px;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 22px;
  color: #f5f1e9;
  background:
    linear-gradient(rgba(43, 129, 168, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 129, 168, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 12% 10%, rgba(237, 40, 81, 0.17), transparent 18rem),
    radial-gradient(circle at 100% 70%, rgba(39, 185, 210, 0.13), transparent 20rem),
    linear-gradient(180deg, var(--navy-soft) 0%, #061529 100%);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 0 8px 30px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 104px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.brand span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.nav-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.64);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.is-active {
  color: #fff;
  border-color: rgba(39, 185, 210, 0.24);
  background: linear-gradient(135deg, rgba(39, 185, 210, 0.14), rgba(111, 63, 133, 0.12));
  box-shadow: inset 3px 0 0 var(--brand-red);
}

.nav-icon {
  display: grid;
  place-items: center;
}

.nav-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(237, 40, 81, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.sidebar-note small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.note-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #35c5de;
  box-shadow: 0 0 0 5px rgba(53, 197, 222, 0.11);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.48);
  text-decoration: none;
  font-size: 12px;
}

.back-link:hover {
  color: #fff;
}

.main {
  min-width: 0;
  padding: 27px clamp(20px, 3vw, 44px) 42px;
}

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

.eyebrow {
  margin: 0 0 7px;
  color: #087a98;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.topbar h1 {
  margin-bottom: 0;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 660;
  letter-spacing: -0.035em;
}

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

.icon-button,
.profile-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--ink-soft);
}

.icon-button span {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--amber);
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 15px;
  text-align: left;
}

.profile-button > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-purple));
  font-size: 11px;
  font-weight: 750;
}

.profile-button strong,
.profile-button small {
  display: block;
}

.profile-button strong {
  font-size: 12px;
}

.profile-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.search-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(48, 171, 210, 0.21);
  border-radius: 25px;
  color: #f8f5ed;
  background:
    linear-gradient(rgba(59, 144, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 144, 184, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 88% 15%, rgba(111, 63, 133, 0.48), transparent 23rem),
    radial-gradient(circle at 10% 100%, rgba(237, 40, 81, 0.14), transparent 18rem),
    linear-gradient(135deg, #081b35 0%, #0b2746 76%);
  background-size: 30px 30px, 30px 30px, auto, auto, auto;
  box-shadow: 0 22px 60px rgba(7, 27, 52, 0.2);
}

.search-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(39, 185, 210, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(39, 185, 210, 0.045),
    0 0 0 75px rgba(39, 185, 210, 0.025);
  pointer-events: none;
}

.search-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.hero-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(50, 198, 225, 0.3);
  border-radius: 13px;
  color: #3ad0e9;
  background: rgba(39, 185, 210, 0.11);
}

.search-copy h2 {
  margin-bottom: 7px;
  font-size: clamp(22px, 2.5vw, 31px);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.search-copy p {
  max-width: 780px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.55;
}

.global-search {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 7px 7px 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.global-search svg {
  color: rgba(255, 255, 255, 0.52);
}

.global-search input {
  min-width: 0;
  height: 43px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 14px;
}

.global-search input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.global-search button,
.assistant-form button {
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(180deg, #f43b61, var(--brand-red-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-weight: 720;
}

.global-search button {
  min-width: 94px;
  height: 43px;
}

.global-search button:hover,
.assistant-form button:hover {
  filter: brightness(1.04);
}

.quick-questions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.quick-questions button {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font-size: 11px;
}

.quick-questions button:hover {
  color: #fff;
  border-color: rgba(55, 201, 226, 0.34);
}

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

.stat {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #087d9a;
  background: var(--gold-soft);
}

.stat-alert .stat-icon {
  color: var(--brand-red);
  background: rgba(237, 40, 81, 0.1);
}

.stat small,
.stat strong,
.stat span {
  display: block;
}

.stat small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat strong {
  margin: 3px 0 2px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat span {
  overflow: hidden;
  color: var(--green);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-alert span {
  color: var(--brand-red);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(420px, 1.35fr) minmax(270px, 0.78fr);
  gap: 14px;
  align-items: start;
}

.company-panel,
.client-panel,
.assistant-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.company-panel,
.assistant-panel {
  padding: 18px;
}

.panel-heading,
.assistant-heading,
.client-header,
.contract-row,
.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.assistant-heading h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.soft-button {
  padding: 8px 10px;
  border: 1px solid rgba(39, 185, 210, 0.2);
  border-radius: 10px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  margin: 15px 0 11px;
}

.list-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.6);
}

.list-search svg {
  width: 15px;
  color: var(--muted);
}

.list-search input,
.list-tools select {
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.list-search input {
  width: 100%;
}

.list-tools select {
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.6);
}

.company-list {
  display: grid;
  gap: 7px;
}

.company-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.company-item:hover {
  background: rgba(255, 255, 255, 0.72);
}

.company-item.is-selected {
  border-color: rgba(39, 185, 210, 0.23);
  background: linear-gradient(135deg, rgba(39, 185, 210, 0.11), rgba(255, 255, 255, 0.78));
}

.company-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 750;
}

.company-info {
  min-width: 0;
}

.company-info strong,
.company-info small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.company-info strong {
  font-size: 12px;
}

.company-info small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.company-meta {
  text-align: right;
}

.company-meta strong,
.company-meta small {
  display: block;
}

.company-meta strong {
  font-size: 11px;
}

.company-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.attention {
  background: var(--amber);
}

.client-panel {
  overflow: hidden;
}

.client-header {
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 95% 0, rgba(39, 185, 210, 0.12), transparent 14rem),
    rgba(255, 255, 255, 0.5);
}

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

.client-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-purple));
  box-shadow: 0 10px 24px rgba(111, 63, 133, 0.2);
  font-size: 13px;
  font-weight: 750;
}

.client-header h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.client-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 700;
}

.status-badge.attention {
  color: var(--amber);
  background: var(--amber-soft);
}

.client-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.summary-cell {
  min-width: 0;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.75);
}

.summary-cell small,
.summary-cell strong {
  display: block;
}

.summary-cell small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-cell strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.client-content {
  padding: 18px 20px 20px;
}

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

.section-heading h3 {
  margin-bottom: 0;
  font-size: 14px;
}

.section-heading span {
  color: var(--muted);
  font-size: 10px;
}

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

.contract-row {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.contract-row:hover,
.contract-row.is-selected {
  border-color: rgba(39, 185, 210, 0.27);
  background: var(--gold-soft);
}

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

.contract-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.contract-main strong,
.contract-main small {
  display: block;
}

.contract-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contract-scope {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(39, 185, 210, 0.2);
  border-radius: 999px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.contract-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.contract-side {
  flex: 0 0 auto;
  text-align: right;
}

.contract-side strong,
.contract-side small {
  display: block;
}

.contract-side strong {
  font-size: 11px;
}

.contract-side small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.contract-status {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--green) !important;
  background: var(--green-soft);
  font-size: 9px !important;
  font-weight: 750;
}

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

.contract-status.attention {
  color: var(--amber) !important;
  background: var(--amber-soft);
}

.contract-status.inactive {
  color: var(--muted) !important;
  background: rgba(91, 84, 74, 0.09);
}

.document-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.documents {
  display: grid;
  gap: 5px;
}

.document-row {
  padding: 8px 2px;
  border-bottom: 1px solid rgba(36, 31, 24, 0.07);
}

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

.document-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 8px;
  font-weight: 800;
}

.document-name strong,
.document-name small {
  display: block;
}

.document-name strong {
  overflow: hidden;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.document-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.document-link {
  padding: 5px 7px;
  border: 0;
  color: var(--gold-dark);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.assistant-panel {
  position: sticky;
  top: 20px;
}

.assistant-heading {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.assistant-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-purple));
  box-shadow: 0 10px 22px rgba(111, 63, 133, 0.2);
  font-family: Georgia, serif;
  font-size: 18px;
}

.assistant-answer {
  min-height: 160px;
  padding: 14px;
  border: 1px solid rgba(39, 185, 210, 0.17);
  border-radius: 15px;
  color: var(--ink-soft);
  background:
    linear-gradient(180deg, rgba(39, 185, 210, 0.07), rgba(255, 255, 255, 0.6));
  font-size: 11px;
  line-height: 1.6;
}

.assistant-answer p:last-child {
  margin-bottom: 0;
}

.assistant-answer strong {
  color: var(--ink);
}

.assistant-answer ul {
  margin: 8px 0;
  padding-left: 18px;
}

.source-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(39, 185, 210, 0.15);
  color: var(--gold-dark);
  font-size: 9px;
}

.assistant-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.assistant-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  line-height: 1.45;
}

.assistant-form button {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
}

.assistant-trust {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.assistant-trust svg {
  width: 15px;
  flex: 0 0 auto;
  color: var(--green);
}

.empty-state {
  padding: 26px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(340px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(39, 185, 210, 0.22);
  border-radius: 13px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 18px 40px rgba(7, 27, 52, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
  font-size: 11px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: minmax(240px, 0.7fr) minmax(430px, 1.3fr);
  }

  .assistant-panel {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) minmax(240px, 0.75fr);
    gap: 14px;
    align-items: center;
  }

  .assistant-heading {
    margin-bottom: 0;
  }

  .assistant-answer {
    min-height: 112px;
  }

  .assistant-form {
    margin-top: 0;
  }

  .assistant-trust {
    grid-column: 3;
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    display: block;
    padding: 16px;
    overflow: hidden;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 14px;
  }

  .brand img {
    width: 82px;
  }

  .main-nav {
    width: 100%;
    max-width: 100%;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    grid-template-columns: 22px auto auto;
  }

  .sidebar-note,
  .back-link {
    display: none;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px 34px;
  }

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

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

  .assistant-panel {
    grid-column: auto;
    display: block;
  }

  .assistant-heading {
    margin-bottom: 14px;
  }

  .assistant-trust {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
  }

  .profile-button div {
    display: none;
  }

  .search-copy {
    display: block;
  }

  .hero-mark {
    margin-bottom: 12px;
  }

  .global-search {
    grid-template-columns: 21px minmax(0, 1fr);
  }

  .global-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

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

  .client-header {
    display: block;
  }

  .client-header .status-badge {
    margin-top: 12px;
  }
}
