:root {
  --green: #164f40;
  --mint: #eaf3ed;
  --ink: #19382e;
  --muted: #63756c;
  --line: #e3ebe6;
  --bg: #f6f8f6;
  --lime: #dcf49c;
  --shadow: 0 8px 32px #14392d06;
  --radius: 18px;
}
body {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #479d7e;
  outline-offset: 3px;
}
button,
a.btn {
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.btn {
  border-radius: 11px;
  min-height: 42px;
  padding: 11px 17px;
  font-weight: 620;
  letter-spacing: -0.15px;
  box-shadow: none;
}
.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #173f3412;
}
.btn.secondary {
  background: #fff;
  color: #244a3c;
  border: 1px solid #dce6df;
}
.btn.ghost {
  background: transparent;
  color: var(--green);
}
.btn.danger {
  color: #a43131;
  background: #fff1ef;
}
input,
select,
textarea {
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #fff;
  min-height: 43px;
  padding: 11px 12px;
  color: #234235;
}
input::placeholder,
textarea::placeholder {
  color: #7b8880;
}
label {
  font-weight: 550;
  color: #395247;
}
textarea {
  line-height: 1.65;
}
p,
small {
  color: var(--muted);
}
.badge {
  border: 0;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f3f1;
  color: #53695c;
}
.badge.green {
  background: #e7f4ea;
  color: #276847;
}
.badge.amber {
  background: #fff3dc;
  color: #8a5b16;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  background: #fff;
}
.card-head {
  gap: 12px;
}
.card-head h2 {
  font-size: 18px;
}
.notice,
.commercial-notice,
.readonly-note {
  border-radius: 12px;
  line-height: 1.7;
}
.table-wrap {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  max-width: 100%;
  overflow: auto;
}
table th {
  background: #f7f9f7;
  text-transform: none;
  font-size: 12px;
  font-weight: 650;
  color: #52695b;
  padding: 15px;
}
table td {
  padding: 16px 15px;
  border-bottom: 1px solid #edf1ee;
  font-size: 13px;
}
table tbody tr:hover {
  background: #fafcf9;
}
table td .actions {
  gap: 6px;
}
.empty {
  padding: 48px 25px;
}
.empty h3 {
  font-size: 19px;
}
.empty-icon {
  border-radius: 20px;
  background: #edf4e9;
  color: #507952;
}
.formgrid {
  gap: 20px;
}
.formfooter {
  gap: 12px;
}
.formfooter .btn {
  min-width: 112px;
}
dialog {
  border-radius: 22px;
  border: 1px solid #dde7df;
  box-shadow: 0 24px 100px #0b2e3030;
  max-width: min(720px, calc(100vw - 32px));
  max-height: 88dvh;
  padding: 28px;
}
dialog::backdrop {
  background: #102d2759;
  backdrop-filter: blur(4px);
}
.modal-head,
.modalhead {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2,
.modalhead h2 {
  font-size: 23px;
  font-weight: 650;
}
.close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f1;
  color: #4d6658;
  font-size: 24px;
}
.error,
.status-error {
  border-radius: 10px;
  line-height: 1.6;
}
#toast {
  border-radius: 14px;
  background: #193e32;
  box-shadow: 0 10px 35px #173f3425;
  max-width: calc(100vw - 32px);
  line-height: 1.6;
}
.product-app .layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100dvh;
}
.product-app .sidebar {
  position: sticky;
  top: 0;
  width: auto;
  height: 100dvh;
  padding: 20px 15px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-app .sidebar .logo {
  padding: 0 8px 12px;
}
.product-app .sidebar .prosanina-logo {
  width: 214px;
}
.product-app .workspace {
  padding: 12px;
  border: 1px solid #e6ece7;
  border-radius: 13px;
  background: #f8faf7;
  margin-bottom: 12px;
}
.product-app .workspace small {
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 650;
}
.product-app .workspace select {
  font-size: 13px;
  border: 0;
  min-height: 36px;
  padding: 6px 0;
  background: transparent;
  font-weight: 600;
}
.product-app .workspace .btn {
  font-size: 11px;
  padding: 4px 0;
  min-height: 28px;
}
.nav-search {
  position: relative;
  margin: 0 2px 7px;
}
.nav-search input {
  font-size: 12px;
  min-height: 36px;
  padding: 8px 10px;
  background: #fff;
  width: 100%;
}
.product-app .sidebar nav {
  display: block;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 3px;
  scrollbar-width: thin;
}
.product-app .sidebar .nav {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  text-align: left;
  color: #5a6e62;
  font-size: 12px;
  font-weight: 510;
  min-height: 38px;
  white-space: normal;
}
.product-app .nav svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.product-app .nav:hover {
  background: #f4f7f2;
  color: #1e503a;
}
.product-app .nav.active {
  background: #edf5e8;
  color: #174e37;
  font-weight: 680;
  box-shadow: inset 3px 0 #739d4d;
}
.product-app .navlabel {
  display: block;
  padding: 20px 12px 7px;
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #869388;
  font-weight: 650;
}
.product-app .sidebar [hidden] {
  display: none !important;
}
.product-app .sidebar-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #ecf0ec;
  margin-top: 12px;
  padding: 14px 6px 0;
}
.sidebar-bottom small {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-bottom .btn {
  padding: 5px 10px;
  min-height: 32px;
  font-size: 11px;
}
.product-app .main {
  min-width: 0;
  background: #f6f8f6;
}
.product-app .topbar {
  height: 78px;
  padding: 0 34px;
  background: #ffffffdf;
  border-bottom: 1px solid #e8eee8;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.product-app .breadcrumb {
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: #7b8b7f;
}
.product-app .breadcrumb strong {
  color: #2b4738;
  font-weight: 600;
}
.product-app .topright {
  display: flex;
  gap: 10px;
  align-items: center;
}
.product-app .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #edf3e7;
  color: #4a6a3b;
  font-size: 11px;
}
.product-app .content {
  padding: 32px 34px;
  max-width: 1600px;
  margin: auto;
}
.product-app .heading {
  margin-bottom: 27px;
  align-items: center;
  gap: 20px;
}
.product-app .heading h1 {
  font-size: clamp(25px, 2.3vw, 34px);
  font-weight: 650;
  letter-spacing: -1.15px;
  line-height: 1.18;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 650;
  color: #65816b;
}
.product-app .heading .eyebrow {
  margin-bottom: 9px;
}
.product-app .heading p {
  font-size: 13px;
  max-width: 660px;
  line-height: 1.75;
}
.product-app .stats,
.commercial-stats {
  gap: 16px;
  margin-bottom: 24px;
}
.product-app .stats .card,
.commercial-stats .card {
  padding: 21px 23px;
  box-shadow: none;
}
.product-app .stats h2,
.commercial-stats h2 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 630;
}
.product-app .hero {
  border-radius: 22px;
  overflow: hidden;
  gap: 24px;
}
.product-app .welcome {
  background: #eaf3e5;
  border-radius: 22px;
  padding: 32px;
}
.product-app .welcome h2 {
  color: #184730;
  font-size: 29px;
  letter-spacing: -0.8px;
  line-height: 1.3;
}
.product-app .welcome p {
  color: #59705f;
}
.product-app .footer {
  margin-top: 40px;
  padding: 20px 0 0;
  border-top: 1px solid #e6ece6;
  gap: 12px;
  font-size: 11px;
}
.product-app .action-banner {
  border-radius: 20px;
  background: linear-gradient(115deg, #194e3a, #245945);
  padding: 28px 32px;
  box-shadow: none;
}
.product-app .action-banner h2 {
  font-weight: 560;
  font-size: 26px;
  letter-spacing: -0.6px;
}
.action-filters {
  gap: 7px;
}
.action-filters .btn {
  font-size: 12px;
  border-radius: 100px;
  min-height: 36px;
  padding: 8px 14px;
}
.action-case {
  box-shadow: none;
}
.action-reasons span {
  border-radius: 6px;
}
.product-app .chatlayout {
  grid-template-columns: 285px minmax(0, 1fr);
  border-radius: 18px;
  min-height: 650px;
  box-shadow: var(--shadow);
}
.product-app .chatlist {
  background: #fcfdfb;
  padding: 16px 12px;
  max-height: 850px;
  overflow: auto;
}
.product-app .thread {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 15px 12px;
  margin-bottom: 8px;
}
.product-app .thread:hover {
  background: #f3f6ef;
}
.product-app .thread.active {
  background: #eef5e9;
  border-color: #d7e5cc;
}
.product-app .thread b {
  font-size: 13px;
  margin-bottom: 9px;
}
.product-app .thread small {
  font-size: 11px;
  line-height: 1.5;
  color: #72806f;
}
.product-app .chathead {
  padding: 20px;
  background: #fff;
}
.product-app .chathead h3 {
  font-size: 16px;
}
.product-app .chathead .btn {
  font-size: 11px;
  min-height: 32px;
  padding: 7px 10px;
}
.product-app .chatmessages {
  background: #f7f9f5;
  padding: 26px;
  gap: 16px;
  max-height: 560px;
}
.product-app .bubble {
  border: 1px solid #e6ede2;
  box-shadow: 0 2px 4px #19382e03;
  border-radius: 15px 15px 15px 3px;
  padding: 13px 16px;
  line-height: 1.7;
  background: white;
  max-width: 88%;
  font-size: 13px;
}
.product-app .bubble.user {
  background: #e8f1df;
  border-color: #e0eace;
  border-radius: 15px 15px 3px 15px;
  color: #29492e;
}
.product-app .bubble small {
  font-size: 10px;
}
.product-app .composer {
  background: #fff;
  padding: 18px;
  border-top: 1px solid #e7ece4;
  gap: 10px;
}
.product-app .composer textarea {
  background: #fafcf8;
  min-height: 65px;
  border-radius: 12px;
}
.product-app .composer .btn {
  align-self: flex-start;
}
.product-app .reply-picker {
  background: #fff;
  padding: 12px 20px;
}
.product-app .reply-picker summary {
  font-size: 12px;
}
.product-app .list-toolbar {
  padding: 16px;
  background: #fff;
  border: 1px solid #e4ebe2;
  border-radius: 14px;
  margin-bottom: 20px;
}
.product-app .step {
  border-radius: 12px;
}
.product-app .safe-code {
  border: 1px solid #e2eae0;
  background: #f8faf6;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.product-app .connector-icon {
  background: #eff5e7;
  color: #326144;
  border-radius: 13px;
}
.product-app .auth-layout {
  min-height: 100dvh;
  grid-template-columns: 1fr 1fr;
}
.product-app .auth-brand {
  padding: clamp(35px, 6vw, 100px);
  background:
    radial-gradient(ellipse at 10% 5%, #dcecc4 0, transparent 50%), #eef4e8;
  position: relative;
  overflow: hidden;
}
.product-app .auth-brand .logo {
  margin-bottom: 38px;
}
.product-app .auth-brand .prosanina-logo {
  width: 365px;
}
.product-app .auth-brand h1 {
  color: #193e30;
  font-weight: 600;
  font-size: clamp(38px, 4.2vw, 62px);
  letter-spacing: -2px;
  line-height: 1.08;
}
.product-app .auth-brand p {
  color: #526e59;
  line-height: 1.8;
  font-size: 15px;
}
.product-app .auth-form {
  padding: 40px;
  background: #fff;
}
.product-app .auth-box {
  max-width: 370px;
}
.product-app .auth-box h2 {
  font-size: 28px;
  font-weight: 620;
  letter-spacing: -1px;
}
.product-app .auth-box form {
  margin-top: 28px;
}
.product-app .auth-box .eyebrow {
  margin-bottom: 15px;
}
.product-app .auth-box input {
  min-height: 49px;
  background: #fbfcfa;
}
.product-app .auth-box .btn {
  min-height: 48px;
}
.menu-toggle,
.menu-close,
.nav-shade {
  display: none;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  padding: 12px 20px;
  background: #164f40;
  color: white;
  border-radius: 10px;
  z-index: 200;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.nav-empty {
  padding: 14px;
  font-size: 12px;
}
@media (max-width: 1200px) {
  .product-app .content {
    padding: 26px 24px;
  }
  .product-app .topbar {
    padding: 0 24px;
  }
  .product-app .chatlayout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
}
@media (max-width: 1000px) {
  .product-app .layout {
    display: block;
  }
  .product-app .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    max-width: 88vw;
    height: 100dvh;
    z-index: 80;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 20px 0 70px #102b3020;
    visibility: hidden;
  }
  .product-app .sidebar.is-open {
    transform: none;
    visibility: visible;
  }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: #f2f6ee;
    color: #24513b;
    border-radius: 10px;
    flex: none;
  }
  .menu-toggle svg,
  .menu-close svg {
    width: 21px;
    height: 21px;
  }
  .menu-close {
    display: grid;
    position: absolute;
    right: 15px;
    top: 12px;
    width: 30px;
    height: 30px;
    place-items: center;
    background: transparent;
    color: #536e5a;
  }
  .product-app .sidebar .logo {
    padding-top: 18px;
  }
  .nav-shade:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: #0b242759;
    backdrop-filter: blur(3px);
  }
  .navigation-open {
    overflow: hidden;
  }
  .product-app .topbar {
    height: 66px;
  }
  .product-app .topright .badge {
    display: none;
  }
  .product-app .heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .product-app .grid.three,
  .commercial-plans {
    grid-template-columns: 1fr 1fr;
  }
  .product-app .sidebar .navlabel {
    display: block;
  }
  .product-app .sidebar-bottom {
    display: flex;
  }
  .product-app .sidebar nav {
    display: block;
    overflow: auto;
  }
  .product-app .sidebar .nav {
    width: 100%;
  }
}
@media (max-width: 700px) {
  .product-app .content {
    padding: 22px 16px;
  }
  .product-app .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .product-app .heading h1 {
    font-size: 27px;
  }
  .product-app .heading p {
    font-size: 12px;
  }
  .product-app .card {
    padding: 20px;
  }
  .product-app .stats,
  .commercial-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .product-app .stats .card {
    padding: 16px;
  }
  .product-app .stats h2 {
    font-size: 26px;
  }
  .product-app .hero,
  .product-app .grid.three,
  .commercial-plans,
  .product-app .knowledge {
    grid-template-columns: 1fr;
  }
  .product-app .chatlayout {
    grid-template-columns: 1fr;
  }
  .product-app .chatlist {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 250px;
  }
  .product-app .chathead .actions {
    max-width: 100%;
    justify-content: flex-start;
  }
  .product-app .chathead {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-app .chatmessages {
    padding: 18px;
    max-height: 55dvh;
    min-height: 300px;
  }
  .product-app .bubble {
    max-width: 95%;
  }
  .product-app .auth-layout {
    grid-template-columns: 1fr;
  }
  .product-app .auth-brand {
    padding: 32px 28px;
  }
  .product-app .auth-brand .logo {
    margin-bottom: 18px;
  }
  .product-app .auth-brand .prosanina-logo {
    width: 240px;
  }
  .product-app .auth-brand h1 {
    font-size: 36px;
    letter-spacing: -1.2px;
    max-width: 400px;
  }
  .product-app .auth-brand p {
    display: none;
  }
  .product-app .auth-form {
    padding: 35px 26px;
  }
  .product-app .auth-box {
    max-width: 440px;
  }
  .product-app .footer {
    flex-wrap: wrap;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: 1/-1;
  }
  dialog {
    padding: 22px;
    max-height: 92dvh;
  }
  .action-banner {
    gap: 18px;
  }
  .product-app .action-banner h2 {
    font-size: 23px;
  }
  .product-app .action-banner > div:last-child strong {
    font-size: 28px;
  }
  .product-app .table-wrap {
    margin: 0;
  }
  .product-app .list-toolbar {
    gap: 12px;
  }
  .product-app .list-toolbar > label {
    min-width: 130px;
  }
  .product-app .btn {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

input[type="checkbox"],
input[type="radio"] {
  min-height: auto;
  padding: 0;
  accent-color: var(--green);
}

/* ProsaNina 1.8: compact workspace and touch-first navigation. */
:root {
  --ink: #20332e;
  --muted: #60706a;
  --bg: #f5f7f8;
  --line: #e4e9e7;
  --radius: 14px;
}
.product-app .main {
  background: #f5f7f8;
}
.product-app .sidebar {
  background: #fff;
  padding: 18px 12px;
}
.product-app .sidebar .nav {
  font-size: 13px;
  min-height: 44px;
}
.product-app .nav.active {
  background: #e8f3ef;
  box-shadow: none;
  color: #12634b;
}
.product-app .heading .eyebrow {
  display: none;
}
.product-app .heading h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
}
.product-app .heading p {
  font-size: 14px;
  margin-top: 8px;
}
.product-app .welcome {
  background: #fff;
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 14px;
}
.product-app .welcome h2 {
  font-size: 24px;
}
.product-app .welcome .eyebrow {
  color: #60766a;
}
.product-app .card {
  box-shadow: none;
  border-radius: 14px;
}
.product-app .topbar {
  height: 66px;
  background: #fff;
}
.product-app .stats .stat strong {
  font-size: 30px;
  letter-spacing: -1px;
}
.product-app .auth-brand {
  background: #f0f5f3;
}
.product-app .auth-brand h1 {
  font-size: clamp(32px, 3.4vw, 48px);
  letter-spacing: -1.5px;
}
.product-app .auth-brand .prosanina-logo {
  width: 290px;
}
.product-app .btn {
  min-height: 44px;
}
.mobile-tabs,
.conversation-back {
  display: none;
}
.conversation-actions {
  position: relative;
}
.conversation-actions summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  font-weight: 600;
  min-height: 44px;
}
.conversation-actions summary::-webkit-details-marker {
  display: none;
}
.conversation-actions[open] .actions {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 25;
  width: 225px;
  display: grid;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 35px #183b3020;
}
.product-app .conversation-actions .btn {
  min-height: 44px;
  font-size: 13px;
  text-align: left;
}
@media (max-width: 1000px) {
  .product-app .main {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    min-height: 100dvh;
  }
  .product-app .content {
    padding: 20px;
  }
  .product-app .heading {
    margin-bottom: 18px;
    gap: 12px;
  }
  .product-app .heading h1 {
    font-size: 25px;
    line-height: 1.2;
  }
  .product-app .heading p {
    font-size: 14px;
    line-height: 1.5;
  }
  .product-app .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .product-app .breadcrumb {
    font-size: 13px;
  }
  .product-app .topright {
    margin-left: auto;
  }
  .product-app .footer {
    display: none;
  }
  .mobile-tabs {
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: #fffffff5;
    border-top: 1px solid #dce5e1;
    backdrop-filter: blur(18px);
  }
  .mobile-tabs button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 54px;
    background: transparent;
    border: 0;
    color: #64746e;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    padding: 6px 2px;
  }
  .mobile-tabs svg {
    width: 22px;
    height: 22px;
  }
  .mobile-tabs button[aria-current],
  .mobile-tabs .is-current {
    color: #13583f;
    background: #eaf4ef;
  }
  .product-app .sidebar {
    inset: 0;
    width: 100%;
    max-width: none;
    height: var(--app-height, 100dvh);
    transform: translateY(15px);
    padding: calc(16px + env(safe-area-inset-top)) 18px
      calc(18px + env(safe-area-inset-bottom));
    box-shadow: none;
    transition:
      transform 0.18s,
      opacity 0.18s;
    opacity: 0;
  }
  .product-app .sidebar.is-open {
    transform: none;
    opacity: 1;
  }
  .product-app .sidebar .logo {
    padding: 0 52px 10px 0;
  }
  .product-app .sidebar .prosanina-logo {
    width: 180px;
  }
  .menu-close {
    top: calc(14px + env(safe-area-inset-top));
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0f4f2;
  }
  .product-app .workspace {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .product-app .workspace small {
    display: none;
  }
  .product-app .workspace select {
    flex: 1;
    min-width: 160px;
    min-height: 44px;
    font-size: 16px;
  }
  .product-app .workspace .btn {
    min-height: 44px;
    font-size: 12px;
  }
  .nav-search {
    margin: 0 0 10px;
  }
  .nav-search input {
    min-height: 48px;
    font-size: 16px;
    background: #f7f9f8;
  }
  .product-app .sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 7px;
    padding: 0 2px 14px;
  }
  .product-app .sidebar .navlabel,
  .nav-empty {
    grid-column: 1/-1;
    padding: 15px 4px 3px;
  }
  .product-app .sidebar .nav {
    margin: 0;
    padding: 12px 10px;
    min-height: 58px;
    border: 1px solid #e6ece9;
    background: #fafcfb;
    font-size: 13px;
    gap: 8px;
  }
  .product-app .sidebar .nav.active {
    background: #e7f3ed;
    border-color: #a3c8b8;
  }
  .product-app .sidebar-bottom {
    margin-top: 6px;
    padding-top: 8px;
  }
  .product-app .sidebar-bottom .btn {
    min-height: 44px;
  }
  .product-app input,
  .product-app select,
  .product-app textarea {
    font-size: 16px;
    min-height: 46px;
  }
  .product-app input[type="checkbox"],
  .product-app input[type="radio"] {
    min-height: 20px;
    min-width: 20px;
  }
  .product-app .chatlayout {
    display: block;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .product-app .chatlist {
    padding: 0;
    max-height: none;
    background: transparent;
    border: 0;
    overflow: visible;
  }
  .product-app .thread {
    background: white;
    border: 1px solid var(--line);
    padding: 17px 15px;
    margin-bottom: 10px;
    min-height: 90px;
  }
  .product-app .thread b {
    font-size: 15px;
  }
  .product-app .thread small {
    font-size: 13px;
    line-height: 1.5;
  }
  .product-app .chatpanel {
    display: none;
  }
  .product-app.conversation-open .content {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: calc(
      var(--app-height, 100dvh) - 60px - 76px - env(safe-area-inset-bottom)
    );
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .product-app.conversation-open .content > .heading,
  .product-app.conversation-open .content > .list-toolbar,
  .product-app.conversation-open #pagination,
  .product-app.conversation-open .chatlist {
    display: none;
  }
  .product-app.conversation-open .chatlayout {
    flex: 1;
    min-height: 0;
    display: flex;
    border-radius: 0;
  }
  .product-app.conversation-open .chatpanel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
    background: #fff;
  }
  .conversation-back {
    display: block;
    flex: none;
    background: white;
    text-align: left;
    padding: 12px 16px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: #13583f;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .product-app .chathead {
    padding: 10px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: none;
  }
  .product-app .chathead > div {
    min-width: 0;
    flex: 1;
  }
  .product-app .chathead h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }
  .product-app .chatmessages {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .product-app .bubble {
    font-size: 15px;
    max-width: 92%;
    padding: 12px 14px;
    overflow-wrap: anywhere;
  }
  .product-app .bubble small {
    font-size: 11px;
  }
  .product-app .composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
    gap: 8px;
    flex: none;
  }
  .product-app .composer textarea {
    min-height: 46px;
    max-height: 110px;
    resize: none;
    padding: 11px;
    font-size: 16px;
  }
  .product-app .composer .btn {
    align-self: stretch;
    min-width: 65px;
    min-height: 46px;
  }
  .product-app .composer-hint {
    display: none;
  }
  .product-app .reply-picker {
    padding: 8px 16px;
    max-height: 30dvh;
    overflow: auto;
    flex: none;
  }
  .product-app .reply-picker summary {
    min-height: 32px;
    font-size: 13px;
    display: flex;
    align-items: center;
  }
  .product-app .conversation-summary,
  .product-app .test-callout,
  .product-app .response-wait {
    font-size: 12px;
    max-height: 65px;
    overflow: auto;
    margin: 0;
    padding: 9px 16px;
    flex: none;
  }
  .product-app .list-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
  .product-app .list-toolbar > label:first-child {
    grid-column: 1/-1;
  }
  .product-app .list-toolbar > label {
    min-width: 0;
    width: auto;
  }
  .product-app .list-toolbar input,
  .product-app .list-toolbar select {
    width: 100%;
    min-width: 0;
  }
  .product-app .pagination {
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .product-app .content {
    padding: 18px 14px;
  }
  .product-app .heading .btn {
    width: 100%;
  }
  .product-app .card {
    padding: 18px;
  }
  .product-app .table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }
  .product-app .table-wrap table,
  .product-app .table-wrap tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .product-app .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .product-app .table-wrap tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 14px;
    margin-bottom: 12px;
  }
  .product-app .table-wrap td {
    display: block;
    max-width: none;
    padding: 10px 0;
    border-bottom: 1px solid #edf1ef;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .product-app .table-wrap td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #60756b;
    margin-bottom: 4px;
  }
  .product-app .table-wrap td:last-child {
    border: 0;
  }
  .product-app .table-wrap td .btn {
    margin: 4px 4px 0 0;
  }
  .product-app .auth-brand {
    padding: 28px 24px;
  }
  .product-app .auth-brand .prosanina-logo {
    width: 210px;
  }
  .product-app .auth-brand h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.7px;
  }
  .product-app .auth-form {
    padding: 28px 24px;
  }
  .product-app .auth-box h2 {
    font-size: 24px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 20px;
    border-radius: 16px;
  }
}
@media (max-width: 1000px) {
  .product-app.conversation-open:has(.composer textarea:focus) .mobile-tabs {
    display: none;
  }
  .product-app.conversation-open:has(.composer textarea:focus) .content {
    height: calc(var(--app-height, 100dvh) - 60px);
  }
  .product-app .conversation-actions:not(:has(button)) {
    display: none;
  }
}

/* 1.9: fit sign-in and conversation controls on compact phones. */
.product-app .conversation-actions[open] .actions {
  width: 225px;
  max-width: calc(100vw - 32px);
  max-height: min(360px, calc(var(--app-height, 100dvh) - 160px));
  overflow-y: auto;
}
@media (max-width: 1000px) {
  .product-app .conversation-actions[open] .actions {
    /* Reserve topbar, Back, menu origin and bottom tabs inside clipped content. */
    max-height: min(
      360px,
      max(
        0px,
        calc(var(--app-height, 100dvh) - 260px - env(safe-area-inset-bottom))
      )
    );
    overscroll-behavior: contain;
  }
}
@media (max-width: 700px) {
  .product-app .auth-brand {
    padding: 16px 20px;
  }
  .product-app .auth-brand .logo {
    margin-bottom: 8px;
  }
  .product-app .auth-brand .prosanina-logo {
    width: 180px;
  }
  .product-app .auth-brand h1 {
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.4px;
    margin: 0;
  }
  .product-app .auth-form {
    padding: 22px 20px;
    align-content: start;
  }
  .product-app .auth-box h2 {
    font-size: 25px;
    margin-bottom: 8px;
  }
  .product-app .auth-box .eyebrow {
    margin-bottom: 9px;
  }
  .product-app .auth-box > p {
    margin: 8px 0 16px;
  }
  .product-app .auth-box form {
    margin-top: 18px;
  }
  .product-app .auth-box form > div {
    margin-bottom: 12px;
  }
  .product-app .auth-box input {
    min-height: 49px;
    font-size: 16px;
  }
  .product-app .auth-box .btn {
    min-height: 48px;
    margin-top: 8px;
  }
  .product-app #auth-error:empty {
    display: none;
  }
  .product-app .authlinks {
    margin-top: 18px;
  }
}

/* Isolated response preview: no real-customer actions or channel controls. */
dialog.assistant-preview { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.assistant-preview .preview-transcript { min-height: 72px; max-height: 32dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid #d9e6df; border-radius: 12px; }
.assistant-preview .preview-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; background: #eef5f1; border-radius: 10px; }
.assistant-preview .preview-message.user { background: #f7f7f5; }
.assistant-preview .preview-consent { display: flex; align-items: flex-start; gap: 8px; padding: 14px 0; }
.assistant-preview .preview-consent input { width: auto; margin-top: 4px; }
.assistant-preview textarea { width: 100%; min-height: 88px; resize: vertical; }
.assistant-preview button:focus-visible, .assistant-preview textarea:focus-visible, .assistant-preview input:focus-visible { outline: 3px solid #246a54; outline-offset: 3px; }
@media (max-width: 600px) { dialog.assistant-preview { padding: 16px; } .assistant-preview .formfooter { display: flex; flex-wrap: wrap; gap: 8px; } .assistant-preview .formfooter button { flex: 1 1 140px; } }
