:root {
  color-scheme: light;
  --bg: #edf2f6;
  --bg-soft: #f7f9fb;
  --panel: #ffffff;
  --line: rgba(38, 84, 124, 0.16);
  --text: #122236;
  --dark-text: #102033;
  --muted: #5d7290;
  --muted-dark: #66758a;
  --accent: #5bb9e8;
  --accent-dark: #1e6d9f;
  --navy: #111827;
  --navy-2: #1f3b56;
  --surface-blue: #edf8ff;
  --danger: #d92d20;
  --shadow: 0 18px 50px rgba(9, 32, 56, 0.12);
  --shadow-soft: 0 10px 28px rgba(9, 32, 56, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(115deg, rgba(31, 59, 86, 0.06) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 8% 0%, rgba(91, 185, 232, 0.18), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(17, 24, 39, 0.12), transparent 30%),
    var(--bg);
  background-size: 88px 88px, auto, auto, auto;
  color: var(--text);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(11, 111, 174, 0.05) 8.1% 8.2%, transparent 8.3% 100%),
    linear-gradient(135deg, transparent 0 42%, rgba(11, 111, 174, 0.08) 42.1% 42.25%, transparent 42.35% 100%);
  opacity: 0.9;
}
a { color: inherit; text-decoration: none; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(90deg, #111827, #1f3b56);
  border-bottom: 1px solid rgba(148, 180, 208, 0.22);
  box-shadow: 0 14px 34px rgba(3, 15, 29, 0.18);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand img {
  width: 92px;
  height: auto;
  display: block;
  filter: invert(1) brightness(2.2);
}
nav { display: flex; align-items: center; gap: 18px; color: #c9ddf3; font-size: 14px; }
nav a {
  padding: 8px 10px;
  border-radius: 6px;
}
nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.header-tenant-selector {
  margin: 0;
}
.header-tenant-selector select {
  width: 150px;
  min-height: 30px;
  padding: 5px 28px 5px 10px;
  border-radius: 6px;
  border-color: rgba(89, 199, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  position: relative;
  z-index: 1;
}
.site-footer {
  position: fixed;
  right: 24px;
  bottom: 14px;
  z-index: 8;
  color: #334c63;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(30, 87, 130, 0.14);
  box-shadow: 0 10px 30px rgba(9, 32, 56, 0.1);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
}
.generation-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 11, 24, 0.72);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.generation-overlay.is-visible {
  display: grid;
}
.generation-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 8px;
  border: 1px solid rgba(89, 199, 255, 0.45);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  color: var(--dark-text);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.generation-card img {
  width: 96px;
  height: auto;
  display: block;
}

.login-body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(71, 184, 238, 0.26), transparent 28%),
    linear-gradient(135deg, #06182d, #0b2d49 58%, #071d34);
}
.ai-lines {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(89, 199, 255, 0.24) 18.1% 18.2%, transparent 18.3% 100%),
    linear-gradient(60deg, transparent 0 62%, rgba(89, 199, 255, 0.18) 62.1% 62.25%, transparent 62.35% 100%);
  opacity: 0.8;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(71, 184, 238, 0.22);
  border-radius: 14px;
  padding: 38px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
  color: var(--dark-text);
}
.login-logo {
  width: 260px;
  max-width: 100%;
  display: block;
  margin: 0 0 28px;
}
h1 { margin: 0; font-size: 32px; line-height: 1.15; }
h2 { margin: 0 0 16px; font-size: 18px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.muted, .meta { color: var(--muted); }
.login-panel .muted { color: #53657a; }
.page-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #111827, #25455f),
    var(--navy);
  border: 1px solid rgba(128, 204, 245, 0.18);
  box-shadow: var(--shadow);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(28deg, transparent 0 64%, rgba(92, 207, 255, 0.2) 64.1% 64.25%, transparent 64.45% 100%),
    linear-gradient(148deg, transparent 0 60%, rgba(92, 207, 255, 0.18) 60.1% 60.25%, transparent 60.45% 100%),
    linear-gradient(12deg, transparent 0 72%, rgba(92, 207, 255, 0.14) 72.1% 72.24%, transparent 72.44% 100%),
    radial-gradient(circle at 63% 28%, rgba(92, 207, 255, 0.46) 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 78% 38%, rgba(92, 207, 255, 0.34) 0 2px, transparent 2.7px),
    radial-gradient(circle at 69% 64%, rgba(92, 207, 255, 0.3) 0 2px, transparent 2.7px),
    radial-gradient(circle at 88% 72%, rgba(92, 207, 255, 0.42) 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 93% 34%, rgba(92, 207, 255, 0.26) 0 1.8px, transparent 2.5px);
  opacity: 0.24;
}
.page-head::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: min(420px, 46%);
  aspect-ratio: 3.76 / 1;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.11;
  filter: grayscale(1) invert(1) brightness(1.8) contrast(0.75);
  background: center / contain no-repeat url("/logo-luzuno.png");
}
.page-head > * {
  position: relative;
  z-index: 2;
}
.page-head h1 { color: #ffffff; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.support-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}
.support-video-panel {
  background: var(--panel);
  border: 1px solid rgba(89, 199, 255, 0.22);
  border-radius: 8px;
  color: var(--dark-text);
  padding: 18px;
}
.support-video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #020617;
  aspect-ratio: 3 / 2;
}
.support-video-wrap video,
.support-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.support-preview-image {
  position: absolute;
  inset: 0;
}
.support-preview-image.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.support-connecting {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-weight: 800;
}
.support-connecting.is-visible {
  display: grid;
}
.support-phone-button {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  min-height: 62px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}
.support-phone-button svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}
.support-phone-button:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: translateX(-50%) scale(1.06);
}
.support-phone-button.is-hidden {
  display: none;
}
.support-end-button {
  display: none;
  background: rgba(239, 68, 68, 0.24);
  color: #fecaca;
}
.support-end-button.is-visible {
  display: inline-flex;
}
.support-controls {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.support-call-hint {
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.support-round-button {
  width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: #e8f5ff;
  color: #075985;
  font-size: 26px;
  line-height: 1;
}
.support-personas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.support-persona {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fbff;
  border: 1px solid #d6e1ef;
  color: var(--dark-text);
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
}
.support-persona.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(89, 199, 255, 0.16);
}
.support-persona img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}
.support-chat-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
.support-transcript {
  flex: 1;
  min-height: 420px;
  max-height: 620px;
  overflow-y: auto;
  border: 1px solid #d6e1ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}
.support-chat-input {
  margin-top: 12px;
}
.support-chat-input input:disabled {
  background: #eef4fb;
  color: var(--muted-dark);
}
.support-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.support-message span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
}
.support-message p {
  max-width: 84%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f5ff;
  color: var(--dark-text);
  line-height: 1.4;
}
.support-message.is-user {
  align-items: flex-end;
}
.support-message.is-user p {
  background: var(--accent);
  color: #052035;
}
.support-error {
  display: none;
  margin-top: 12px;
}
.support-error.is-visible {
  display: block;
}
.agent-card, .panel {
  background: var(--panel);
  border: 1px solid rgba(30, 87, 130, 0.12);
  border-radius: 14px;
  color: var(--dark-text);
  box-shadow: var(--shadow-soft);
}
.agent-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #f8fafc;
}
.agent-card::before {
  content: none;
}
.agent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(71, 184, 238, 0.45);
  box-shadow: 0 22px 54px rgba(9, 32, 56, 0.16);
}
.agent-card-media {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 236px;
  padding: 18px 20px 16px;
  background:
    linear-gradient(145deg, rgba(17, 24, 39, 0.92), rgba(31, 59, 86, 0.82)),
    #172033;
}
.agent-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.24) 8.1% 34%, transparent 34.2% 100%) 0 18% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 18%, rgba(92, 207, 255, 0.28) 18.1% 62%, transparent 62.2% 100%) 0 34% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.22) 42.1% 86%, transparent 86.2% 100%) 0 52% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 10%, rgba(92, 207, 255, 0.18) 10.1% 48%, transparent 48.2% 100%) 0 72% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 58%, rgba(255, 255, 255, 0.18) 58.1% 94%, transparent 94.2% 100%) 0 88% / 100% 1px no-repeat,
    linear-gradient(28deg, transparent 0 54%, rgba(255, 255, 255, 0.12) 54.1% 54.24%, transparent 54.44% 100%),
    linear-gradient(152deg, transparent 0 58%, rgba(92, 207, 255, 0.14) 58.1% 58.24%, transparent 58.44% 100%),
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.42) 0 1.8px, transparent 2.4px),
    radial-gradient(circle at 62% 52%, rgba(92, 207, 255, 0.38) 0 1.8px, transparent 2.4px),
    radial-gradient(circle at 86% 88%, rgba(255, 255, 255, 0.3) 0 1.6px, transparent 2.2px);
  opacity: 0.58;
}
.agent-card-media::after {
  content: none;
}
.agent-card-media > * {
  position: relative;
  z-index: 2;
}
.agent-card-media .pill {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.agent-card-title {
  width: 100%;
  margin-bottom: 14px;
  padding-right: 92px;
  align-self: stretch;
}
.agent-card h2 {
  margin: 0;
  font-size: 22px;
  color: #ffffff;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
}
.agent-card-photo {
  width: min(196px, 72%);
  aspect-ratio: 1;
  border-radius: 18px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.agent-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 24px rgba(12, 74, 110, 0.16);
}
.profile-preview {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.profile-image {
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 28px rgba(12, 74, 110, 0.16);
}
.avatar-placeholder {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, #cbd5e1 0 14%, transparent 14.5%),
    radial-gradient(circle at 50% 92%, #cbd5e1 0 34%, transparent 34.5%),
    linear-gradient(145deg, #ffffff, #f1f5f9);
}
.profile-image.avatar-placeholder {
  min-height: 240px;
}
.tag, .pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e3edf5;
  color: #075985;
  font-size: 12px;
  font-weight: 700;
  margin: 0 6px 6px 0;
}
.muted-pill { background: #eef3f8; color: #596579; }
.active-pill { background: #dcfce7; color: #166534; }
.inactive-pill { background: #fee2e2; color: #991b1b; }
.agent-grid, .details {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  color: var(--muted-dark);
  font-size: 14px;
}
.persona-grid {
  grid-template-columns: 148px 1fr;
  row-gap: 6px;
  column-gap: 12px;
  line-height: 1.25;
  padding: 16px 20px 12px;
  background: #ffffff;
}
.persona-grid span {
  display: flex;
  align-items: center;
  color: #15324c;
  font-weight: 800;
  background: transparent;
  padding: 0;
  font-size: 13px;
}
.persona-grid strong {
  min-height: 0;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 600;
  font-style: normal;
  padding: 0;
  color: #26394e;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}
.agent-tags {
  margin: 0;
  padding: 0 20px 18px;
  background: #ffffff;
}
.agent-grid strong, .details dd {
  color: var(--dark-text);
  margin: 0;
}
.details dt { color: var(--muted-dark); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  margin-bottom: 16px;
}
.clients-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.clients-list {
  position: sticky;
  top: 92px;
}
.clients-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.clients-list-head h2 {
  margin: 0;
}
.client-export-actions {
  display: inline-flex;
  gap: 8px;
}
.client-export-actions .primary,
.client-export-actions .secondary {
  min-height: 34px;
  padding: 8px 11px;
  font-size: 12px;
}
.client-list-items {
  display: grid;
  gap: 8px;
}
.client-search {
  position: relative;
  margin-bottom: 12px;
}
.client-search span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #53657a;
  font-size: 18px;
  font-weight: 900;
  pointer-events: none;
}
.client-search input {
  padding-left: 38px;
}
.client-list-item {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid #dce8f2;
  border-radius: 10px;
  background: #f8fbfe;
}
.client-list-item:hover,
.client-list-item.is-selected {
  border-color: #88bee0;
  background: #edf8ff;
}
.client-list-item.is-search-selected {
  border-color: #0f2f4a;
  background: #0f2f4a;
  box-shadow: 0 10px 24px rgba(15, 47, 74, 0.18);
}
.client-list-item.is-search-selected strong,
.client-list-item.is-search-selected span {
  color: #ffffff;
}
.client-list-item strong {
  color: #173650;
  font-size: 14px;
}
.client-list-item span {
  color: #66758a;
  font-size: 12px;
}
.clients-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.side-stack {
  display: flex;
  flex-direction: column;
}
.agent-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}
.editor-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}
.quadrant-prompt {
  flex: 1;
  min-height: 520px;
}
.quadrant-prompt .prompt-editor {
  flex: 1;
}
.compact-form {
  margin: 0;
}
.upload-form {
  border-top: 1px solid #e0e8f2;
  padding-top: 12px;
}
.voice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-actions audio {
  display: none;
}
.anub-tools-panel {
  gap: 14px;
}
.anub-integrations-panel {
  gap: 12px;
}
.integration-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.app-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  color: var(--dark-text);
  box-shadow: 0 32px 90px rgba(3, 15, 29, 0.35);
}
.app-dialog::backdrop {
  background: rgba(3, 11, 24, 0.72);
  backdrop-filter: blur(6px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #d8e5ef;
  background: #f8fbfe;
}
.dialog-head h2 {
  margin: 0;
}
.integration-dialog-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
  gap: 20px;
  padding: 22px;
  overflow: auto;
}
.integration-dialog-body h3 {
  margin: 0 0 10px;
  color: #123957;
}
.integration-accordion {
  display: grid;
  align-content: start;
  gap: 10px;
}
.integration-toggle {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d8e5ef;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  color: var(--dark-text);
  box-shadow: 0 10px 26px rgba(9, 32, 56, 0.08);
}
.integration-toggle:hover {
  border-color: #88bee0;
  background: #f8fbfe;
  transform: translateY(-1px);
}
.integration-toggle span:not(.pill):not(.google-logo):not(.microsoft-logo) {
  display: grid;
  gap: 2px;
  text-align: left;
}
.integration-toggle strong {
  color: #123957;
  font-size: 15px;
}
.integration-toggle small {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}
.google-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(66, 133, 244, 0.16);
}
.google-logo svg {
  width: 28px;
  height: 28px;
  display: block;
}
.microsoft-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 120, 212, 0.16);
}
.microsoft-logo span:nth-child(1) { background: #f25022; }
.microsoft-logo span:nth-child(2) { background: #7fba00; }
.microsoft-logo span:nth-child(3) { background: #00a4ef; }
.microsoft-logo span:nth-child(4) { background: #ffb900; }
.integration-panel {
  display: none;
  padding: 14px;
  border: 1px solid #d8e5ef;
  border-radius: 12px;
  background: #f8fbfe;
}
.integration-panel.is-open {
  display: block;
}
.oauth-connect-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #b8daf0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #eaf6fd);
  box-shadow: 0 10px 24px rgba(10, 64, 100, 0.08);
}
.oauth-connect-box p {
  margin: 0;
  color: #37566f;
  font-size: 13px;
  line-height: 1.45;
}
.integration-connect {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}
.manual-config-title {
  margin: 2px 0 10px;
  color: #123957;
  font-size: 14px;
}
.integration-summary {
  min-width: 0;
  overflow-x: auto;
}
.compact-table th,
.compact-table td {
  padding: 9px;
  font-size: 13px;
}
.tool-list {
  display: grid;
  gap: 12px;
}
.tool-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e5ef;
  border-radius: 10px;
  background: #f8fbfe;
}
.tool-item strong {
  color: #123957;
}
.tool-item span,
.tool-item p {
  margin: 3px 0 0;
  color: var(--muted-dark);
  font-size: 13px;
}
.tool-meta {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 10px;
  font-size: 12px;
  margin: 0;
}
.tool-meta dt {
  color: #123957;
  font-weight: 800;
}
.tool-meta dd {
  margin: 0;
  min-width: 0;
  color: var(--dark-text);
}
.tool-meta code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: #eaf4fb;
  padding: 6px;
}
.tool-meta pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
}
.tool-form {
  border-top: 1px solid #e0e8f2;
  padding-top: 12px;
}
.tool-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.compact-empty {
  margin-bottom: 0;
}
.panel { padding: 20px; margin-bottom: 16px; }
.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #d8e6f1, #96c7e8);
  color: #0f3655;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}
.section-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.section-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 13px; color: var(--muted-dark); font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid #cbdbea;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: var(--dark-text);
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #075985 50%),
    linear-gradient(135deg, #075985 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(89, 199, 255, 0.22);
  border-color: var(--accent);
}
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.prompt-editor {
  min-height: 310px;
}
button, .primary, .secondary, .danger {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}
.primary {
  background: #123957;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 57, 87, 0.22);
}
.primary:hover {
  background: #1e5c88;
  box-shadow: 0 14px 30px rgba(18, 57, 87, 0.3);
  transform: translateY(-1px);
}
.secondary { background: #e8f5ff; color: #075985; border: 1px solid #c6e6fa; }
.danger { background: #fee4e2; color: var(--danger); }
.wide { width: 100%; margin-top: 16px; }
.notice, .alert, .empty {
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}
.compact-alert {
  margin-bottom: 6px;
  padding: 10px;
  font-size: 13px;
}
.notice { background: #e5f6ff; color: #075985; border: 1px solid #b8e8ff; }
.alert { background: #fff1f0; color: var(--danger); border: 1px solid #ffc9c4; }
.empty { background: #fff; border: 1px dashed #b9c9dc; color: var(--muted-dark); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e0e8f2; vertical-align: top; }
td span { display: block; color: var(--muted-dark); font-size: 13px; margin-top: 2px; }
.inline-form { display: inline-flex; gap: 8px; margin: 0 8px 8px 0; }
.inline-form input { width: 210px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.billing-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}
.billing-client-form,
.billing-margin-form {
  align-items: end;
}
.billing-margin-form input {
  width: 140px;
}
.billing-client-summary {
  display: grid;
  gap: 2px;
  margin-right: auto;
}
.billing-client-summary span {
  color: var(--muted-dark);
  font-size: 13px;
}
.billing-params {
  display: grid;
  gap: 16px;
}
.billing-params h3 {
  margin: 4px 0 10px;
  color: #123957;
  font-size: 15px;
}
.billing-concept-form input[name="description"] {
  width: min(360px, 100%);
}
.billing-concept-form input[name="amount_usd"],
.billing-concepts-table td:nth-child(2),
.billing-concepts-table th:nth-child(2) {
  width: 160px;
}
.billing-concepts-table {
  margin-top: 8px;
}
.billing-totals .details {
  max-width: 520px;
}
.billing-table-panel {
  overflow-x: auto;
}
.billing-table {
  min-width: 920px;
}
.billing-table th {
  color: #123957;
  font-size: 12px;
}
.billing-table td,
.billing-table th {
  padding: 10px;
}
.billing-table tfoot th {
  background: #eaf4fb;
  border-bottom: 0;
}
.invoice-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 24, 42, 0.74);
  z-index: 80;
}
.invoice-modal.is-visible {
  display: flex;
}
.invoice-dialog {
  width: min(980px, 96vw);
  height: min(760px, 92vh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.invoice-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.invoice-dialog iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #d7e4ef;
  border-radius: 8px;
}

@media (max-width: 780px) {
  .topbar { align-items: flex-start; height: auto; padding: 16px; flex-direction: column; }
  .brand img { width: 76px; }
  nav { flex-wrap: wrap; }
  main { padding: 18px; }
  .page-head, .split, .agent-editor-grid, .support-shell, .clients-layout, .clients-main, .integration-dialog-body { display: block; }
  .integration-summary { margin-top: 18px; }
  .billing-toolbar { align-items: stretch; }
  .site-footer { position: static; margin: 0 18px 18px auto; width: fit-content; }
  .header-tenant-selector select { width: 170px; }
  .editor-column { display: block; }
  .page-head .secondary { margin-top: 14px; }
  .inline-form, .inline-form input { width: 100%; }
}
