/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!../../packages/design-tokens/src/tokens.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Outfit:wght@200;300;400&display=swap');

:root {
  --bg: #ffffff;
  --bg-chat: #f7f8fa;
  --bg-panel: #f4f5f7;
  --bg-soft: #fafafb;
  --bg-hover: #edeff2;
  --bg-active: #e4e7ec;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --ink-5: #cbd5e1;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --brand: #0f172a;
  --brand-2: #1e293b;
  --brand-soft: #f1f5f9;
  --accent: #0fb5a8;
  --accent-2: #0a8a80;
  --accent-deep: #075e58;
  --accent-bg: #e6fbf8;
  --accent-tint: #b8f0ea;
  --wa-out: #d9fdd3;
  --wa-text-out: #111b21;
  --wa-check: #53bdeb;
  --wa-badge: #25d366;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --info: #1e40af;
  --info-bg: #eff6ff;
  --focus-ring: 0 0 0 3px rgba(15, 181, 168, 0.28);
  --shadow-bubble: 0 1px 0.5px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --shadow-pop: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 7px;
  --radius-xl: 8px;
  --radius-2xl: 10px;
  --radius-pill: 999px;
}

/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.18_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
*, ::before, ::after{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
::backdrop{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}
::before,
::after {
  --tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: var(--font-sans); /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
  color: inherit;
  text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
  font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
  font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
  text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
  outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
  box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
  vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
  display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}
fieldset {
  margin: 0;
  padding: 0;
}
legend {
  padding: 0;
}
ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
  resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
  cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
  max-width: 100%;
  height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.flex{
  display: flex;
}
.table{
  display: table;
}
.border{
  border-width: 1px;
}
.filter{
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
input, textarea { outline: none; }
a { color: inherit; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; background: var(--bg); }
.sidebar { display: flex; min-height: 0; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-panel); padding: 14px 10px 10px; }
.brand-row { display: flex; align-items: center; gap: 9px; padding: 4px 10px 12px; }
.brand-word { display: inline-flex; align-items: baseline; gap: 5px; color: var(--ink); font-family: var(--font-brand); font-size: 18px; font-weight: 300; letter-spacing: .15em; line-height: 1; text-transform: uppercase; }
.brand-sub { border-radius: var(--radius-xs); background: var(--accent-bg); color: var(--accent); font-family: var(--font-sans); font-size: 10px; font-weight: 700; letter-spacing: .18em; padding: 2px 5px; }
.brand-mark { width: 22px; height: 22px; flex: 0 0 auto; }
.tenant { display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); padding: 9px 10px; text-align: left; box-shadow: var(--shadow-card); }
.tenant-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: var(--radius-lg); background: var(--ink); color: white; font-size: 12px; font-weight: 800; }
.tenant-name, .row-title, .conv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-name { color: var(--ink); font-size: 12.5px; font-weight: 700; }
.tenant-meta, .muted { color: var(--ink-4); font-size: 11px; }
.sidebar-search { display: flex; align-items: center; gap: 8px; margin: 12px 2px 14px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); color: var(--ink-4); padding: 7px 10px; }
.sidebar-search input { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); font-size: 12.5px; }
.nav { display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.nav-label { color: var(--ink-4); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 4px 12px 6px; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: var(--radius-lg); background: transparent; color: var(--ink-2); padding: 7px 12px; text-align: left; font-size: 13px; font-weight: 600; }
.nav-item:hover { background: var(--bg-hover); color: var(--ink); }
.nav-item.active { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.nav-item.active:before { position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px; border-radius: 3px; background: var(--accent); content: ''; }
.nav-icon { color: var(--ink-3); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-count { margin-left: auto; color: var(--ink-4); font-size: 11px; }
.user-block { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.user-card { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-radius: var(--radius-lg); background: transparent; padding: 8px 10px; text-align: left; }
.user-card:hover { background: var(--bg-hover); }
.avatar, .user-av { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--bg-active); color: var(--ink-2); font-weight: 800; position: relative; }
.user-av { width: 30px; height: 30px; background: var(--accent); color: white; }
.wa-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--wa-badge); }
.main { min-width: 0; height: 100vh; overflow: hidden; background: var(--bg); }
.login-screen { min-height: 100vh; overflow: auto; background: var(--bg); }
.login-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.login-main { display: grid; grid-template-columns: minmax(360px, 440px) minmax(360px, 1fr); gap: 56px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 64px 28px; }
.login-card { border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--bg); box-shadow: var(--shadow-pop); padding: 28px; }
.login-title { margin: 0; color: var(--ink); font-size: 28px; line-height: 1.15; }
.login-sub { margin: 8px 0 24px; color: var(--ink-3); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { color: var(--ink-3); font-size: 11.5px; font-weight: 700; }
.field-error { color: var(--danger); font-size: 11.5px; font-weight: 700; }
.form-banner { border: 1px solid var(--danger); border-radius: var(--radius-md); background: var(--danger-bg); color: var(--danger); padding: 10px 12px; margin-bottom: 14px; font-weight: 700; font-size: 13px; }
.input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--ink); padding: 10px 11px; }
.input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; border: 1px solid transparent; border-radius: var(--radius-md); padding: 8px 12px; font-weight: 800; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { border-color: var(--line-2); background: var(--bg); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-link { background: var(--brand-soft); color: var(--ink-2); }
.login-side { background: var(--ink); border-radius: var(--radius-2xl); color: white; padding: 34px; }
.login-side h2 { margin: 8px 0 18px; font-size: 34px; line-height: 1.1; }
.login-side ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: #cbd5e1; }
.page { height: 100vh; overflow: auto; padding: 22px; background: var(--bg); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-title { margin: 0; color: var(--ink); font-size: 22px; line-height: 1.2; }
.page-sub { margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.page-search { display: flex; align-items: center; gap: 8px; min-width: 280px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); color: var(--ink-4); padding: 8px 10px; }
.page-search input { min-width: 0; flex: 1; border: 0; background: transparent; }
.inbox { display: grid; grid-template-columns: 348px minmax(420px, 1fr) 332px; height: 100vh; overflow: hidden; }
.inbox-list, .thread, .context-panel { min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.list-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.list-title-row { display: flex; align-items: center; justify-content: space-between; }
.list-title { font-size: 22px; font-weight: 800; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg-soft); padding: 8px; }
.stat-n { color: var(--ink); font-size: 17px; font-weight: 800; }
.stat-n.alert { color: var(--danger); }
.stat-l { color: var(--ink-4); font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.filter-bar { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.filt { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); color: var(--ink-3); padding: 5px 10px; font-size: 12px; font-weight: 800; }
.filt.on { border-color: var(--accent-tint); background: var(--accent-bg); color: var(--accent-deep); }
.conv-list { height: calc(100vh - 160px); overflow-y: auto; }
.conv { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 18px; text-align: left; }
.conv:hover, .conv.active { background: var(--bg-soft); }
.conv.active { box-shadow: inset 3px 0 0 var(--accent); }
.conv-name-row, .conv-foot, .thread-head, .bubble-meta, .kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-name { color: var(--ink); font-weight: 800; }
.conv-time { color: var(--ink-4); font-size: 11px; }
.conv-prev { display: -webkit-box; overflow: hidden; color: var(--ink-3); font-size: 12.5px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pill { display: inline-flex; align-items: center; border-radius: var(--radius-sm); background: var(--bg-hover); color: var(--ink-2); padding: 2px 7px; font-size: 10.5px; font-weight: 800; }
.pill.brand { background: var(--accent-bg); color: var(--accent-deep); }
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.warn { background: var(--warning-bg); color: var(--warning); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.thread { display: grid; grid-template-rows: auto 1fr auto; background: var(--bg-chat); }
.thread-head { border-bottom: 1px solid var(--line); background: var(--bg); padding: 12px 20px; }
.thread-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thread-title { color: var(--ink); font-size: 15px; font-weight: 900; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-4); font-size: 11.5px; }
.messages { overflow-y: auto; padding: 22px 28px; }
.day-sep { width: -moz-fit-content; width: fit-content; margin: 0 auto 18px; border-radius: var(--radius-pill); background: var(--bg); color: var(--ink-4); padding: 3px 10px; font-size: 11px; font-weight: 800; box-shadow: var(--shadow-card); }
.msg { display: flex; flex-direction: column; margin: 8px 0; }
.msg.in { align-items: flex-start; }
.msg.out { align-items: flex-end; }
.bubble { max-width: min(610px, 78%); border-radius: var(--radius-xl); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-bubble); padding: 10px 12px; }
.out .bubble { background: var(--wa-out); color: var(--wa-text-out); }
.system-note { width: -moz-fit-content; width: fit-content; max-width: 520px; margin: 8px auto; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); color: var(--ink-4); padding: 7px 11px; font-size: 11.5px; text-align: center; }
.template-tag { display: flex; gap: 5px; align-items: center; margin-bottom: 5px; color: var(--accent-deep); font-size: 10.5px; font-weight: 900; }
.bubble-meta { margin-top: 4px; color: var(--ink-4); font-size: 10.5px; }
.checks { color: var(--wa-check); letter-spacing: -2px; }
.composer { border-top: 1px solid var(--line); background: var(--bg); padding: 10px 18px 14px; }
.composer-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.composer-tab { border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-3); padding: 5px 10px; font-size: 12px; font-weight: 800; }
.composer-tab.on { background: var(--accent-bg); color: var(--accent-deep); }
.composer-box { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--bg-soft); padding: 8px; }
.composer-box textarea { min-height: 42px; max-height: 90px; resize: none; border: 0; background: transparent; color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-3); }
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.context-panel { display: grid; grid-template-rows: auto 1fr; border-right: 0; background: var(--bg); }
.ctx-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-bottom: 1px solid var(--line); padding: 10px; }
.ctx-tab { border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-3); padding: 7px 5px; font-size: 11.5px; font-weight: 800; }
.ctx-tab.on { background: var(--brand-soft); color: var(--ink); }
.ctx-body { overflow-y: auto; padding: 16px; }
.ctx-card, .table-wrap, .pipe-stat, .kanban-card, .settings-section { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); box-shadow: var(--shadow-card); }
.ctx-card { margin-bottom: 12px; padding: 12px; }
.ctx-title { margin-bottom: 10px; color: var(--ink); font-weight: 900; }
.kv { border-bottom: 1px dashed var(--line); padding: 7px 0; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink-4); }
.kv span:last-child { color: var(--ink-2); font-weight: 700; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg-soft); color: var(--ink-2); padding: 4px 8px; font-size: 11px; font-weight: 800; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-soft); color: var(--ink-4); font-size: 11px; font-weight: 900; letter-spacing: .06em; padding: 10px 12px; text-align: left; text-transform: uppercase; }
.data-table td { border-top: 1px solid var(--line); color: var(--ink-2); padding: 11px 12px; vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-soft); }
.cell-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pipe-stat { padding: 13px; }
.pipe-stat-l { color: var(--ink-4); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.pipe-stat-n { color: var(--ink); font-size: 20px; font-weight: 900; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 12px; }
.kanban-col { min-height: 360px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg-soft); padding: 10px; }
.kanban-head { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 900; margin-bottom: 10px; }
.kanban-card { margin-bottom: 9px; padding: 11px; }
.card-id { color: var(--ink-4); font-family: var(--font-mono); font-size: 11px; }
.card-title { margin: 4px 0; color: var(--ink); font-weight: 900; }
.card-amount { color: var(--accent-deep); font-size: 16px; font-weight: 900; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 12px; }
.settings-section { padding: 14px; }
.settings-section h2 { margin: 0 0 8px; font-size: 15px; }
.settings-section p { margin: 0 0 12px; color: var(--ink-3); }
@media (max-width: 1100px) { body { overflow: auto; } .app-shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; } .sidebar { position: sticky; top: 0; z-index: 10; max-height: none; min-height: auto; border-bottom: 1px solid var(--line); } .nav { display: grid; grid-template-columns: repeat(3, 1fr); } .main, .page { height: auto; min-height: 100vh; } .inbox { grid-template-columns: 1fr; height: auto; } .inbox-list, .thread, .context-panel { min-height: 520px; border-right: 0; border-bottom: 1px solid var(--line); } .conv-list { height: auto; max-height: 420px; } .settings-grid, .pipeline, .kanban { grid-template-columns: 1fr; } .login-main { grid-template-columns: 1fr; } }

