:root {
  --ink: #16233b;
  --muted: #65738c;
  --line: #dce3ed;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --navy: #102a56;
  --navy-deep: #091b3b;
  --teal: #137c78;
  --teal-soft: #e6f5f3;
  --blue: #2463d4;
  --warning: #a45b05;
  --warning-soft: #fff3dc;
  --danger: #a52d3c;
  --danger-soft: #fff0f2;
  --shadow: 0 18px 50px rgba(16, 42, 86, 0.10);
  --shell-dark: #2d5943;
  --shell-light: #effaf7;
  --shell-relief-dark: url("./assets/geometric-relief-dark-v2.svg?v=11.2.26");
  --shell-relief-light: url("./assets/geometric-relief-light-v2.svg?v=11.2.26");
  --shell-relief-size: 1344px 776px;
  --shell-relief-size-mobile: 768px 443.43px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Version 10.4 controlled business operations */
.business-operations-panel {
  width: min(1480px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.business-operations-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 0 18px;
  overflow-x: auto;
}

.business-operations-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.business-operations-tab.active {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  color: var(--teal);
  font-weight: 700;
}

.business-operations-content {
  display: grid;
  gap: 16px;
}

.operation-form,
.operation-card,
.operation-guidance {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.operation-form h3,
.operation-card h3,
.operation-guidance h3 {
  margin: 0 0 8px;
}

.operation-form > p,
.operation-guidance > p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.operation-form-grid label,
.operation-inline-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 650;
}

.operation-form-grid input,
.operation-form-grid select,
.operation-form-grid textarea,
.operation-inline-fields input,
.operation-inline-fields select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.operation-form-grid textarea {
  min-height: 84px;
  resize: vertical;
}

.operation-wide {
  grid-column: 1 / -1;
}

.operation-lines {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.operation-line {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--teal) 10%);
}

.operation-inline-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
}

.operation-form-actions,
.operation-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.operation-primary,
.operation-secondary,
.operation-danger {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 11px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.operation-primary {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

.operation-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.operation-danger {
  border: 1px solid #b94b55;
  background: color-mix(in srgb, #b94b55 9%, var(--surface));
  color: #9b2835;
}

.operation-primary:disabled,
.operation-secondary:disabled,
.operation-danger:disabled {
  cursor: wait;
  opacity: .55;
}

.operation-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.operation-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  color: var(--teal);
  font-size: .85rem;
  font-weight: 700;
}

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

.operation-summary div {
  min-width: 0;
}

.operation-summary dt {
  color: var(--muted);
  font-size: .82rem;
}

.operation-summary dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.operation-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.operation-checkboxes label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
}

.operation-checkboxes input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

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

.operation-table th,
.operation-table td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

.operation-form-offer {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
}

.operation-form-offer p {
  margin: 0 0 10px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .business-operations-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .operation-form-grid,
  .operation-inline-fields,
  .operation-summary,
  .operation-checkboxes {
    grid-template-columns: 1fr;
  }
}

* { box-sizing: border-box; }

html, body { min-height: 100%; overflow-x: hidden; }

body {
  margin: 0;
  color: var(--ink);
  background: #eef2f7;
}
body.workflow-open { overflow: hidden; }
body.company-onboarding-required .company-management-panel {
  border-color: rgba(229, 184, 11, .38);
}

.authentication-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #effaf7;
  background-color: var(--shell-dark);
  background-image: var(--shell-relief-dark);
  background-position: center;
  background-repeat: repeat;
  background-size: var(--shell-relief-size);
}

.authentication-gate[hidden] { display: none !important; }

.company-access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  color: #163126;
  background: #eef2f7;
}

.company-access-gate[hidden] { display: none !important; }

html.company-access-blocked .app-shell,
html.company-access-blocked .workflow-overlay,
html.company-access-blocked .consent-overlay,
html.company-access-blocked .busy-overlay,
html.company-access-blocked .identity-role-detail-overlay {
  display: none !important;
}

.company-access-gate-content {
  width: min(520px, 100%);
  text-align: center;
}

.company-access-gate-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 8px;
  color: #effaf7;
  background: #173d2d;
  font-size: 24px;
  font-weight: 800;
}

.company-access-gate h1 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: 0;
}

.company-access-gate p {
  margin: 0 auto 24px;
  color: #52635c;
  line-height: 1.9;
}

.workflow-nav-button[hidden] { display: none !important; }

.authentication-gate-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid rgba(239, 250, 247, .22);
  border-radius: 18px;
  background: rgba(17, 45, 33, .36);
  box-shadow: 0 18px 46px rgba(7, 24, 17, .18);
}

.authentication-gate-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.authentication-gate-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid rgba(239, 250, 247, .28);
  border-top-color: #effaf7;
  border-radius: 50%;
  animation: authentication-gate-spin .75s linear infinite;
}

@keyframes authentication-gate-spin {
  to { transform: rotate(360deg); }
}

html.shell-relief-loading,
html.shell-relief-loading body {
  background: var(--shell-dark);
}

html.shell-relief-loading .app-shell {
  visibility: hidden;
  opacity: 0;
  animation: shell-relief-failsafe 0s linear 4s forwards;
}

html.shell-relief-ready .app-shell {
  visibility: visible;
  animation: shell-relief-reveal .16s ease-out both;
}

@keyframes shell-relief-failsafe {
  to { visibility: visible; opacity: 1; }
}

@keyframes shell-relief-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.shell-relief-ready .app-shell { animation-duration: .01ms; }
  .authentication-gate-spinner { animation-duration: 1.5s; }
}

button, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, textarea:disabled { cursor: not-allowed; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  direction: ltr;
  background-color: var(--shell-light);
  background-image: var(--shell-relief-light);
  background-position: left top;
  background-size: var(--shell-relief-size);
  background-repeat: repeat;
}

[dir="rtl"] .app-shell { grid-template-columns: 292px minmax(0, 1fr); }

.sidebar {
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 100vh;
  padding: 28px 22px 18px;
  color: #f4f7ff;
  background-color: var(--shell-dark);
  background-image: var(--shell-relief-dark);
  background-position: left top;
  background-size: var(--shell-relief-size);
  background-repeat: repeat;
}

[dir="ltr"] .sidebar { direction: ltr; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark, .welcome-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #28a6a0, #2c6ed2);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(26, 167, 161, 0.24);
}
.brand strong { display: block; font-size: 16px; letter-spacing: .01em; }
.brand span { display: block; margin-top: 4px; color: #aebbd1; font-size: 12px; }

.privacy-card {
  display: flex;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(119, 215, 204, .24);
  border-radius: 15px;
  background: rgba(20, 133, 126, .13);
}
.privacy-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #041e2d;
  background: #72d4c9;
  font-weight: 800;
}
.privacy-card h2, .examples h2 { margin: 0; font-size: 13px; }
.privacy-card p { margin: 5px 0 0; color: #bfd3da; font-size: 11px; line-height: 1.75; }

.examples { display: grid; gap: 8px; }
.examples h2 { margin-bottom: 5px; color: #9fadc5; font-weight: 600; }
.example-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d8e0ee;
  background: transparent;
  text-align: start;
  font-size: 12px;
  transition: background .18s ease, border-color .18s ease;
}
.example-button:hover, .example-button:focus-visible {
  border-color: rgba(130, 170, 225, .24);
  background: rgba(255, 255, 255, .07);
  outline: none;
}
.example-button > span:first-child { width: 18px; color: #7fcfc8; text-align: center; font-size: 16px; }

.workflow-nav { display: grid; gap: 8px; }
.workflow-nav-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(114, 212, 201, .28);
  border-radius: 12px;
  color: #eefbfa;
  background: rgba(19, 124, 120, .2);
  text-align: start;
  font-size: 12px;
  font-weight: 800;
}
.workflow-nav-button:hover:not(:disabled), .workflow-nav-button:focus-visible {
  border-color: rgba(114, 212, 201, .62);
  background: rgba(19, 124, 120, .34);
  outline: 3px solid rgba(114, 212, 201, .1);
}
.workflow-nav-button:disabled { opacity: .48; cursor: not-allowed; }
.workflow-nav-button > span:first-child { color: #72d4c9; font-size: 16px; }
.workflow-badge {
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  margin-inline-start: auto;
  padding: 0 6px;
  border-radius: 999px;
  color: #08203b;
  background: #72d4c9;
  font-size: 10px;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #9eabc0;
  font-size: 10px;
}
.sidebar-footer #version-label { margin-inline-start: auto; }
.environment-dot { width: 7px; height: 7px; border-radius: 50%; background: #45c7a4; box-shadow: 0 0 0 4px rgba(69, 199, 164, .12); }

.main-panel {
  direction: rtl;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}
[dir="ltr"] .main-panel { direction: ltr; }

.topbar {
  min-height: 172px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(239, 250, 247, .28);
  color: #effaf7;
  background-color: var(--shell-dark);
  background-image: var(--shell-relief-dark);
  background-position: -292px top;
  background-size: var(--shell-relief-size);
  background-repeat: repeat;
}
.topbar-title h1 { margin: 0; font-size: 20px; }
.topbar-title p { margin: 5px 0 0; color: rgba(239, 250, 247, .78); font-size: 12px; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.active-user-indicator {
  flex: 0 1 220px;
  min-width: 138px;
  max-width: 240px;
  min-height: 38px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 11px;
  border: 1px solid rgba(239, 250, 247, .42);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.active-user-indicator span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.active-user-indicator strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.15;
}
[dir="rtl"] .active-user-indicator { text-align: right; }
[dir="ltr"] .active-user-indicator { text-align: left; }

.language-control select, .secondary-button, .icon-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.language-control select { padding: 0 11px; }
.company-switcher {
  display: grid;
  gap: 3px;
  color: rgba(239, 250, 247, .82);
  font-size: 9px;
  font-weight: 800;
}
.company-switcher select {
  min-width: 150px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(239, 250, 247, .42);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
}
.secondary-button { padding: 0 14px; font-size: 12px; font-weight: 700; }
.secondary-button:hover, .secondary-button:focus-visible, .language-control select:focus-visible { border-color: #9db5db; outline: 3px solid rgba(36, 99, 212, .1); }
.secondary-button:disabled { opacity: .5; cursor: not-allowed; }
.learning-toggle.disabled-learning { color: #776f64; background: #f5f2ed; }
.icon-button { width: 38px; padding: 0; }
.menu-button { display: none; }

.conversation {
  width: min(980px, calc(100% - 48px));
  min-height: calc(100vh - 172px);
  margin: 0 auto;
  padding: 26px 0 22px;
  display: flex;
  flex-direction: column;
}

.status-banner {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
}
.status-banner.authenticated { color: #10625e; border-color: #bfe0dc; background: var(--teal-soft); }
.status-banner.error { color: var(--danger); border-color: #f0c5cb; background: var(--danger-soft); }
.status-indicator { width: 7px; height: 7px; border-radius: 50%; background: #9aa7b9; }
.authenticated .status-indicator { background: #1c9c91; }
.error .status-indicator { background: var(--danger); }

.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 8px;
  overflow-wrap: anywhere;
}
.welcome-card {
  max-width: 580px;
  align-self: center;
  margin: auto 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.welcome-symbol { margin: 0 auto 18px; }
.welcome-card h2 { margin: 0; font-size: 22px; }
.welcome-card p { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.welcome-card .safety-note { color: #1b6b67; font-size: 11px; }

.message { max-width: 82%; display: grid; gap: 7px; }
.message.user { align-self: flex-start; }
[dir="ltr"] .message.user { align-self: flex-end; }
.message.assistant { align-self: flex-end; }
[dir="ltr"] .message.assistant { align-self: flex-start; }
.message-bubble { padding: 13px 16px; border-radius: 16px; line-height: 1.75; font-size: 13px; white-space: pre-wrap; }
.message.user .message-bubble { color: #fff; background: linear-gradient(145deg, #245fc5, #17458e); border-end-start-radius: 5px; }
[dir="ltr"] .message.user .message-bubble { border-end-start-radius: 16px; border-end-end-radius: 5px; }
.message.assistant .message-bubble { border: 1px solid var(--line); background: #fff; border-end-end-radius: 5px; }
[dir="ltr"] .message.assistant .message-bubble { border-end-end-radius: 16px; border-end-start-radius: 5px; }
.conversation-choice-list { display: grid; gap: 8px; width: min(100%, 460px); margin-top: 8px; }
.conversation-choice-button { min-height: 42px; height: auto; padding: 9px 12px; white-space: normal; text-align: start; }
.message-meta { color: #7a879a; font-size: 10px; }

.result-card {
  min-width: min(560px, 78vw);
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.result-card h3 { margin: 0 0 12px; font-size: 13px; }
.result-card .result-subheading { margin: 14px 0 8px; color: var(--muted); font-size: 10px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.result-field { min-width: 0; padding: 10px; border-radius: 9px; background: #f6f8fb; }
.result-field dt { color: var(--muted); font-size: 9px; }
.result-field dd { margin: 4px 0 0; overflow-wrap: anywhere; word-break: break-word; font-size: 12px; font-weight: 700; }
.result-list { display: grid; gap: 8px; }
.result-item { padding: 11px; border: 1px solid #e4e9f1; border-radius: 10px; }
.result-item strong { display: block; font-size: 12px; }
.result-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.result-item .customer-360-open { margin-top: 9px; }
.communication-result-item { border-inline-start: 3px solid var(--teal); }
.communication-reply-review { margin-top: 11px; padding: 11px; border: 1px solid #eed39f; border-radius: 10px; background: var(--warning-soft); }
.communication-reply-review > strong { color: #71430c; }
.communication-reply-review > span { white-space: pre-wrap; overflow-wrap: anywhere; }
.communication-reply-review.communication-reply-sent { border-color: #9bd4ca; background: #f1fbf8; }
.communication-reply-review.communication-reply-sent > strong { color: #176963; }
.safety-result { border-color: #f0d29c; background: var(--warning-soft); }
.safety-result h3 { color: var(--warning); }
.approval-reference { margin-top: 11px; padding-top: 11px; border-top: 1px solid rgba(113, 67, 12, .18); }
.approval-reference .result-field { background: rgba(255, 255, 255, .68); }
.approval-reference dd { overflow-wrap: anywhere; }
.safety-strip { margin-top: 11px; padding: 9px; border-radius: 9px; color: #71430c; background: rgba(255, 255, 255, .65); font-size: 10px; line-height: 1.7; }
.result-actions { display: flex; justify-content: flex-end; margin-top: 11px; }
.confirm-order-button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 800; }
.confirm-order-button:hover:not(:disabled), .confirm-order-button:focus-visible { background: #174fab; outline: 3px solid rgba(36, 99, 212, .15); }
.confirm-order-button:disabled { background: #8091a9; }
.confirmed-result { border-color: #9bd4ca; background: #f1fbf8; }
.confirmed-result h3 { color: #176963; }
.evidence-line { margin-top: 10px; color: #7c8798; font-size: 9px; direction: ltr; text-align: start; }
.managed-conversation-response { min-width: 0; }
.managed-conversation-response .message-bubble { overflow-wrap: anywhere; }
.managed-preview-expiry { display: block; margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
.managed-operation-evidence { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; }
.managed-operation-evidence summary { cursor: pointer; }
.managed-receipt-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 6px 12px; direction: ltr; }
.managed-receipt-fields dt, .managed-receipt-fields dd { margin: 0; overflow-wrap: anywhere; }
.managed-original-receipt { white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; font-size: 11px; }
.conversation-feedback { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.conversation-feedback-button { min-height: 30px; padding: 0 10px; border: 1px solid #d4deeb; border-radius: 999px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 700; }
.conversation-feedback-button:hover:not(:disabled), .conversation-feedback-button:focus-visible { color: var(--blue); border-color: #98b2dc; outline: 2px solid rgba(36, 99, 212, .1); }
.conversation-feedback-button:disabled { opacity: .55; }
.conversation-feedback-status { color: var(--teal); font-size: 9px; }
.conversation-suggestion { margin-top: 11px; padding: 12px; border: 1px solid #bed9d4; border-radius: 12px; background: #f1faf8; }
.conversation-suggestion p { margin: 0; color: #245e59; font-size: 11px; line-height: 1.75; }
.conversation-suggestion-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.conversation-suggestion-primary, .conversation-suggestion-secondary { min-height: 32px; padding: 0 11px; border-radius: 9px; font-size: 9px; font-weight: 800; }
.conversation-suggestion-primary { border: 0; color: #fff; background: var(--teal); }
.conversation-suggestion-secondary { border: 1px solid #b7cec9; color: #35625e; background: #fff; }
.conversation-suggestion-primary:focus-visible, .conversation-suggestion-secondary:focus-visible { outline: 3px solid rgba(19, 124, 120, .13); }
.inventory-catalog-detail .workflow-task { gap: 10px; }
.inventory-catalog-attribute-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; }
.inventory-catalog-attribute-form label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.inventory-catalog-attribute-form input { min-height: 34px; border: 1px solid #d7e1ee; border-radius: 8px; padding: 0 9px; background: #fff; color: var(--text); font: inherit; }
.inventory-catalog-attribute-form .workflow-action { align-self: end; min-height: 34px; }
.inventory-catalog-preview { border-color: #9ed7cd; background: #f3fbf9; }
.inventory-catalog-receipt { border-color: #9ebee2; background: #f5f9ff; }
.inventory-catalog-company { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; color: var(--muted); font-size: 11px; }
.inventory-catalog-company strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.inventory-catalog-workspace { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(440px, 1.45fr); gap: 12px; min-height: 0; }
.inventory-catalog-workspace.has-search-results { grid-template-columns: minmax(330px, 1fr) minmax(280px, .8fr) minmax(420px, 1.3fr); }
.inventory-catalog-pane { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: auto; }
.inventory-catalog-pane > h3, .inventory-catalog-pane-header h3 { margin: 0; color: var(--ink); font-size: 13px; }
.inventory-catalog-pane-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-block-end: 10px; }
.inventory-catalog-operation.compact { min-width: 150px; }
.inventory-catalog-tree-body { display: grid; gap: 4px; }
.inventory-catalog-branch { display: grid; gap: 4px; min-width: 0; }
.inventory-catalog-tree-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 5px; align-items: center; }
.inventory-catalog-tree-row > .icon-button { width: 30px; height: 30px; min-width: 30px; }
.inventory-catalog-tree-children { display: grid; gap: 4px; margin-inline-start: 16px; padding-inline-start: 8px; border-inline-start: 1px solid #d7e1ee; }
.inventory-catalog-tree-item { display: grid; grid-template-columns: 34px minmax(78px, auto) minmax(120px, 1fr) auto; gap: 8px; align-items: center; min-width: 0; min-height: 38px; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--ink); background: transparent; text-align: start; cursor: pointer; }
.inventory-catalog-tree-item:hover, .inventory-catalog-tree-item:focus-visible { border-color: #9ebee2; background: #f5f9ff; outline: 0; }
.inventory-catalog-type-mark { color: var(--teal); font-size: 9px; font-weight: 900; }
.inventory-catalog-code { direction: ltr; unicode-bidi: isolate; color: #275f7c; font-size: 10px; font-weight: 800; overflow-wrap: anywhere; }
.inventory-catalog-item-name { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.inventory-catalog-tree-empty { padding: 8px; }
.inventory-catalog-results { display: grid; align-content: start; gap: 8px; }
.inventory-catalog-actions { display: grid; gap: 8px; width: 100%; }
.inventory-catalog-actions h4 { margin: 0; color: var(--ink); font-size: 11px; }
.inventory-catalog-operation { border-block-start: 1px solid #e4eaf1; padding-block-start: 7px; }
.inventory-catalog-operation summary { color: #275f7c; font-size: 11px; font-weight: 800; cursor: pointer; }
.inventory-catalog-operation-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-block-start: 8px; }
.inventory-catalog-operation-form label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.inventory-catalog-operation-form input, .inventory-catalog-operation-form select { width: 100%; min-width: 0; min-height: 36px; padding: 0 9px; border: 1px solid #d7e1ee; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; }
.inventory-catalog-operation-form input:focus, .inventory-catalog-operation-form select:focus { border-color: #72d4c9; outline: 3px solid rgba(114, 212, 201, .18); }
.inventory-catalog-operation-form .workflow-action { align-self: end; min-height: 36px; }
.inventory-catalog-state-action { justify-self: start; }
.inventory-catalog-delete-action { display: grid; justify-items: start; gap: 5px; border-block-start: 1px solid #e4eaf1; padding-block-start: 9px; }
.inventory-catalog-delete-action p { margin: 0; max-width: 70ch; color: var(--muted); font-size: 10px; line-height: 1.7; }
.inventory-catalog-delete-action p.success { color: var(--teal); }
.inventory-catalog-delete-action button:disabled { opacity: .48; cursor: not-allowed; }
.inventory-catalog-preview-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.inventory-catalog-snapshot { min-width: 0; }
.inventory-catalog-snapshot h4 { margin: 0 0 5px; color: var(--muted); font-size: 10px; }
.inventory-catalog-snapshot pre { max-height: 230px; margin: 0; padding: 9px; border: 1px solid #d7e1ee; border-radius: 7px; direction: ltr; overflow: auto; background: #fff; color: var(--ink); font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.inventory-catalog-protected-boundary { margin: 0; color: #35625e; font-size: 10px; font-weight: 800; }
.loading-dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: #8796aa; animation: pulse 1.2s infinite ease-in-out; }
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 70%, 100% { opacity: .28; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

.composer {
  padding: 12px;
  border: 1px solid #ccd6e3;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(16, 42, 86, .08);
}
.composer:focus-within { border-color: #7f9fd3; box-shadow: 0 0 0 4px rgba(36, 99, 212, .08), 0 12px 35px rgba(16, 42, 86, .08); }
.composer textarea { width: 100%; min-height: 60px; max-height: 150px; resize: vertical; padding: 6px 8px; border: 0; outline: 0; color: var(--ink); background: transparent; line-height: 1.7; }
.composer textarea::placeholder { color: #96a2b3; }
.composer textarea:disabled { opacity: .58; }
.voice-status { margin: 2px 8px 9px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.voice-status.recording { color: var(--danger); }
.voice-status.busy { color: var(--blue); }
.voice-status.ready { color: var(--teal); }
.voice-status.error { color: var(--danger); }
.composer-footer { display: flex; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid #edf0f5; }
.composer-meta { display: flex; gap: 7px; color: #8995a6; font-size: 9px; }
.composer-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.microphone-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #b9c8dc; border-radius: 50%; color: var(--teal); background: #fff; }
.microphone-button > span[aria-hidden="true"] { width: 10px; height: 10px; border-radius: 50%; color: transparent; background: currentColor; }
.microphone-button:hover:not(:disabled), .microphone-button:focus-visible { border-color: var(--teal); outline: 3px solid rgba(19, 124, 120, .12); }
.microphone-button.recording { color: #fff; border-color: var(--danger); background: var(--danger); animation: recordingPulse 1.3s ease-in-out infinite; }
.microphone-button:disabled { opacity: .45; cursor: not-allowed; }
@keyframes recordingPulse { 50% { box-shadow: 0 0 0 8px rgba(165, 45, 60, .12); } }
.send-button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 800; }
.send-button:hover:not(:disabled), .send-button:focus-visible { background: #174fab; outline: 3px solid rgba(36, 99, 212, .15); }
.send-button:disabled { background: #a7b4c8; }

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 22, 48, .74);
}
.consent-dialog {
  width: min(560px, 100%);
  padding: 26px;
  border: 1px solid #d7dfeb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(3, 15, 35, .32);
}
.consent-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #754407;
  background: var(--warning-soft);
  font-weight: 900;
}
.consent-dialog h2 { margin: 16px 0 10px; font-size: 19px; }
.consent-dialog p { margin: 9px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.consent-dialog .consent-privacy { padding: 11px; border-radius: 10px; color: #754407; background: var(--warning-soft); }
.consent-dialog .consent-safety { color: #176963; }
.consent-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.consent-accept-button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 800; }
.consent-accept-button:hover, .consent-accept-button:focus-visible { background: #174fab; outline: 3px solid rgba(36, 99, 212, .15); }

.workflow-overlay {
  position: fixed;
  inset: 0;
  z-index: 28;
  display: flex;
  justify-content: flex-end;
  background: rgba(7, 22, 48, .6);
}
[dir="ltr"] .workflow-overlay { justify-content: flex-start; }
.workflow-panel {
  width: min(560px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-inline-start: 1px solid #d7dfeb;
  background: #f7f9fc;
  box-shadow: -24px 0 70px rgba(3, 15, 35, .25);
  overflow-y: auto;
}
[dir="ltr"] .workflow-panel {
  border-inline-start: 0;
  border-inline-end: 1px solid #d7dfeb;
  box-shadow: 24px 0 70px rgba(3, 15, 35, .25);
}
.workflow-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.workflow-header h2 { margin: 0; font-size: 20px; }
.workflow-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.workflow-header-actions { margin-inline-start: auto; display: flex; gap: 8px; }
.workflow-status { min-height: 24px; padding: 14px 2px 4px; color: var(--muted); font-size: 11px; }
.workflow-status.error { color: var(--danger); }
.workflow-status.success { color: var(--teal); }
.inventory-foundation-panel { width: min(1440px, 100%); }
.inventory-foundation-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 280px);
  gap: 10px;
  padding: 14px 0 0;
}
.inventory-foundation-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.inventory-foundation-toolbar input {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}
.inventory-foundation-toolbar input:focus {
  border-color: #72d4c9;
  outline: 3px solid rgba(114, 212, 201, .18);
}
.inventory-foundation-list .result-list h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 13px;
}
@media (max-width: 1100px) {
  .inventory-catalog-workspace, .inventory-catalog-workspace.has-search-results { grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.2fr); }
  .inventory-catalog-workspace.has-search-results .inventory-catalog-results { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 720px) {
  .inventory-catalog-workspace, .inventory-catalog-workspace.has-search-results { grid-template-columns: minmax(0, 1fr); }
  .inventory-catalog-results { grid-column: auto; grid-row: auto; }
  .inventory-catalog-preview-comparison { grid-template-columns: minmax(0, 1fr); }
  .inventory-catalog-tree-item { grid-template-columns: 30px minmax(64px, auto) minmax(70px, 1fr); }
  .inventory-catalog-tree-item .status-chip { grid-column: 2 / -1; justify-self: start; }
}
.company-strong-auth-actions {
  display: grid;
  gap: 10px;
  margin: 8px 0 4px;
  padding: 13px 14px;
  border: 1px solid #d9b96f;
  border-radius: 12px;
  color: var(--ink);
  background: #fffaf0;
}
.company-strong-auth-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.company-strong-auth-actions .workflow-action:first-child {
  border-color: var(--shell-dark);
  color: #fff;
  background: var(--shell-dark);
}
.workflow-list { display: grid; gap: 12px; padding-top: 10px; }
.customer-360-panel { width: min(760px, 100%); }
.customer-360-content { display: grid; gap: 13px; padding-top: 8px; }
.customer-360-section {
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
}
.customer-360-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
}
.customer-360-grid { margin: 0; }
.customer-360-list { display: grid; gap: 8px; }
.customer-360-row,
.customer-360-empty {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #f5f8fb;
  font-size: 10px;
  line-height: 1.7;
}
.customer-360-timeline .customer-360-row {
  border-inline-start: 3px solid var(--teal);
}
.customer-360-entry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd8e5;
}
.customer-360-entry-form input,
.customer-360-entry-form select,
.customer-360-entry-form textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.customer-360-entry-form textarea {
  grid-column: 1 / -1;
  min-height: 70px;
  resize: vertical;
}
.customer-360-entry-form .customer-360-check {
  display: flex;
  grid-column: span 2;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.customer-360-entry-form .customer-360-check input {
  width: auto;
  margin: 0;
}
.customer-360-entry-form .workflow-action { justify-self: start; }
@media (max-width: 620px) {
  .customer-360-entry-form { grid-template-columns: 1fr; }
  .customer-360-entry-form .customer-360-check { grid-column: 1; }
}
.customer-360-privacy {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ead69a;
  border-radius: 11px;
  color: #754407;
  background: var(--warning-soft);
  font-size: 10px;
  line-height: 1.8;
}
.operations-panel { width: min(680px, 100%); }
.identity-administration-panel { width: min(820px, 100%); }
.company-management-panel { width: min(940px, 100%); }
.instagram-administration-panel,
.security-center-panel { width: min(920px, 100%); }
.security-connection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.security-connection-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 7px 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid #bcd8d4;
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #f2faf8);
  text-align: start;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease,
    box-shadow .16s ease;
}
.security-connection-card:hover,
.security-connection-card:focus-visible {
  transform: translateY(-2px);
  border-color: #5fa79f;
  outline: none;
  box-shadow: 0 12px 28px rgba(8, 52, 75, .09);
}
.security-card-icon {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #0f665f;
  background: #d9f4ef;
  font-size: 19px;
}
.security-connection-card strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.security-connection-card > span:not(.security-card-icon) {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.security-connection-card small {
  align-self: end;
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}
.security-detail-view { padding-top: 16px; }
.security-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0 2px;
}
.security-detail-heading > div { flex: 1; }
.security-detail-heading h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 17px;
}
.security-detail-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.security-overview-list { display: grid; gap: 9px; }
.security-overview-row,
.security-api-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9e7e4;
  border-radius: 11px;
  color: var(--ink);
  background: #f8fcfb;
  text-align: start;
}
.security-api-row {
  cursor: pointer;
}
.security-api-row:hover,
.security-api-row:focus-visible {
  border-color: #5fa79f;
  outline: none;
}
.security-overview-row > div,
.security-api-row > div {
  display: grid;
  gap: 4px;
}
.security-overview-row strong,
.security-api-row strong { font-size: 11px; }
.security-overview-row span,
.security-api-row span {
  color: var(--muted);
  font-size: 9px;
}
.security-state-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #176b63;
  background: #e0f4f0;
  font-size: 8px;
  font-weight: 900;
}
.instagram-security-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e8c875;
  border-radius: 12px;
  color: #664b16;
  background: #fff8e5;
  font-size: 11px;
  line-height: 1.8;
}
.instagram-administration-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.instagram-administration-section > h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}
.instagram-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.instagram-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.instagram-form-grid input,
.instagram-form-grid select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c9ddd9;
  border-radius: 9px;
  color: var(--ink);
  background: #f8fcfb;
}
.instagram-form-grid input:focus,
.instagram-form-grid select:focus {
  border-color: #5fa79f;
  outline: 3px solid rgba(23, 120, 111, .1);
}
.security-checkbox-label {
  grid-template-columns: auto 1fr !important;
  align-items: center;
  justify-content: start;
  padding: 9px 11px;
  border: 1px solid #d9e7e4;
  border-radius: 9px;
  background: #f8fcfb;
}
.security-checkbox-label input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
.instagram-form-wide { grid-column: 1 / -1; }
.instagram-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}
.security-form-actions { gap: 10px; }
.instagram-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.instagram-status-item {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f6faf9;
}
.instagram-status-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}
.instagram-status-item span {
  color: var(--ink);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.instagram-url-list { display: grid; gap: 9px; }
.instagram-url-item {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe7e4;
  border-radius: 10px;
  background: #f8fcfb;
  font-size: 10px;
}
.instagram-url-item code {
  direction: ltr;
  overflow-wrap: anywhere;
  color: #176963;
  text-align: left;
}
.instagram-url-state {
  padding: 4px 7px;
  border-radius: 999px;
  color: #76500f;
  background: var(--warning-soft);
  font-size: 9px;
  font-weight: 800;
}
.identity-administration-view { min-width: 0; }
.identity-home-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}
.identity-subview-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}
.identity-subview-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.identity-create-role-action { flex: 0 0 auto; }
.identity-subview-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 12px;
  margin-inline: -24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  box-shadow: 0 8px 20px rgba(16, 42, 86, .08);
}
.identity-subview-header > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.identity-back-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}
.identity-back-button::before {
  content: "←";
  font-size: 15px;
  line-height: 1;
}
[dir="rtl"] .identity-back-button::before { content: "→"; }
.identity-create-role-section { margin-top: 14px; }
.identity-administration-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.identity-administration-section > h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}
.identity-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.identity-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.identity-form-grid input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d5dde8;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.identity-form-grid input:focus {
  border-color: #9db5db;
  outline: 3px solid rgba(36, 99, 212, .08);
}
.identity-form-wide { grid-column: 1 / -1; }
.identity-helper {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.identity-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.identity-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  color: var(--ink);
  background: #fafcff;
  font-size: 9px;
  overflow-wrap: anywhere;
}
.identity-option input { flex: 0 0 auto; accent-color: var(--blue); }
.identity-option:has(input:disabled) { opacity: .65; }
.identity-permission-option-group {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
}
.identity-permission-option-group > h4 {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.identity-role-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.identity-role-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 8px 24px rgba(20, 44, 78, .045);
}
.identity-role-card.rejected { opacity: .72; }
.identity-role-card.recently-created {
  border-color: #6ebeb4;
  background: linear-gradient(145deg, #fff, #effaf7);
  box-shadow: 0 0 0 3px rgba(45, 89, 67, .1),
    0 10px 28px rgba(20, 82, 69, .09);
}
.identity-role-card.recently-created:focus {
  outline: 3px solid rgba(36, 99, 212, .16);
  outline-offset: 3px;
}
.identity-role-card-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.identity-role-kind {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #176963;
  background: var(--teal-soft);
  font-size: 8px;
  font-weight: 850;
}
.identity-role-card-heading h3,
.identity-role-detail-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.identity-role-card-description,
.identity-role-detail-header p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.identity-role-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.identity-role-category {
  padding: 4px 7px;
  border: 1px solid #dfe7f2;
  border-radius: 999px;
  color: #334760;
  background: #f5f8fc;
  font-size: 8px;
  font-weight: 750;
}
.identity-role-category.muted { color: var(--muted); }
.identity-role-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #e8edf4;
}
.identity-role-metrics,
.identity-role-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.identity-role-metric {
  display: grid;
  gap: 1px;
  min-width: 48px;
}
.identity-role-metric strong {
  color: var(--ink);
  font-size: 13px;
}
.identity-role-metric small {
  color: var(--muted);
  font-size: 8px;
}
.identity-role-detail-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(18, 32, 52, .36);
  backdrop-filter: blur(2px);
}
.identity-role-detail-drawer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(520px, 94vw);
  height: 100%;
  padding: 22px;
  overflow: auto;
  border-inline-start: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 45px rgba(14, 37, 67, .16);
}
[dir="rtl"] .identity-role-detail-drawer {
  box-shadow: 18px 0 45px rgba(14, 37, 67, .16);
}
.identity-role-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.identity-role-detail-header > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.identity-role-detail-header p {
  display: block;
  max-width: 60ch;
  -webkit-line-clamp: initial;
}
.identity-permission-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.identity-permission-search input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d5dde8;
  border-radius: 9px;
  color: var(--ink);
  background: #fbfdff;
}
.identity-permission-groups {
  display: grid;
  gap: 14px;
}
.identity-permission-group {
  display: grid;
  gap: 7px;
}
.identity-permission-group > h4 {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}
.identity-permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.identity-permission-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  background: #f9fbfd;
  font-size: 9px;
  line-height: 1.55;
}
.identity-permission-row input {
  flex: 0 0 auto;
  accent-color: var(--blue);
}
.identity-permission-mark {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #176963;
  background: var(--teal-soft);
  font-weight: 900;
}
.identity-technical-details {
  padding: 10px;
  border: 1px dashed #d7e0eb;
  border-radius: 9px;
  color: var(--muted);
  background: #fafcff;
  font-size: 9px;
}
.identity-technical-details summary {
  cursor: pointer;
  color: #334760;
  font-weight: 850;
}
.identity-technical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0;
}
.identity-technical-grid > div {
  min-width: 0;
  padding: 7px;
  border-radius: 7px;
  background: #fff;
}
.identity-technical-grid dt {
  color: var(--muted);
  font-size: 8px;
}
.identity-technical-grid dd {
  margin: 2px 0 0;
  direction: ltr;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-align: start;
}
.identity-impact .safety-note {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 9px;
  color: #176963;
  background: var(--teal-soft);
  font-size: 10px;
  line-height: 1.7;
}

.company-management-layout { display: grid; gap: 14px; padding: 8px 0 28px; }
.company-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(16, 42, 86, .05);
}
.company-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.company-section-heading > :last-child { margin-inline-start: auto; }
.company-section-heading h3,
.company-proposal h4 { margin: 0; font-size: 15px; }
.company-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.company-state-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #76500f;
  background: var(--warning-soft);
  font-size: 9px;
  font-weight: 800;
}
.company-state-pill.verified { color: #176963; background: var(--teal-soft); }
.company-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.company-form-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-form label,
.company-inline-form label,
.company-form fieldset {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.company-form input,
.company-form select,
.company-form textarea,
.company-inline-form input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.company-form textarea { resize: vertical; line-height: 1.6; }
.company-form input:focus,
.company-form select:focus,
.company-form textarea:focus,
.company-inline-form input:focus {
  border-color: #6c9a8a;
  outline: 3px solid rgba(45, 89, 67, .10);
}
.company-field-wide,
.company-form-actions { grid-column: 1 / -1; }
.company-form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.company-inline-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.company-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.company-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #dbe3eb;
  border-radius: 13px;
  background: #fbfdfc;
}
.company-card.active { border-color: #74a393; box-shadow: 0 0 0 3px rgba(45, 89, 67, .08); }
.company-card h4 { margin: 0; font-size: 13px; }
.company-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.company-card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.company-proposal {
  padding: 14px;
  border: 1px solid #b7d5cb;
  border-radius: 12px;
  background: #f1faf7;
}
.company-proposal p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.company-confirm {
  display: flex !important;
  align-items: flex-start;
  gap: 8px !important;
  padding: 10px;
  border-radius: 10px;
  color: var(--ink) !important;
  background: #f7f9fc;
  line-height: 1.7;
}
.company-confirm input { width: auto; min-height: auto; margin-top: 2px; accent-color: var(--shell-dark); }
.company-role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.company-role-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px;
  border: 1px solid #e0e6ef;
  border-radius: 9px;
  color: var(--ink);
  background: #fafcff;
  font-size: 9px;
  line-height: 1.55;
}
.company-role-option input { width: auto; min-height: auto; flex: 0 0 auto; accent-color: var(--shell-dark); }
.operations-section { display: grid; gap: 10px; }
.operations-section > h3 {
  margin: 8px 2px 0;
  color: var(--ink);
  font-size: 13px;
}
.operations-section > .operations-subheading { margin-top: 16px; }
.operations-section .safety-note {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 9px;
  color: #176963;
  background: var(--teal-soft);
  font-size: 10px;
  line-height: 1.7;
}
.workflow-empty {
  padding: 30px 20px;
  border: 1px dashed #cbd5e2;
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-size: 12px;
}
.workflow-task {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 42, 86, .06);
}
.workflow-task.actionable { border-color: #b8dcd7; }
.workflow-task.completed { border-color: #a6d8cf; background: #f5fcfa; }
.workflow-task.rejected { border-color: #efc2c8; background: #fff8f9; }
.workflow-task-header { display: flex; align-items: flex-start; gap: 10px; }
.workflow-task-header h3 { margin: 0; font-size: 13px; }
.workflow-task-header p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.workflow-state {
  margin-inline-start: auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #76500f;
  background: var(--warning-soft);
  font-size: 9px;
  font-weight: 800;
}
.workflow-task.completed .workflow-state { color: #176963; background: var(--teal-soft); }
.workflow-task.rejected .workflow-state { color: var(--danger); background: var(--danger-soft); }
.workflow-payload { margin-top: 12px; }
.workflow-role {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.workflow-reason {
  width: 100%;
  min-height: 58px;
  margin-top: 11px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #d5dde8;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
.workflow-reason:focus { border-color: #9db5db; outline: 3px solid rgba(36, 99, 212, .08); }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.workflow-action {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #b8c7db;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.workflow-action.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.workflow-action.danger { border-color: #e1a8b0; color: var(--danger); background: var(--danger-soft); }
.workflow-action:hover:not(:disabled), .workflow-action:focus-visible { outline: 3px solid rgba(36, 99, 212, .1); }
.workflow-action:disabled { opacity: .55; cursor: wait; }

.voice-response-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.voice-response-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #9fb8d8;
  border-radius: 999px;
  color: var(--blue);
  background: #f7faff;
  font-size: 10px;
  font-weight: 800;
}
.voice-response-button:hover:not(:disabled),
.voice-response-button:focus-visible {
  outline: 3px solid rgba(36, 99, 212, .1);
}
.voice-response-button-primary {
  border-color: #17786f;
  color: #fff;
  background: #17786f;
}
.voice-response-button:disabled { opacity: .55; cursor: wait; }
.voice-response-status { color: var(--muted); font-size: 9px; }

.busy-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 14px; color: #fff; background: rgba(7, 22, 48, .82); font-size: 13px; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #64d2c8; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
.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; }

.notification-card.resolution-resolved {
  border-color: #2f9e71;
  box-shadow: inset 0 0 0 1px rgba(47, 158, 113, 0.2);
}

.notification-card.resolution-resolved .workflow-state {
  background: #dff5e9;
  color: #176444;
}

.notification-card.resolution-reopened {
  border-color: #d68527;
}

.local-sandbox-banner {
  position: fixed;
  z-index: 1000;
  inset-block-start: 0;
  inset-inline: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 16px;
  color: #1f1300;
  background: #ffbf47;
  border-block-end: 2px solid #8a4b00;
  font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.local-sandbox-banner[hidden] { display: none; }

.idle-warning-panel {
  max-width: 560px;
  margin: auto;
  text-align: center;
}

.email-second-step-panel {
  width: min(680px, 100%);
  margin: auto;
}

.email-second-step-controls {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.toggle-row,
.confirmation-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toggle-row {
  justify-content: space-between;
  padding-block: 14px;
  border-block: 1px solid var(--border);
}

.toggle-row span {
  display: grid;
  gap: 5px;
}

.toggle-row small,
.confirmation-row span {
  color: var(--muted);
}

.toggle-row input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.confirmation-row {
  align-items: flex-start;
}

.confirmation-row input {
  margin-top: 3px;
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .app-shell, [dir="rtl"] .app-shell {
    grid-template-columns: 1fr;
    background-image: var(--shell-relief-light);
    background-position: left top;
    background-size: var(--shell-relief-size-mobile);
    background-repeat: repeat;
  }
  .sidebar { position: fixed; inset-block: 0; left: 0; right: auto; z-index: 15; width: min(292px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(3, 15, 35, .25); background-color: var(--shell-dark); background-image: var(--shell-relief-dark); background-position: left top; background-size: var(--shell-relief-size-mobile); background-repeat: repeat; }
  [dir="rtl"] .sidebar { left: auto; right: 0; transform: translateX(105%); box-shadow: -20px 0 50px rgba(3, 15, 35, .25); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { min-height: 0; padding: 14px 18px; background-position: left top; background-size: var(--shell-relief-size-mobile); }
  .main-panel { background: transparent; }
  .topbar-title p { display: none; }
  .conversation { width: min(100% - 26px, 760px); }
}

@media (max-width: 580px) {
  .topbar { min-height: clamp(162px, 45.25vw, 190px); flex-wrap: wrap; gap: 10px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-actions { flex: 1 0 100%; width: 100%; justify-content: flex-start; }
  .active-user-indicator { flex: 1 1 100%; max-width: none; }
  .topbar-actions .secondary-button { padding-inline: 9px; font-size: 10px; }
  .language-control { margin-inline-start: auto; }
  .conversation { min-height: calc(100vh - clamp(162px, 45.25vw, 190px)); padding-top: 16px; }
  .messages { padding-inline: 0; }
  .welcome-card { padding: 24px 18px; }
  .welcome-card h2 { font-size: 19px; }
  .message { max-width: 94%; }
  .result-card { min-width: min(88vw, 480px); }
  .result-grid { grid-template-columns: 1fr; }
  .composer-meta .separator, .composer-meta span:last-child { display: none; }
  .consent-actions { flex-direction: column-reverse; }
  .consent-actions button { width: 100%; }
  .workflow-panel { padding: 18px; }
  .workflow-header { align-items: stretch; flex-direction: column; }
  .workflow-header-actions { width: 100%; margin-inline-start: 0; }
  .workflow-header-actions .secondary-button { flex: 1; }
  .identity-subview-header {
    align-items: stretch;
    flex-direction: column;
    margin-inline: -18px;
    padding-inline: 18px;
  }
  .identity-create-role-action,
  .identity-back-button { width: 100%; }
  .identity-form-grid, .identity-option-grid,
  .identity-role-card-list, .identity-permission-list,
  .instagram-form-grid, .instagram-status-grid,
  .security-connection-grid, .company-form,
  .company-form-wide, .company-card-list,
  .company-role-list {
    grid-template-columns: 1fr;
  }
  .company-inline-form { grid-template-columns: 1fr; }
  .company-section-heading { flex-direction: column; }
  .company-section-heading > :last-child { margin-inline-start: 0; }
  .company-switcher { flex: 1 1 100%; }
  .company-switcher select { width: 100%; }
  .security-detail-heading { flex-direction: column; }
  .security-back-button { align-self: stretch; }
  .instagram-form-wide { grid-column: auto; }
  .instagram-url-item { grid-template-columns: 1fr; }
}

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