:root {
  color-scheme: light;
  --ink: #162521;
  --muted: #556862;
  --paper: #f1f5f3;
  --white: #fff;
  --line: #dce6e1;
  --dark: #10221e;
  --lime: #ccfa87;
  --green: #236147;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid #318a64; outline-offset: 3px; }
.skip { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 12px; background: var(--white); transform: translateY(-150%); }
.skip:focus { transform: none; }

.app { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--dark); color: #dfede6; display: flex; flex-direction: column; min-width: 0; }
.brand { display: flex; gap: 12px; align-items: center; padding: 30px 25px 28px; }
.brand strong { display: block; color: #f7fdf8; font-size: 23px; line-height: 1; letter-spacing: -.9px; }
.brand strong span { color: var(--lime); }
.brand small { display: block; color: #a5bcaf; font: 700 10px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .22em; margin-top: 6px; }
.brand-mark { display: inline-flex; flex: none; gap: 3px; align-items: end; width: 39px; height: 39px; padding: 9px; border-radius: 10px; background: var(--lime); }
.brand-mark i { width: 5px; background: #18362a; border-radius: 2px; height: 9px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 21px; }
.sidebar-body { margin: 0 15px; padding: 22px 0; border-top: 1px solid #2d4037; }
.nav-caption { padding: 0 10px 12px; color: #abc0b4; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 650; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; min-height: 39px; margin-bottom: 4px; border-radius: 8px; color: #d3e3db; font-size: 13px; line-height: 1.3; }
.nav-item:hover { background: #1e392e; }
.nav-item.selected { color: var(--lime); background: #244133; box-shadow: inset 2px 0 var(--lime); font-weight: 650; }
.nav-icon { color: #a1c5b0; text-align: center; width: 19px; flex: none; font-size: 17px; line-height: 1; }
.nav-item.selected .nav-icon { color: var(--lime); }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin: auto 15px 0; padding: 19px 9px 23px; border-top: 1px solid #2d4037; }
.profile-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #294638; color: var(--lime); font-size: 19px; }
.sidebar-profile strong, .sidebar-profile small { display: block; }
.sidebar-profile strong { font-size: 13px; }
.sidebar-profile small { margin-top: 2px; font-size: 11px; color: #abc0b4; }

.shell { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; padding: 12px clamp(20px, 3vw, 46px); border-bottom: 1px solid var(--line); background: #f9fcfa; }
.breadcrumb, .session { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; font-size: 13px; }
.breadcrumb a, .breadcrumb > span { color: var(--muted); }
.breadcrumb a:hover { text-decoration: underline; }
.environment { display: inline-flex; align-items: center; gap: 7px; color: #4d512c; background: #eef0df; padding: 6px 9px; border-radius: 6px; font-size: 11px; font-weight: 650; }
.environment i { width: 6px; height: 6px; background: #817537; border-radius: 50%; }
.profile-menu { position: relative; }
.profile-menu summary { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--white); cursor: pointer; font-weight: 700; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary b { padding-left: 7px; color: var(--muted); }
.profile-options { position: absolute; z-index: 2; right: 0; top: calc(100% + 5px); min-width: 150px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 10px 20px #13291d16; overflow: hidden; }
.profile-options a, .profile-options button { width: 100%; display: block; text-align: left; padding: 10px 13px; background: var(--white); border: 0; }
.profile-options a:hover, .profile-options button:hover { background: #eaf2ee; }
.main { width: min(100%, 1480px); margin: 0 auto; padding: 30px clamp(20px, 3vw, 46px) 42px; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 250px; display: flex; flex-direction: column; justify-content: center; align-items: start; gap: 20px; padding: 28px 34px; border-radius: 16px; background: linear-gradient(102deg, #10332b 18%, #164d3d 78%, #21634b); color: #f7fdf9; }
.hero-text, .hero-action { position: relative; z-index: 1; }
.hero-text { max-width: 75%; }
.role-label { font-size: 13px; font-weight: 650; color: var(--lime); display: flex; align-items: center; gap: 8px; }
.role-label span { text-align: center; min-width: 23px; border: 1px solid #97c27b80; border-radius: 6px; padding: 1px 3px; }
.hero h1 { margin: 9px 0 8px; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.045em; line-height: 1.06; }
.hero-description { color: #d5e9dc; max-width: 550px; font-size: 15px; line-height: 1.5; }
.hero-action, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 10px 14px; border: 1px solid transparent; border-radius: 8px; background: var(--lime); color: #1a3025; font-size: 13px; font-weight: 750; }
.hero-action:hover, .primary-button:hover { background: #baf16e; }
.hero-action span { font-size: 15px; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(46%, 510px); overflow: hidden; background: linear-gradient(90deg, transparent, #75c09812), repeating-linear-gradient(0deg, transparent 0 25px, #b4edaa19 25px 26px), repeating-linear-gradient(90deg, transparent 0 25px, #b4edaa19 25px 26px); mask-image: linear-gradient(90deg, transparent, #000 37%); }
.hero-art i { position: absolute; display: block; width: 212px; height: 212px; transform: rotate(-34deg) skew(12deg, 12deg); border: 1px solid #b9ef9e8f; border-radius: 28px; right: 62px; top: 31px; background: #a5f18f11; }
.hero-art i:nth-child(2) { right: 101px; top: 72px; background: #b0f29128; }
.hero-art i:nth-child(3) { right: 141px; top: 112px; background: #b0f2912f; }
.hero-art i:nth-child(4) { right: 197px; top: 61px; width: 24px; height: 24px; transform: none; border-radius: 6px; background: #d1fa90; }
.hero-art i:nth-child(5) { right: 35px; top: 190px; width: 13px; height: 13px; transform: none; border-radius: 50%; background: #d1fa90; }

.section-heading, .panel-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
.section-heading { margin: 26px 0 12px; }
.section-heading h2, .panel-heading h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.025em; }
.section-heading > span, .panel-heading > span { color: var(--muted); font-size: 12px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 158px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 3px #1b312405; }
a.metric-card:hover { border-color: #77a991; box-shadow: 0 3px 8px #1b312411; }
.metric-icon, .row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px; background: #e8f3ec; color: #235d43; font-size: 20px; line-height: 1; }
.metric-arrow { position: absolute; top: 15px; right: 16px; color: #587669; font-size: 15px; }
.metric-label { font-size: 13px; font-weight: 650; margin-top: 9px; color: #3f574d; }
.metric-value { overflow-wrap: anywhere; font-size: 37px; font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -.035em; margin-top: 3px; }
.metric-value small { font-size: 15px; letter-spacing: 0; }
.metric-value.muted { color: #486458; }
.metric-note { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #9aaea4; vertical-align: middle; }
.dot.on { background: #37875c; }

.dashboard-bottom, .workspace-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 15px; margin-top: 19px; }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 3px #1b312405; }
.panel-heading { padding: 16px 17px 12px; border-bottom: 1px solid #edf1ee; }
.workspace-links, .source-list { padding: 0 17px; }
.workspace-links li + li, .source-list li + li { border-top: 1px solid #eaf0ed; }
.workspace-links a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; }
.workspace-links a:hover strong, .panel-footer:hover { color: var(--green); text-decoration: underline; }
.workspace-links strong, .workspace-links small { display: block; }
.workspace-links strong { font-size: 13px; }
.workspace-links small { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.row-icon { width: 32px; height: 32px; font-size: 17px; }
.link-arrow, .panel-footer { color: #236147; }
.source-list a, .source-list li > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; padding: 10px 0; font-size: 13px; }
.source-list a:hover > span { text-decoration: underline; }
.source-list li span { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.source-state { border-radius: 5px; background: #eef2f0; color: #53665c; font-size: 10.5px; font-weight: 650; padding: 3px 6px; }
.source-state.ready { background: #e1f3e8; color: #236147; }
.panel-footer { display: flex; justify-content: space-between; padding: 10px 17px; border-top: 1px solid #edf1ee; font-size: 12px; font-weight: 700; }

.page-heading { margin-bottom: 20px; }
.page-heading > a { font-size: 13px; font-weight: 700; color: var(--green); }
.page-title { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.page-title h1 { font-size: clamp(25px, 4vw, 41px); letter-spacing: -.04em; line-height: 1.14; }
.page-heading p, .connector-body p, .auth-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.connector-body, .empty { padding: 16px 17px; }
.connector-body .dot { margin-right: 4px; }
.empty { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { border-bottom: 1px solid #edf1ee; padding: 10px 12px; }
th { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.stack-form { display: grid; justify-items: start; gap: 14px; padding: 16px 17px; }
.stack-form > div { width: 100%; }
.stack-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.stack-form input, .stack-form select { width: 100%; border: 1px solid #aabfb1; background: #fbfdfc; padding: 8px; border-radius: 6px; color: var(--ink); }
.helptext, .errorlist { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.errorlist { color: #a11231; }
.subtle-button { border: 1px solid #aabfb1; background: #f2f7f4; color: var(--green); padding: 5px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.subtle-button:hover { background: #e2f0e8; }
.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.auth-card { width: min(100%, 420px); padding: 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 750; }
.auth-card h1 { margin-bottom: 12px; font-size: 28px; }
.auth-card .stack-form { padding: 0; }
.auth-card .primary-button { margin-top: 8px; }

@media (max-width: 1000px) {
  .app { grid-template-columns: 205px minmax(0, 1fr); }
  .brand { padding-inline: 18px; }
  .sidebar-body { margin-inline: 10px; }
  .dashboard-bottom, .workspace-columns { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app { display: block; }
  .brand { padding: 14px 16px; }
  .sidebar-profile, .nav-caption { display: none; }
  .sidebar-body { margin: 0; padding: 6px 10px; }
  .sidebar-body nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav-item { white-space: nowrap; padding: 6px 8px; min-height: 30px; }
  .topbar { padding: 9px 12px; align-items: start; min-height: auto; }
  .breadcrumb, .session { gap: 5px 8px; }
  .session { justify-content: end; }
  .main { padding: 15px 12px 24px; }
  .hero { padding: 22px 16px; min-height: 215px; }
  .hero-text { max-width: 100%; }
  .hero-art { opacity: .24; }
  .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
}
@media (forced-colors: active) {
  .nav-item.selected { border: 1px solid; }
}

/* Unified inbox: stays inside TechRoom Control sidebar and session */
.unified-chat-grid{display:grid;grid-template-columns:minmax(210px,32%) 1fr;min-height:450px;max-height:680px;border-top:1px solid #e6eeea}
.unified-chat-list{overflow-y:auto;border-right:1px solid #e1e9e5;background:#fbfdfb}
.unified-chat{display:flex;flex-direction:column;gap:6px;padding:13px 15px;text-decoration:none;color:#18312a;border-bottom:1px solid #e5ece8}
.unified-chat small,.unified-thread-header small{font-size:12px;color:#62776d}
.unified-chat:hover,.unified-chat.active{background:#e5f4ec}
.unified-message-panel{display:flex;flex-direction:column;min-width:0}
.unified-thread-header{padding:15px 20px;display:flex;flex-direction:column;gap:5px;border-bottom:1px solid #e1e9e5}
.unified-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:20px;min-height:300px}
.unified-bubble{align-self:flex-start;border-radius:12px 12px 12px 2px;background:#eef3f0;padding:11px 15px;max-width:85%;overflow-wrap:anywhere;white-space:normal}
.unified-bubble.mine{align-self:flex-end;background:#d9f9e6;border-radius:12px 12px 2px 12px}
.unified-bubble small{display:block;color:#567266;font-size:11px;text-align:right;margin-top:8px}
.unified-message-footer{border-top:1px solid #e1e9e5;padding:16px 20px;font-size:13px;color:#5f7368}
.unified-form{display:grid;gap:14px;max-width:760px;padding:24px}
.unified-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:15px}
.unified-permissions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.unified-permissions label{display:flex;align-items:center;gap:8px;font-size:13px;padding:8px;background:#f4f8f6;border-radius:8px}
.unified-form input,.unified-form select{max-width:480px;padding:10px;border:1px solid #cad7cf;border-radius:8px}
.unified-form .errorlist{color:#a63636}
@media (max-width:800px){.unified-chat-grid{grid-template-columns:1fr;max-height:none}.unified-chat-list{max-height:220px;border-right:0;border-bottom:1px solid #e1e9e5}.unified-permissions{grid-template-columns:1fr}}

/* ================================================================
   TechRoom Control — visual system V3
   Design-only overlay: shared navigation, inbox, calls, staff and channels.
   No external fonts, scripts, trackers or network assets.
   ================================================================ */
:root {
  --ink: #172b26;
  --muted: #64746e;
  --paper: #f4f7f6;
  --white: #fff;
  --line: #e2eae6;
  --dark: #0c2621;
  --dark-raised: #193a2f;
  --lime: #c9f49c;
  --green: #205a3c;
  --shadow: 0 2px 6px rgba(13,40,29,.035), 0 10px 24px rgba(13,40,29,.025);
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }
body { background: var(--paper); line-height: 1.48; }
a, button, input, select { transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s; }
button, input, select, textarea { font: inherit; }
button:disabled, input:disabled { cursor: not-allowed; }
input::placeholder { color: #95a29c; }
[hidden] { display: none !important; }
.tr-svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.app { grid-template-columns: 252px minmax(0,1fr); align-items: start; }
.sidebar { position: sticky; top: 0; min-height: 100dvh; height: 100dvh; overflow-y: auto; background: linear-gradient(165deg,#0d2b24 0%, #0c211d 100%); color: #e7f2eb; scrollbar-width: thin; scrollbar-color: #3a5549 transparent; }
.brand { padding: 27px 19px 25px; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: #b6f18c; box-shadow: 0 4px 16px #aafa7b15; }
.brand strong { font-size: 21px; letter-spacing: -.9px; white-space: nowrap; }
.brand small { font-size: 9px; letter-spacing: .24em; }
.sidebar-body { flex: 1; border-top: 1px solid #335347; margin: 0 15px; padding: 24px 0; }
.nav-caption { padding-left: 13px; padding-bottom: 15px; color: #a4c4b4; font-size: 10px; letter-spacing: .13em; }
.nav-item { min-height: 44px; margin-bottom: 4px; padding: 10px 13px; gap: 14px; color: #e1ece5; border-radius: 10px; font-size: 13px; font-weight: 520; }
.nav-item:hover { background: #204437; }
.nav-item.selected { color: #d3ff9a; background: #24493a; box-shadow: inset 3px 0 0 #c9fa93; font-weight: 730; }
.nav-icon { display: grid; place-items: center; width: 20px; height: 22px; color: #9dcbb5; }
.nav-item.selected .nav-icon { color: #cffb95; }
.nav-icon .tr-svg { width: 19px; height: 19px; }
.sidebar-profile { min-height: 82px; margin: 0 16px; padding: 15px 7px 20px; gap: 12px; }
.profile-icon { width: 41px; height: 41px; border-radius: 12px; background: #224737; border: 1px solid #375b45; }
.profile-icon .tr-svg { width: 19px; height: 19px; }
.profile-identity { min-width: 0; }
.sidebar-profile strong { font-size: 12px; overflow-wrap: anywhere; }
.sidebar-profile small { color: #a9c5b5; font-size: 11px; }
.shell { min-width: 0; }
.topbar { min-height: 68px; padding: 10px clamp(22px,2.4vw,36px); gap: 16px; background: #fff; border-bottom: 1px solid #e2e8e4; }
.topbar-primary { flex: 1; min-width: 0; }
.topbar-quicksearch { display: flex; align-items: center; gap: 11px; max-width: 525px; min-height: 42px; padding: 8px 13px; background: #f4f7f6; border: 1px solid #e5ece8; border-radius: 12px; color: #6a7e73; font-size: 13px; }
.topbar-quicksearch:hover { border-color: #b9d1c1; background: #f0f7f3; }
.topbar-quicksearch kbd { margin-left: auto; padding: 1px 7px; background: #e9efec; border-radius: 5px; font-family: inherit; font-size: 12px; color: #829287; }
.topbar-search-icon { display: inline-flex; color: #6f8276; }
.topbar-workspace { display: inline-flex; align-items: center; gap: 10px; color: #455e51; font-weight: 600; }
.workspace-dot { display: inline-block; height: 9px; width: 9px; border-radius: 3px; background: #aedb97; }
.topbar-workspace-brand { color: #91a29a; font-size: 12px; font-weight: 400; }
.topbar-divider { width: 1px; height: 28px; background: #e6ece8; }
.profile-menu { z-index: 20; }
.profile-menu summary { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px; border-radius: 10px; }
.profile-menu summary:hover { background: #f0f5f2; }
.topbar-avatar { display: grid; place-items: center; height: 35px; width: 35px; border-radius: 10px; background: #22573a; color: #fff; font-size: 11px; font-weight: 800; }
.topbar-profile-label { display: grid; gap: 1px; text-align: left; }
.topbar-profile-label strong { font-size: 12px; font-weight: 760; }
.topbar-profile-label small { font-size: 10px; color: var(--muted); font-weight: 500; }
.profile-chevron { color: #6e8075; margin-left: 4px; }
.profile-options { z-index: 20; top: calc(100% + 10px); min-width: 230px; padding: 6px; border-radius: 13px; box-shadow: 0 14px 40px #19352824; }
.profile-options a,.profile-options button { border-radius: 8px; padding: 11px; font-size: 12px; }
.pathbar { display: flex; align-items: center; gap: 15px; min-height: 49px; padding: 10px clamp(22px,2.4vw,36px); background: #fbfcfb; border-bottom: 1px solid #e6eeea; color: #5b7766; font-size: 12px; }
.pathbar span { color: #a2b3aa; }
.pathbar strong { color: var(--ink); font-weight: 750; }
.pathbar a:hover { color: var(--green); text-decoration: underline; }
.main { width: 100%; max-width: 1750px; padding: 28px clamp(18px,2.4vw,36px) 48px; }
.panel,.metric-card,.context-card,.mini-stat,.staff-snapshot article { border: 1px solid #e2eae6; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { align-items: center; padding: 20px 22px; gap: 10px 16px; }
.panel-heading h2 { font-size: 17px; font-weight: 770; letter-spacing: -.025em; color: #142b22; }
.panel-subheading { margin-top: 4px; font-size: 12px; color: var(--muted); }
.page-heading { margin: 0 0 26px; }
.page-heading > a,.back-link { display: inline-flex; align-items: center; padding: 2px 0; color: var(--green); font-size: 12px; font-weight: 720; margin-bottom: 15px; }
.page-heading .page-title { gap: 13px; margin: 8px 0 8px; }
.page-title h1,.page-heading > h1,.page-heading--action h1 { font-size: clamp(29px,3vw,39px); font-weight: 820; letter-spacing: -.05em; line-height: 1.2; }
.page-heading > p,.page-heading--action p { margin-top: 7px; font-size: 13px; color: var(--muted); }
.page-title .metric-icon { height: 43px; width: 43px; border-radius: 12px; background: #e5f3e8; }
.eyebrow { color: #648574; font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.page-heading--action { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero { border-radius: 18px; background: linear-gradient(112deg,#12362a 0%,#1e6442 90%); padding: 35px; }
.hero h1 { font-size: clamp(34px,3.8vw,48px); }
.hero-action, .primary-button { background: #21573b; color: #fff; border: 1px solid #20573b; border-radius: 10px; padding: 12px 17px; font-size: 13px; box-shadow: 0 2px 7px #184d3920; }
.hero-action { background: #cbfa91; color: #163521; border-color: #c0ec88; }
.hero-action:hover { background: #b9f274; }
.primary-button:hover { background: #15482e; color: #fff; }
.metric-card { min-height: 151px; padding: 18px 20px; }
.metric-value { font-size: 35px; }
.metric-label { margin-top: 12px; font-weight: 670; }
.metrics-grid { gap: 16px; }
.section-heading { margin: 31px 0 15px; }
.workspace-columns { gap: 18px; }
.table-wrap { overflow-x: auto; }
table { font-size: 13px; border-spacing: 0; }
th { background: #fbfcfb; color: #6c8175; font-size: 11px; font-weight: 760; text-transform: none; letter-spacing: .01em; }
th,td { padding: 15px 18px; border-color: #ecf1ee; }
tr:hover td { background: #fbfdfb; }
tr:last-child td { border-bottom: 0; }
.empty { color: #798c80; padding: 22px; font-size: 13px; }
.primary-button:focus-visible, .secondary-button:focus-visible { outline-offset: 3px; }
.secondary-button { display: inline-flex; justify-content: center; align-items: center; padding: 11px 16px; border: 1px solid #d5e4d9; border-radius: 10px; background: #f8faf8; color: #345745; font-size: 13px; font-weight: 750; }
.secondary-button:hover { background: #e9f4ed; }
.subtle-button { padding: 8px 11px; border-color: #bdd9c8; background: #edf7f0; border-radius: 8px; }
/* Avito inbox: three columns, real data, no imaginary customer fields */
.avito-area { display: grid; gap: 15px; }
.inbox-toolbar { display: grid; gap: 15px; }
.inbox-summary,.inbox-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; border-radius: 11px; padding: 7px 14px; font-weight: 750; color: #254c36; background: #edf4ee; }
.summary-pill strong { background: #d4efcd; border-radius: 7px; padding: 2px 6px; font-size: 12px; }
.summary-pill--selected { background: #d8f6bb; }
.summary-description { color: #788b7f; font-size: 12px; }
.inbox-tools { justify-content: space-between; }
.inbox-search-label,.staff-search-label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; background: #fff; color: #688176; border: 1px solid #dae7df; border-radius: 11px; box-shadow: 0 1px 3px #1c3e2708; }
.inbox-search-label { width: min(460px,100%); }
.inbox-search-label:focus-within,.staff-search-label:focus-within { outline: 2px solid #abd7b8; outline-offset: 1px; }
.inbox-search-label input,.staff-search-label input { min-width: 0; flex: 1; border: 0; padding: 11px 2px; background: transparent; color: var(--ink); outline: none; }
.inbox-filter-label { color: #6e8577; font-size: 12px; padding: 10px 15px; border-radius: 10px; background: #fff; border: 1px solid #e2eae6; }
.inbox-layout { display: grid; grid-template-columns: minmax(235px,27%) minmax(340px,1fr) minmax(215px,24%); min-height: 640px; height: min(76vh,795px); background: #fff; border: 1px solid #e1e9e5; border-radius: 15px; box-shadow: var(--shadow); overflow: hidden; }
.chat-rail { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid #e9eeeb; }
.chat-rail-title { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 17px 18px; min-height: 61px; border-bottom: 1px solid #e9eeeb; }
.chat-rail-title strong { font-size: 14px; }
.chat-rail-title > span { color: #8a9e90; font-size: 11px; }
.unified-chat-list { display: block; flex: 1; min-height: 0; overflow-y: auto; background: #fff; }
.unified-chat { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: start; gap: 10px; margin: 4px 8px; padding: 14px 10px; border: 0; border-bottom: 1px solid #f0f3f0; border-radius: 9px; }
.unified-chat.active { background: linear-gradient(100deg,#e7f5e5,#f4fbf0); border-color: transparent; }
.unified-chat:hover { background: #eef7ef; }
.chat-avatar,.thread-avatar,.context-avatar { display: grid; place-items: center; flex: none; border-radius: 13px; width: 39px; height: 39px; background: #e2f2dc; color: #2f7642; font-size: 16px; font-weight: 760; }
.chat-summary { min-width: 0; display: grid; gap: 5px; }
.chat-title { display: block; font-size: 12px; font-weight: 780; color: #1b3024; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-excerpt { color: #74867b; font-size: 11px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; color: #87988d; font-size: 10px; white-space: nowrap; }
.unread-badge { border-radius: 10px; background: #aee88b; padding: 2px 6px; font-size: 10px; font-weight: 800; color: #274c2c; }
.thread-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.thread-heading { display: flex; align-items: center; gap: 11px; flex: none; padding: 12px 16px; min-height: 62px; border-bottom: 1px solid #e8eee8; }
.thread-avatar { height: 38px; width: 38px; border-radius: 50%; }
.thread-identity { display: grid; min-width: 0; gap: 3px; }
.thread-identity strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-identity small { font-size: 11px; color: #718577; }
.thread-source { margin-left: auto; background: #f0f7f4; color: #31744e; border: 1px solid #d9eae0; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 730; }
.unified-messages { flex: 1; min-height: 0; padding: 24px 20px; gap: 13px; background: radial-gradient(circle at 50% 0%,#fbfcfb,#fff 70%); overflow-y: auto; }
.unified-bubble { max-width: min(86%,550px); font-size: 12px; line-height: 1.58; padding: 12px 15px; border-radius: 13px 13px 13px 3px; background: #eff3f0; color: #263d2e; box-shadow: 0 1px 1px #1f3b2b08; }
.unified-bubble.mine { background: #dff3d8; border-radius: 13px 13px 3px 13px; }
.bubble-body { overflow-wrap: anywhere; }
.unified-bubble small { margin-top: 5px; font-size: 10px; color: #698073; }
.read-only-composer { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-height: 61px; padding: 12px 15px; background: #fff; border-top: 1px solid #e7eee9; color: #708575; font-size: 11px; }
.lock-illustration { display: grid; place-items: center; width: 30px; height: 30px; flex: none; background: #eef3ef; color: #789784; border-radius: 8px; font-size: 16px; }
.read-only-chip { margin-left: auto; background: #f0f3f0; border-radius: 7px; padding: 6px 9px; white-space: nowrap; font-size: 10px; color: #677b6e; }
.thread-placeholder { margin: auto; padding: 20px; text-align: center; color: #899a8e; }
.thread-placeholder > span { font-size: 40px; }
.thread-placeholder strong { display: block; color: #3a5847; }
.thread-placeholder p { margin-top: 5px; }
.chat-context { display: grid; align-content: start; gap: 12px; min-width: 0; overflow-y: auto; background: #f8faf8; padding: 12px; border-left: 1px solid #e7eee9; }
.context-card { min-width: 0; box-shadow: none; padding: 17px 14px; border-radius: 12px; }
.context-card h3 { font-size: 13px; font-weight: 780; margin: 0 0 17px; }
.context-identity { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.context-avatar { height: 36px; width: 36px; border-radius: 11px; }
.context-identity div { min-width: 0; display: grid; gap: 4px; }
.context-identity strong { overflow-wrap: anywhere; font-size: 12px; }
.context-identity small { font-size: 11px; color: #728b78; }
.context-details { margin: 0; padding: 0; }
.context-details div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #eef2ee; padding: 12px 0; }
.context-details dt { font-size: 11px; color: #7e8f84; }
.context-details dd { margin: 0; text-align: right; font-size: 11px; color: #30503c; font-weight: 760; }
.context-feature { display: flex; align-items: flex-start; gap: 9px; padding: 11px 0; }
.context-feature + .context-feature { border-top: 1px solid #edf2ee; }
.context-feature-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; flex: none; color: #31744b; background: #e3f3e5; font-weight: 800; }
.context-feature-icon--muted { color: #8c9d90; background: #edf1ed; }
.context-feature strong { font-size: 11px; }
.context-feature p { margin-top: 3px; font-size: 11px; color: #7b8d7e; line-height: 1.4; }
/* Calls and connected channels */
.overview-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.mini-stat { min-height: 115px; padding: 21px; display: flex; flex-direction: column; gap: 5px; }
.mini-stat > span { color: #657f70; font-size: 12px; font-weight: 680; }
.mini-stat strong { font-size: 29px; line-height: 1.35; letter-spacing: -.04em; font-weight: 790; }
.mini-stat .stat-word { font-size: 20px; padding-top: 6px; }
.mini-stat .stat-pending { font-size: 17px; color: #859b8c; }
.mini-stat small { color: #879a8c; font-size: 11px; }
.calls-panel .panel-footnote { padding: 18px 22px; color: #819187; font-size: 12px; border-top: 1px solid #edf1ed; line-height: 1.6; }
.calls-table th,.calls-table td { padding: 16px 21px; }
.cell-time { color: #456453; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-strong { font-weight: 690; }
.extension-chip { display: inline-flex; justify-content: center; background: #eef7ef; border: 1px solid #dcece0; border-radius: 7px; min-width: 29px; padding: 4px 8px; color: #275b3f; font-weight: 780; }
.call-state { display: inline-flex; background: #f1f3f1; border-radius: 7px; padding: 5px 9px; color: #607466; font-size: 11px; font-weight: 650; }
.channels-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin-top: 0; }
.channel-panel .panel-heading { min-height: 92px; }
.channel-rows { padding: 0 20px 10px; }
.channel-row { display: flex; align-items: center; gap: 12px; min-height: 81px; padding: 11px 0; }
.channel-row + .channel-row { border-top: 1px solid #edf2ef; }
.channel-logo { flex: none; display: grid; place-items: center; height: 43px; width: 43px; border-radius: 12px; background: #e4f4e3; color: #2b763e; font-weight: 850; font-size: 17px; }
.channel-logo--mango { background: #e6f3eb; color: #27754d; }
.channel-logo--future { background: #f0f3f0; color: #77887d; }
.channel-row-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.channel-row-main strong { font-size: 13px; font-weight: 760; }
.channel-row-main small { color: #87998c; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; background: #f0f4f1; border-radius: 7px; color: #728478; padding: 7px 9px; font-size: 10px; font-weight: 760; white-space: nowrap; }
.status-pill i { height: 6px; width: 6px; border-radius: 50%; background: #a3b4a9; }
.status-pill--active { color: #28694b; background: #e9f8ed; }
.status-pill--active i { background: #54aa78; }
.note-banner { display: flex; align-items: start; gap: 12px; padding: 17px 20px; border: 1px solid #ddebe2; border-radius: 13px; background: #edf5ef; margin-top: 18px; color: #547060; }
.note-icon { display: grid; place-items: center; flex: none; height: 21px; width: 21px; border: 1px solid #a7c7af; color: #497c59; border-radius: 50%; font-size: 12px; font-weight: 800; }
.note-banner p { font-size: 12px; line-height: 1.6; }
/* Employees */
.staff-snapshot { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.staff-snapshot article { display: grid; gap: 9px; padding: 20px; }
.staff-snapshot span { font-size: 12px; color: #789081; }
.staff-snapshot strong { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.staff-panel .panel-heading { gap: 18px; }
.staff-search-label { width: min(280px,100%); }
.staff-table th,.staff-table td { padding: 17px 19px; }
.staff-identity { display: flex; align-items: center; gap: 11px; }
.staff-avatar { flex: none; display: grid; place-items: center; height: 37px; width: 37px; border-radius: 11px; background: #e5f5e2; color: #2d7b4b; font-size: 15px; font-weight: 780; }
.staff-identity > div { display: grid; gap: 3px; }
.staff-identity strong { font-size: 12px; }
.staff-identity small { color: #87998d; font-size: 11px; }
.role-chip { display: inline-flex; padding: 6px 9px; margin: 2px 4px 2px 0; background: #edf5f0; border: 1px solid #e0ede4; color: #38664d; border-radius: 7px; font-size: 11px; font-weight: 700; }
.muted-text { color: #95a49a; font-size: 12px; }
.table-action { color: #286b48; font-weight: 740; font-size: 12px; white-space: nowrap; }
.table-action:hover { text-decoration: underline; }
.staff-editor-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(225px,28%); gap: 18px; align-items: start; }
.staff-form-panel { overflow: hidden; }
.unified-form { max-width: none; padding: 24px; gap: 24px; }
.form-fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 18px; align-items: start; }
.form-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.form-field > label { display: block; font-size: 12px; font-weight: 770; color: #304c3b; }
.form-field input:not([type=checkbox]),.form-field select,.form-field textarea { height: 44px; width: 100%; max-width: none; padding: 10px 13px; border: 1px solid #dae6dd; background: #fbfcfb; border-radius: 10px; color: var(--ink); }
.form-field input:focus,.form-field select:focus { outline: 2px solid #a4d8b0; outline-offset: 1px; }
.form-field--username,.form-field--role,.form-field--permissions,.form-field--is_active { grid-column: 1 / -1; }
.form-field--username input { max-width: 340px !important; }
.form-field--role select { max-width: 360px !important; }
.field-help { font-size: 11px; color: #819386; line-height: 1.4; }
.form-field--permissions > div,.form-field--permissions > ul,.unified-permissions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.form-field--permissions > div > div { min-width: 0; }
.form-field--permissions > div label,.form-field--permissions label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e2ebe5; border-radius: 9px; background: #f9fcfa; cursor: pointer; font-size: 12px; font-weight: 550; }
.form-field input[type=checkbox] { width: 17px; height: 17px; accent-color: #277650; flex: none; }
.form-field--checkbox .checkbox-label { display: inline-flex; align-items: center; gap: 10px; }
.unified-form .errorlist { color: #b64245; font-size: 11px; margin: 3px 0; }
.unified-actions { margin-top: 0; padding-top: 21px; border-top: 1px solid #e8efeb; gap: 11px; }
.staff-form-aside { display: grid; gap: 15px; }
.staff-form-aside .context-card { padding: 21px; }
.staff-form-aside .context-card h3 { margin-bottom: 16px; }
.card-help { margin-bottom: 16px; color: #778a7d; font-size: 12px; line-height: 1.6; }
.auth-body { background: radial-gradient(circle at 10% 12%,#e0f6dd,#f4f7f6 55%); }
.auth-card { max-width: 440px; border-radius: 19px; padding: 34px; }
.auth-brand { font-size: 17px; }
.auth-card h1 { font-size: 31px; letter-spacing: -.04em; }
.auth-card .stack-form { margin-top: 22px; }
.auth-card .stack-form input { min-height: 43px; border-radius: 10px; border-color: #d4e4d8; }
.auth-card .primary-button { width: 100%; min-height: 44px; }
/* Layout remains usable on desktop, laptop, tablet and mobile */
@media (max-width: 1430px) {
  .app { grid-template-columns: 226px minmax(0,1fr); }
  .brand { padding-inline: 16px; }
  .brand strong { font-size: 19px; }
  .inbox-layout { grid-template-columns: minmax(215px,30%) minmax(300px,1fr); }
  .chat-context { display: none; }
}
@media (max-width: 1120px) {
  .app { grid-template-columns: 205px minmax(0,1fr); }
  .nav-item { padding-inline: 10px; font-size: 12px; gap: 10px; }
  .channels-columns,.staff-editor-layout { grid-template-columns: minmax(0,1fr); }
  .staff-form-aside { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .app { display: block; }
  .sidebar { height: auto; position: relative; min-height: 0; overflow: visible; }
  .brand { padding: 13px 16px; }
  .brand strong { font-size: 19px; }
  .sidebar-body { border-top: 1px solid #375c4e; margin: 0; padding: 7px 12px; overflow-x: auto; }
  .sidebar-nav { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; }
  .nav-caption,.sidebar-profile { display: none; }
  .nav-item { flex: none; white-space: nowrap; margin: 0; min-height: 35px; padding: 8px 11px; }
  .topbar { min-height: 53px; padding: 7px 16px; }
  .topbar-workspace-brand,.topbar-profile-label,.topbar-divider { display: none; }
  .pathbar { padding: 10px 17px; }
  .main { padding: 20px 14px 34px; }
  .inbox-layout { grid-template-columns: minmax(210px,35%) minmax(0,1fr); min-height: 600px; height: 68vh; }
  .staff-form-aside { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .page-heading--action { align-items: stretch; flex-direction: column; }
  .page-heading--action .primary-button { align-self: stretch; }
  .page-title h1,.page-heading > h1 { font-size: 30px; }
  .inbox-layout { display: flex; flex-direction: column; max-height: none; height: auto; min-height: 0; }
  .chat-rail { height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .thread-panel { min-height: 470px; height: 60vh; }
  .read-only-chip { display: none; }
  .inbox-summary { align-items: start; }
  .overview-strip,.staff-snapshot,.form-fields-grid { grid-template-columns: 1fr; }
  .form-field--username,.form-field--role,.form-field--permissions,.form-field--is_active { grid-column: auto; }
  .form-field--permissions > div,.form-field--permissions > ul { grid-template-columns: 1fr; }
  .channel-row { flex-wrap: wrap; }
  .channel-row .status-pill { margin-left: 55px; }
  .staff-panel .panel-heading { flex-direction: column; align-items: stretch; }
  .staff-search-label { width: 100%; }
  .hero-text { max-width: 100%; }
  .hero { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition-duration: 0s !important; } }
/* Native checkbox widgets must not inherit the padding of text inputs. */
.form-field input[type=checkbox] { padding: 0; border: 0; max-width: 17px; box-shadow: none; }

/* TechRoom Control V3.1 — independent inbox scroll and chat pane navigation */
@media (min-width: 651px) {
  .inbox-layout {
    grid-template-rows: minmax(0, 1fr);
    height: clamp(540px, 76vh, 795px);
    min-height: 0;
  }
}
.inbox-layout > .chat-rail,
.inbox-layout > .thread-panel,
.inbox-layout > .chat-context { min-height: 0; max-height: 100%; }
.inbox-layout > .chat-rail { overflow: hidden; }
.chat-rail-title { flex: 0 0 auto; }
.chat-rail > .unified-chat-list {
  display: block;
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #b7cfc0 #f4f8f5;
}
.chat-rail > .unified-chat-list::-webkit-scrollbar { width: 9px; }
.chat-rail > .unified-chat-list::-webkit-scrollbar-thumb { background: #b7cfc0; border-radius: 9px; border: 2px solid #f4f8f5; }
.chat-rail > .unified-chat-list::-webkit-scrollbar-track { background: #f4f8f5; }
.chat-rail > .unified-chat-list:focus-visible { outline: 2px solid #3c9063; outline-offset: -2px; }
.unified-chat[hidden], #chat-search-empty[hidden] { display: none !important; }
.inbox-layout > .thread-panel { overflow: hidden; }
.inbox-layout .unified-messages { overflow-y: auto; overscroll-behavior-y: contain; }
.avito-is-loading .thread-heading { opacity: .7; }
.avito-live-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.avito-live-status.has-error { position: static; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; overflow: visible; background: #fff0ef; border: 1px solid #f2c5bd; color: #983b2d; border-radius: 9px; }
@media (max-width: 650px) {
  .inbox-layout > .chat-rail { height: 270px; min-height: 270px; max-height: 270px; }
  .chat-rail > .unified-chat-list { flex: 1 1 0; height: 0; }
  .inbox-layout > .thread-panel { min-height: 450px; height: 60vh; max-height: none; }
}

/* TechRoom Avito Queue V1: status tabs, employee filter, workflow controls. */
.avito-status-tabs { gap: 7px; }
.avito-status-tabs .summary-pill { border: 1px solid #e0ebe0; font-size: 12px; white-space: nowrap; padding: 7px 10px; }
.avito-status-tabs .summary-pill:not(.summary-pill--selected) { background: white; }
.avito-status-tabs .summary-pill:hover { border-color: #9dcfae; }
.avito-status-tabs .summary-pill--selected { border-color: #a7dda2; }
.avito-help-caption { margin: -4px 0 0; color: #647d70; font-size: 12px; }
.avito-staff-filter { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.avito-staff-filter label { font-size: 12px; color: #5b7366; white-space: nowrap; }
.avito-staff-filter select, .avito-queue-card select {
  width: 100%; padding: 9px 10px; border: 1px solid #d5e5db; border-radius: 9px;
  background: #fff; color: #244337; font: inherit; font-size: 12px;
}
.avito-queue-card form { display: grid; gap: 9px; margin-top: 11px; }
.avito-queue-card .primary-button { width: 100%; justify-content: center; }
.avito-queue-card .subtle-button { min-height: 34px; }
.avito-queue-card form label { font-weight: 650; color: #435c4c; font-size: 12px; }
.avito-queue-status > div { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; font-size: 12px; }
.avito-queue-status strong { color: #266d4a; }
.queue-assignee { color: #60766a; font-size: 12px; line-height: 1.5; }
.queue-assignee strong { display: block; color: #244236; margin-top: 3px; }
.chat-status-tag { display: block; margin-top: 5px; font-size: 10px; color: #2e7953; font-weight: 650; white-space: nowrap; }
.avito-csrf-holder { display: none; }
@media (max-width: 1430px) { .avito-status-tabs { overflow-x: auto; flex-wrap: nowrap; } }
@media (max-width: 650px) {
  .avito-status-tabs .summary-pill { min-width: max-content; }
  .avito-staff-filter { flex: 1; }
  .avito-staff-filter select { min-width: 120px; }
}


/* Avito order drafts (V1): compact, scrollable right-context form. */
.avito-order-card .avito-order-draft-form {display:flex;flex-direction:column;gap:7px;margin-top:12px;}
.avito-order-card .avito-order-draft-form label {font-size:12px;font-weight:650;color:#294a3f;}
.avito-order-card .avito-order-draft-form input,
.avito-order-card .avito-order-draft-form textarea {width:100%;min-width:0;box-sizing:border-box;padding:10px 11px;border:1px solid #d6e5dc;border-radius:10px;background:#fff;color:#16382d;font:inherit;}
.avito-order-card .avito-order-draft-form input:focus,
.avito-order-card .avito-order-draft-form textarea:focus {outline:2px solid #bceec4;outline-offset:1px;}
.avito-order-card .avito-order-draft-form button {margin-top:7px;}
.avito-order-card .avito-draft-feedback {margin:4px 0;font-size:12px;color:#37685b;min-height:1.5em;}

/* TechRoom Avito drafts V1.1 - explicit re-open/edit and responsive details drawer. */
.avito-order-card [hidden] { display: none !important; }
.avito-draft-heading { display: flex; gap: 7px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.avito-draft-heading h3 { margin: 0; }
.avito-draft-badge { border-radius: 30px; background: #e3f3dd; color: #206540; padding: 5px 8px; font-size: 10px; white-space: nowrap; font-weight: 750; }
.avito-order-card > .avito-draft-feedback { font-size: 12px; line-height: 1.5; color: #4a7562; margin: 0 0 12px; }
.avito-draft-details { display: grid; gap: 0; margin: 0 0 12px; }
.avito-draft-details > div { padding: 9px 0; border-top: 1px solid #eef2ed; }
.avito-draft-details dt { font-size: 11px; color: #687e71; }
.avito-draft-details dd { font-size: 12px; font-weight: 650; color: #214232; margin: 4px 0 0; overflow-wrap: anywhere; max-height: 70px; overflow-y: auto; }
.avito-draft-edit { width: 100%; justify-content: center; }
.avito-draft-form-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 10px; }
.avito-draft-form-actions > .primary-button { flex: 1; min-width: 150px; justify-content: center; }
.avito-draft-form-actions > .subtle-button { flex: 0 0 auto; }
.avito-draft-readonly { margin-top: 12px; }
.avito-open-order { cursor: pointer; border: 1px solid #badcc6; background: #f0faef; color: #256843; border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 12px; font-weight: 750; margin-left: auto; }
.avito-open-order:hover, .avito-open-order:focus-visible { background: #dff4e3; border-color: #86cba4; }
.avito-open-order + .thread-source { margin-left: 0; }
.avito-context-drawer-head { display: none; }
@media (max-width: 1430px) {
  .avito-area .inbox-layout { position: relative; }
  .avito-area .chat-context { display: none; position: absolute; right: 0; top: 0; bottom: 0; width: min(390px, 94%); max-width: 94%; max-height: none; z-index: 20; border-left: 1px solid #bfd9c9; box-shadow: -8px 0 30px #213e2b22; }
  .avito-area.avito-context-open .chat-context { display: grid; overflow-y: auto; }
  .avito-context-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 10px; background: #e7f2e9; border-radius: 10px; }
  .avito-context-drawer-head strong { font-size: 12px; }
  .avito-close-order { cursor: pointer; border: 1px solid #b6d2c0; background: white; border-radius: 8px; padding: 6px 9px; color: #244b34; font-size: 11px; }
}
@media (max-width: 650px) {
  .avito-area.avito-context-open .chat-context { position: relative; width: 100%; max-width: 100%; max-height: none; box-shadow: none; border: none; }
  .avito-area.avito-context-open .inbox-layout > .chat-context { max-height: none; }
  .avito-open-order { font-size: 11px; padding: 6px; }
}

.chat-draft-tag { display: block; padding-top: 3px; font-size: 10px; font-weight: 750; color: #88611e; white-space: normal; }

/* TechRoom Avito unified text composer */
.avito-send-form { padding: 14px 18px; border-top: 1px solid #dfe8e3; background: #fff; }
.avito-send-label { display:block; font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.avito-send-input-row { display:flex; gap: 10px; align-items:stretch; }
.avito-send-input-row textarea { flex: 1 1 auto; min-width: 0; min-height: 60px; padding: 12px; border: 1px solid #ceded5; border-radius: 12px; resize: vertical; font: inherit; }
.avito-send-input-row button { flex: 0 0 auto; align-self: flex-end; min-height: 46px; }
.avito-send-hint { color: #647a70; font-size: .75rem; margin-top: 6px; }
.avito-send-feedback { font-size: .83rem; margin: 6px 0 0; min-height: 1em; color: #365b48; }
@media (max-width: 650px) { .avito-send-input-row { flex-direction:column; } .avito-send-input-row button { align-self:stretch; } }
