/* NextgenChat: shared brand, workspace and responsive interface. */
:root {
  --bg: #f5f7f6;
  --sidebar: #fbfcfb;
  --text: #192720;
  --muted: #68776f;
  --line: #e3eae6;
  --hover: #eef4f0;
  --active: #def6e9;
  --mint: #18714f;
  --ink: #182b23;
  --shadow: 0 5px 22px rgba(25, 50, 37, .035);
}
.brand { gap: 12px; padding-block: 25px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: transparent; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand strong { font-size: 17px; letter-spacing: -.5px; }
.brand .muted { font-size: 12px; margin-top: 3px; }
.brand > div { min-width: 0; }
.brand .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { min-height: 42px; border-radius: 11px; font-size: 13px; }
.btn.primary, a.btn.primary { color: #fff; background: var(--ink); }
.btn.primary:hover:not(:disabled) { background: #28533e; }
.btn.ghost { color: #3e5548; background: #f1f6f3; border: 1px solid #e1eae5; }
.btn.icon { color: #607268; }
:focus-visible { outline: 3px solid #29996a; outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: none; }
input, textarea, select { border-radius: 10px; }
input::placeholder, textarea::placeholder { color: #7b8781; }
input[type="checkbox"] { accent-color: #18714f; width: 18px; height: 18px; flex-shrink: 0; }
.cabinet-app .cabinet-sidebar { width: 252px; min-width: 252px; }
.cabinet-sidebar .brand { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.cab-nav { gap: 5px; padding-inline: 14px; }
.cab-nav-label { color: #748279; font-size: 10px; letter-spacing: 1.2px; margin-top: 24px; }
.cab-nav-btn { min-height: 45px; border-radius: 10px; font-size: 13px; color: #56665c; transition: background 160ms, color 160ms; }
.cab-nav-btn:hover { background: #eef4f0; color: #182b23; }
.cab-nav-btn.active { background: var(--active); color: #125b3d; box-shadow: inset 3px 0 #39bd82; }
.nav-badge { background: #257d57; }
.cab-logout { border-top: 1px solid var(--line); border-radius: 0; padding-top: 20px; }
.dash { background: var(--bg); padding: 0 40px 48px; }
.workspace-bar { min-height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; }
.workspace-bar > span { color: #748278; font-size: 10px; letter-spacing: 1.5px; font-weight: 600; }
.workspace-bar a { color: #355a44; font-size: 12px; font-weight: 600; text-decoration: none; }
.workspace-bar a:hover { text-decoration: underline; }
.workspace-bar a span { margin-left: 8px; }
.dash-page { max-width: 1180px; margin-inline: auto; }
.dash-head { align-items: center; margin-bottom: 28px; }
.dash-head h1 { font-size: 32px; letter-spacing: -1.2px; font-weight: 650; line-height: 1.2; }
.dash-head .empty-lead { font-size: 14px; line-height: 1.7; max-width: 650px; margin: 8px 0 0; color: #68776f; }
.channel-summary { display: flex; gap: 9px; align-items: center; margin: 0 0 15px; font-size: 12px; color: #6d7b72; }
.channel-summary strong { font-weight: 500; color: #384f40; }
.channel-summary > span:last-child { margin-left: auto; font-size: 11px; }
.summary-dot { width: 7px; height: 7px; border-radius: 50%; background: #82998b; }
.lk-table { border-radius: 15px; box-shadow: var(--shadow); }
.lk-table-head, .lk-row-main { grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.25fr) 132px minmax(160px, auto); gap: 16px; padding-inline: 23px; }
.lk-table-head { border-radius: 15px 15px 0 0; background: #f9fbfa; padding-block: 14px; color: #76867c; font-size: 10px; letter-spacing: 1px; }
.lk-row-main { min-height: 102px; padding-block: 23px; }
.lk-row-main:hover, .lk-row-btn:hover { background: #fbfdfc; }
.lk-table .connector-logo { width: 42px; height: 42px; border-radius: 12px; }
.lk-channel strong { font-size: 14px; }
.lk-plan { font-size: 13px; color: #35493d; }
.lk-sub { font-size: 11px; margin-top: 5px; line-height: 1.5; }
.connector-pill { font-size: 10px; background: #f0f3f1; color: #627368; border: 1px solid #e3eae6; padding: 6px 9px; }
.connector-pill.on { background: #e1f7e9; color: #13643f; border-color: #c0e9d0; }
.connector-pill.err { background: #fff0ed; color: #a43c29; border-color: #f4d3cb; }
.connector-pill.wait { background: #fff7df; color: #88600b; border-color: #eddfb3; }
.lk-cta { min-width: 119px; }
.lk-kebab { width: 36px; height: 40px; color: #74867a; }
.lk-menu-pop { box-shadow: 0 12px 34px #16342418; }
.lk-menu-pop button { font-size: 13px; min-height: 40px; }
.connect-guide { margin-top: 34px; padding: 27px; border: 1px solid var(--line); border-radius: 15px; background: #edf3ef; }
.guide-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 1.8px; color: #5d7a68; }
.guide-heading h2 { margin: 9px 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.guide-heading > p { margin: 0; font-size: 12px; color: #6b7d70; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px; padding: 0; margin: 25px 0 0; list-style: none; }
.guide-steps li { display: flex; align-items: flex-start; gap: 12px; }
.step-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #cfddd3; border-radius: 8px; color: #477058; font-size: 10px; flex-shrink: 0; background: #f7fbf8; }
.guide-steps strong { font-size: 12px; font-weight: 600; }
.guide-steps p { margin: 6px 0 0; color: #63796b; font-size: 11px; line-height: 1.7; }
.stat-card { border-radius: 14px; padding: 22px; }
.stat-card strong { color: #213e2d; font-weight: 600; }
.stat-card .muted { font-size: 12px; }
.settings-card { border-radius: 16px; }
.modal-card { border-radius: 20px; box-shadow: 0 24px 90px #122f2526; }
.modal-head h2 { font-size: 23px; letter-spacing: -.6px; }
.modal-backdrop { background: rgba(17, 35, 27, .36); backdrop-filter: blur(4px); }
.search-field { background: #fff; border: 1px solid var(--line); border-radius: 11px; min-height: 42px; }
.search-field:focus-within { border-color: #439b70; box-shadow: 0 0 0 3px #2c9b6e14; }
.search-field input:focus { box-shadow: none; }
.chat-item { border-radius: 11px; }
.chat-item.active { background: var(--active); }
.empty-chat { background: radial-gradient(ellipse at center, #e9f5ee 0, #f6f8f7 65%); border: 1px solid #e4eee7; border-radius: 24px; }
.empty-chat h1 { font-size: 35px; font-weight: 600; letter-spacing: -1px; }
.empty-chat .empty-lead { font-size: 14px; line-height: 1.8; max-width: 420px; }
.empty-kicker { color: #2d7955; }
.chat-head { background: #fff; }
.messages { background: #f2f6f3; }
.composer-wrap { background: #fff; }
.auth-page { overflow: auto; background: radial-gradient(ellipse at 20% 0%, #d9f1e4, transparent 60%), #f3f7f4; }
.auth-page .auth-card { border-radius: 22px; box-shadow: 0 20px 70px #214d3410; padding: 32px; }
.auth-page .auth-tabs { padding: 4px; background: #eef3ef; border-radius: 12px; }
.auth-page .auth-tabs button { background: transparent; font-size: 13px; }
.auth-page .auth-tabs button.active { background: #fff; color: #1d593b; box-shadow: 0 2px 7px #183d2610; border-radius: 9px; }
@media (min-width: 801px) and (max-width: 1150px) {
  .cabinet-app .cabinet-sidebar { width: 216px; min-width: 216px; }
  .cabinet-sidebar .brand { padding-inline: 14px; gap: 8px; }
  .cabinet-sidebar .brand strong { font-size: 15px; }
  .dash { padding-inline: 24px; }
  .lk-table-head { display: none; }
  .lk-row-main { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .lk-row:first-of-type, .lk-row:first-of-type .lk-row-main { border-radius: 15px 15px 0 0; }
  .lk-meta { grid-row: 2; grid-column: 1; }
  .lk-row-main > .connector-pill { grid-row: 1; grid-column: 2; }
  .lk-actions { grid-row: 2; grid-column: 2; }
  .guide-steps { grid-template-columns: 1fr; gap: 18px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .cabinet-page .cabinet-sidebar { width: 100%; min-width: 0; position: sticky; top: 0; z-index: 15; background: #fbfcfb; }
  .cabinet-sidebar .brand { border: 0; margin: 0; padding: 15px 18px; }
  .cabinet-page .brand-mark { width: 38px; height: 38px; }
  .cabinet-page .cab-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 12px 12px; overflow: visible; }
  .cabinet-page .cab-nav-btn { min-height: 40px; border-radius: 9px; font-size: 12px; justify-content: center; padding: 8px 6px; }
  .cabinet-page .cab-logout { display: inline-flex; position: absolute; top: 17px; right: 12px; margin: 0; padding: 9px; border: 0; font-size: 11px; }
  .cabinet-page .cab-logout svg { display: none; }
  .cabinet-sidebar .brand { padding-right: 72px; }
  .cabinet-page .dash { padding: 0 18px 32px; }
  .workspace-bar { min-height: 54px; margin-bottom: 24px; }
  .workspace-bar > span { font-size: 8px; letter-spacing: .7px; }
  .workspace-bar a { font-size: 11px; }
  .dash-head { align-items: flex-start; }
  .cabinet-page .dash-head h1 { font-size: 28px; }
  .channel-summary { flex-wrap: wrap; }
  .channel-summary > span:last-child { display: none; }
  .cabinet-page .lk-row-main { padding: 19px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .lk-row:first-of-type, .lk-row:first-of-type .lk-row-main { border-radius: 15px 15px 0 0; }
  .cabinet-page .lk-meta { grid-row: 2; grid-column: 1 / -1; }
  .lk-row-main > .connector-pill { grid-row: 1; grid-column: 2; }
  .cabinet-page .lk-actions { grid-row: 3; grid-column: 1 / -1; }
  .lk-actions .lk-cta { flex: 1; }
  .lk-table .connector-logo { width: 34px; height: 34px; }
  .lk-channel { gap: 9px; }
  .lk-channel strong { font-size: 13px; }
  .connector-pill { font-size: 9px; }
  .connect-guide { padding: 22px; margin-top: 24px; }
  .guide-steps { grid-template-columns: 1fr; gap: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 16px; }
  .settings-card { padding: 20px; }
  .auth-page .auth-card { padding: 24px; }
}
