:root {
  color-scheme: light;
  --bg: #f6f3eb;
  --sidebar: #272b25;
  --surface: #ffffff;
  --surface-2: #f3f2ed;
  --surface-3: #e8ecd9;
  --line: #dedfd5;
  --line-soft: #e9e8df;
  --control-line: #999d90;
  --text: #20221e;
  --muted: #5f655a;
  --muted-2: #6e7569;
  --accent: #e84916;
  --accent-hover: #bc3610;
  --accent-light: #ab310d;
  --accent-soft: #fff0e7;
  --success: #277045;
  --warning: #8a5208;
  --danger: #b72e38;
  --info: #295c80;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(32,34,30,.04);
  --shadow-overlay: 0 24px 64px rgba(32,34,30,.2);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}
body::before,
body::after {
  display: none;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; color: inherit; cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
h3 { margin-bottom: 5px; font-size: 15px; line-height: 1.35; }
p { line-height: 1.55; }
small { color: var(--muted); font-size: 12px; line-height: 1.5; }
code { padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--accent-light); background: var(--surface); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.workspace { min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: 20px 0 60px rgba(0, 0, 0, .14);
}
.brand { height: 76px; display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid var(--line-soft); font-size: 17px; font-weight: 780; letter-spacing: -.035em; background: var(--surface); }
.brand small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 12px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background:
    url('/favicon.svg') center / 67% no-repeat,
    linear-gradient(150deg, #ff9a57 0%, #dd671f 100%);
  box-shadow: 0 10px 28px rgba(221, 103, 31, .24);
}
.sidebar-close { display: none; margin-left: auto; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 18px 12px; scrollbar-width: thin; }
.nav-group { display: grid; gap: 3px; margin-bottom: 20px; }
.nav-label { padding: 0 10px 7px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 40px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 7px 10px; color: var(--text); background: transparent; text-align: left; font-size: 13px; font-weight: 610; transition: color .16s ease, background .16s ease, transform .16s ease; }
.nav-item:hover { color: var(--text); background: var(--surface); transform: translateX(1px); }
.nav-item.active { color: #fff; background: var(--surface); box-shadow: inset 2px 0 0 var(--accent), 0 12px 28px rgba(0, 0, 0, .12); }
.nav-glyph { width: 26px; height: 26px; display: grid; place-items: center; color: var(--text); font-size: 15px; }
.nav-item.active .nav-glyph { color: var(--accent-light); }
.nav-item b { min-width: 20px; padding: 2px 6px; border-radius: 99px; color: var(--text); background: var(--accent); text-align: center; font-size: 12px; }
.sidebar-footer { display: grid; gap: 14px; padding: 14px; border-top: 1px solid var(--line-soft); }
.system-pill { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.system-pill > i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(46, 211, 166, .08); }
.system-pill span { min-width: 0; display: grid; }
.system-pill strong { font-size: 12px; font-weight: 700; }
.system-pill small { color: var(--muted-2); font-size: 12px; }
.user-card { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.user-card > span:nth-child(2) { min-width: 0; display: grid; }
.user-card strong, .user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 12px; text-transform: capitalize; }
.user-card small { font-size: 12px; }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 850; }
.avatar.small { width: 31px; height: 31px; border-radius: 8px; font-size: 12px; }
.avatar.large { width: 58px; height: 58px; border-radius: 15px; color: var(--text); background: var(--accent); font-size: 18px; }
.quiet, .text-button, .danger-link { border: 0; padding: 0; color: var(--accent-light); background: transparent; text-align: left; font-size: 12px; font-weight: 750; }
.quiet { color: var(--muted); }
.danger-link { color: var(--danger); }
.text-button:hover, .quiet:hover, .danger-link:hover { filter: brightness(1.22); }

.topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: grid; grid-template-columns: minmax(130px, 1fr) minmax(280px, 520px) minmax(130px, 1fr); align-items: center; gap: 20px; padding: 0 clamp(22px, 3vw, 44px); border-bottom: 1px solid var(--line-soft); background: var(--surface); backdrop-filter: blur(18px); }
.breadcrumbs { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 12px; }
.breadcrumbs b { color: var(--text); }
.breadcrumbs strong { overflow: hidden; color: var(--text); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.global-search { position: relative; height: 40px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.global-search > span { color: var(--muted-2); font-size: 18px; transform: rotate(-12deg); }
.global-search input { height: 38px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.global-search kbd { border: 1px solid var(--line); border-bottom-color: var(--line); border-radius: 5px; padding: 3px 6px; color: var(--text); background: var(--surface); font-size: 12px; font-family: inherit; }
.command-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; padding: 8px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.command-results > small { display: block; padding: 9px 9px 4px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .14em; }
.command-results > p { margin: 0; padding: 17px; color: var(--muted); font-size: 12px; text-align: center; }
.command-results button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 7px; padding: 9px; background: transparent; text-align: left; }
.command-results button:hover { background: var(--surface-3); }
.command-results button > span:last-child { min-width: 0; display: grid; }
.command-results strong, .command-results em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-results strong { font-size: 12px; }
.command-results em { color: var(--muted); font-size: 12px; font-style: normal; }
.command-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--accent-light); background: var(--accent-soft); }
.top-action { justify-self: end; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 750; box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.top-action span { color: var(--accent); font-size: 15px; }
.menu-button { display: none; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 18px; }
.icon-button:hover { color: var(--text); background: var(--surface); }

.content { width: min(1580px, 100%); min-height: calc(100vh - 76px); margin: 0 auto; padding: 42px clamp(24px, 3.4vw, 54px) 80px; }
.page { animation: page-in .22s ease-out; }
@keyframes page-in { from { opacity: .25; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-header > div:first-child { max-width: 760px; }
.page-header .muted { margin-bottom: 0; }
.eyebrow { margin-bottom: 8px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .17em; }
.muted { color: var(--muted); font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 9px; padding-top: 3px; }
.primary, .secondary { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 12px; padding: 0 14px; color: #fff; background: var(--accent); font-size: 12px; font-weight: 820; box-shadow: 0 10px 28px rgba(221, 103, 31, .18); transition: transform .15s ease, filter .15s ease; }
.secondary { color: var(--text); border-color: var(--line); background: var(--surface); box-shadow: none; }
.primary:hover, .secondary:hover { filter: brightness(1.09); transform: translateY(-1px); }
.small-button { min-height: 31px; padding: 0 10px; font-size: 12px; }
.wide-button { width: 100%; }
.panel { border: 1px solid var(--line-soft); border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: 0 16px 48px rgba(0,0,0,.16); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
.panel-heading h2, .panel-heading p { margin-bottom: 0; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.executive-metrics { margin-bottom: 16px; }
.metric-card { position: relative; min-height: 142px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 20px; padding: 17px 18px; background: var(--surface); }
.metric-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--surface); opacity: .55; }
.metric-card.accent::after { background: var(--accent); opacity: 1; }
.metric-card.success::after { background: var(--success); opacity: .9; }
.metric-card.warning::after { background: var(--warning); opacity: .9; }
.metric-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-card > div i { min-width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 12px; font-style: normal; font-weight: 800; }
.metric-card.accent > div i { color: var(--accent-light); border-color: var(--line); background: var(--accent-soft); }
.metric-card strong { margin: auto 0 3px; font-size: clamp(25px, 2.6vw, 35px); letter-spacing: -.055em; }
.metric-card small { font-size: 12px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 16px; margin-bottom: 16px; }
.overview-grid.lower { grid-template-columns: 1fr 1fr; }
.revenue-panel, .attention-panel, .compact-table, .support-snapshot { min-height: 300px; padding: 21px; }
.revenue-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin: 25px 0 26px; }
.revenue-hero span { display: grid; gap: 5px; }
.revenue-hero span + span { border-left: 1px solid var(--line); padding-left: 24px; }
.revenue-hero small { color: var(--muted-2); font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.revenue-hero strong { font-size: 26px; letter-spacing: -.045em; }
.distribution-bar { height: 8px; display: flex; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.distribution-bar .segment { min-width: 2px; height: 100%; }
.segment-active { background: var(--success); }.segment-trialing { background: var(--info); }.segment-past_due { background: var(--warning); }.segment-canceled { background: var(--surface); }
.distribution-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.distribution-legend > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.distribution-legend .status { border: 0; padding: 0; background: transparent; }
.distribution-legend strong { font-size: 12px; }
.attention-list { display: grid; gap: 8px; }
.attention-list button { width: 100%; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line-soft); padding: 13px; color: inherit; background: #fff4e4; text-align: left; }
.attention-list button:hover { border-color: var(--line); background: #fff4e4; }
.attention-list button span { min-width: 0; display: grid; gap: 2px; }
.attention-list button strong { font-size: 12px; }
.attention-list button small { font-size: 12px; }
.attention-list button b { color: var(--accent-light); font-size: 12px; }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.alert-dot.danger { background: var(--danger); }.alert-dot.warning { background: var(--warning); }
.all-clear { min-height: 85px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); padding: 16px; background: #edf3e8; }
.all-clear > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: #edf3e8; font-style: normal; }
.all-clear span { display: grid; }.all-clear strong { font-size: 12px; }.all-clear small { font-size: 12px; }
.all-clear.compact { min-height: 74px; }
.recent-list, .snapshot-list { display: grid; }
.recent-list > button, .snapshot-list > button { width: 100%; min-height: 49px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border: 0; border-top: 1px solid var(--line-soft); padding: 9px 0; color: inherit; background: transparent; text-align: left; }
.recent-list > button:hover, .snapshot-list > button:hover { background: var(--surface); }
.recent-list > button > span:nth-child(2) { min-width: 0; display: grid; }
.recent-list strong, .recent-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list strong { font-size: 12px; }.recent-list small { font-size: 12px; }.recent-list time { color: var(--muted-2); font-size: 12px; }
.snapshot-list > button { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 0; }
.snapshot-list > button > span:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; }
.snapshot-list .priority { align-self: center; }
.snapshot-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-list small { grid-column: 2; font-size: 12px; }

.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; margin-bottom: 16px; background: var(--surface); box-shadow: 0 12px 38px rgba(0,0,0,.12); }
.summary-strip > div { min-height: 77px; display: grid; align-content: center; gap: 5px; padding: 13px 18px; border-right: 1px solid var(--line-soft); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { color: var(--muted); font-size: 12px; font-weight: 700; }
.summary-strip strong { overflow: hidden; font-size: 18px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.summary-strip .danger-text strong { color: var(--danger); }
.data-toolbar { min-height: 58px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 9px 12px; background: var(--surface); }
.search-field { width: min(420px, 100%); height: 38px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; background: var(--surface); }
.search-field > span { color: var(--muted-2); font-size: 15px; transform: rotate(-12deg); }
.search-field input { height: 36px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.search-field.compact { width: 100%; }
.data-toolbar select { width: auto; min-width: 160px; height: 38px; }
.result-count { margin-left: auto; padding-right: 5px; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; border-radius: 18px; }
table { width: 100%; min-width: 850px; border-collapse: collapse; text-align: left; font-size: 12px; }
th { height: 43px; padding: 0 16px; color: var(--text); border-bottom: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
td { height: 64px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface); }
td > strong, td > small { display: block; }
td > strong { font-size: 12px; } td > small { margin-top: 2px; font-size: 12px; }
.customer-cell { min-width: 180px; display: flex; align-items: center; gap: 9px; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.customer-cell > span:last-child { min-width: 0; display: grid; }
.customer-cell strong, .customer-cell small { overflow: hidden; max-width: 190px; text-overflow: ellipsis; white-space: nowrap; }
.customer-cell strong { font-size: 12px; }.customer-cell small { font-size: 12px; }
.row-action { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; color: var(--text); background: var(--surface-2); font-size: 12px; font-weight: 720; white-space: nowrap; }
.row-action:hover { border-color: var(--line); }
.status { display: inline-flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 99px; padding: 4px 8px; font-size: 12px; font-weight: 820; white-space: nowrap; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-active, .status-resolved { color: var(--success); border-color: var(--line); background: var(--surface); }
.status-trialing, .status-open { color: var(--text); border-color: var(--line); background: var(--surface); }
.status-past_due, .status-in_progress { color: var(--warning); border-color: var(--line); background: var(--surface); }
.status-canceled, .status-unknown { color: var(--text); border-color: var(--line); background: var(--surface); }
.priority { display: inline-flex; align-items: center; width: fit-content; border-radius: 4px; padding: 2px 6px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 820; text-transform: uppercase; }
.priority-urgent { color: var(--text); background: var(--surface); }.priority-high { color: var(--text); background: var(--surface); }
.availability { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.availability i { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.availability.on { color: var(--success); }.availability.on i { background: var(--success); }
.empty, .empty-inline { color: var(--muted); text-align: center; }
.empty { padding: 26px !important; font-size: 12px; }.empty-inline { margin: 0; font-size: 12px; }

.support-workspace { height: min(720px, calc(100vh - 205px)); min-height: 590px; display: grid; grid-template-columns: 355px minmax(0, 1fr); overflow: hidden; }
.ticket-queue { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--line); background: var(--surface); }
.queue-head { display: grid; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.queue-head > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.queue-head h2 { margin: 0; font-size: 14px; }.queue-head > div:first-child span { color: var(--muted); font-size: 12px; }
.filter-tabs { display: flex; gap: 3px; }
.filter-tabs button { flex: 1; border: 0; border-radius: 5px; padding: 6px 4px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; }
.filter-tabs button:hover, .filter-tabs button.active { color: var(--text); background: var(--surface); }
.queue-list { min-height: 0; overflow-y: auto; }
.queue-item { width: 100%; display: grid; gap: 7px; border: 0; border-bottom: 1px solid var(--line-soft); border-left: 2px solid transparent; padding: 14px; color: inherit; background: transparent; text-align: left; }
.queue-item:hover { background: var(--surface); }
.queue-item.active { border-left-color: var(--accent); background: var(--surface); }
.queue-item > div { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.queue-item > div strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.queue-item time { color: var(--muted-2); font-size: 12px; }
.queue-item h3 { overflow: hidden; margin: 0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.queue-item > p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.queue-item footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conversation { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--surface); }
.conversation-head { min-height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 19px; border-bottom: 1px solid var(--line); }
.conversation-head > div { display: flex; align-items: center; gap: 10px; }
.conversation-head > div:first-child > span:last-child { min-width: 0; }
.conversation-head h2 { overflow: hidden; margin-bottom: 2px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.conversation-head p { margin: 0; color: var(--muted); font-size: 12px; }
.conversation-head > div:last-child { justify-content: flex-end; flex-wrap: wrap; }
.conversation-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.conversation-meta > span { display: grid; gap: 3px; padding: 10px 18px; border-right: 1px solid var(--line-soft); }.conversation-meta > span:last-child { border: 0; }
.conversation-meta small { color: var(--muted-2); font-size: 12px; font-weight: 820; letter-spacing: .1em; }.conversation-meta strong { font-size: 12px; }
.messages { min-height: 0; display: grid; align-content: start; gap: 16px; overflow-y: auto; padding: 24px; }
.message { max-width: 78%; display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 9px; margin: 0; }
.message.mine { justify-self: end; grid-template-columns: minmax(0, 1fr) 29px; }
.message.mine .message-avatar { grid-column: 2; grid-row: 1; color: var(--text); background: var(--accent); }
.message.mine > div { grid-column: 1; grid-row: 1; }
.message-avatar { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 850; }
.message > div { min-width: 0; }
.message header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.message header strong { font-size: 12px; }.message header time { color: var(--muted-2); font-size: 12px; }
.message p { margin: 0; border: 1px solid var(--line-soft); border-radius: 3px 10px 10px 10px; padding: 10px 12px; color: var(--text); background: var(--surface); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.message.mine p { border-color: var(--line); border-radius: 10px 3px 10px 10px; background: var(--surface); }
.composer { display: grid; gap: 9px; border-top: 1px solid var(--line); padding: 13px 17px; background: var(--surface); }
.composer textarea { width: 100%; min-height: 74px; resize: vertical; border: 0; padding: 8px 0; background: transparent; box-shadow: none; font-size: 12px; }
.composer footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }.composer select { width: auto; min-height: 31px; padding: 0 28px 0 8px; font-size: 12px; }
.empty-conversation { min-height: 200px; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }.empty-conversation.full { height: 100%; grid-row: 1 / -1; }
.empty-conversation i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-style: normal; }.empty-conversation strong { color: var(--text); font-size: 12px; }.empty-conversation small { font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 14px; }
.plan-card { min-height: 350px; display: flex; flex-direction: column; border: 1px solid var(--line-soft); padding: 20px; background: var(--surface); }
.plan-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.plan-card header small { color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .13em; }.plan-card h2 { margin-top: 4px; font-size: 18px; }
.more-button { border: 0; padding: 3px; color: var(--muted); background: transparent; letter-spacing: 2px; }
.plan-price { margin: 18px 0; }.plan-price strong { font-size: 27px; letter-spacing: -.05em; }.plan-price span { color: var(--muted); font-size: 12px; }
.plan-stats { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line-soft); padding: 13px 0; }
.plan-stats span { display: grid; gap: 2px; }.plan-stats span + span { border-left: 1px solid var(--line-soft); padding-left: 15px; }.plan-stats strong { font-size: 14px; }.plan-stats small { font-size: 12px; }
.permission-list { display: grid; gap: 7px; margin: 16px 0; color: var(--text); font-size: 12px; }.permission-list > span::first-letter { color: var(--success); }.permission-list > small { color: var(--accent-light); font-size: 12px; }
.plan-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 13px; color: var(--muted); font-size: 12px; }

.tenant-select { width: min(390px, 100%); }
.onboarding-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 17px; align-items: start; }
.onboarding-steps { position: sticky; top: 98px; display: grid; gap: 5px; }
.onboarding-steps > span { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 1px 10px; border-left: 1px solid var(--line); padding: 10px 0 10px 15px; color: var(--muted); }
.onboarding-steps > span > i { width: 26px; height: 26px; grid-row: span 2; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-style: normal; font-weight: 800; }.onboarding-steps > span strong { align-self: end; font-size: 12px; }.onboarding-steps > span small { font-size: 12px; }
.onboarding-steps > span.active { border-left-color: var(--accent); color: var(--text); }.onboarding-steps > span.active i { color: var(--text); border-color: var(--accent); background: var(--accent); }
.onboarding-note { margin-top: 18px; border: 1px solid var(--line); padding: 15px; background: var(--accent-soft); }.onboarding-note strong { font-size: 12px; }.onboarding-note p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.onboarding-form { padding: 26px; }
.form-section { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }.section-number { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); font-size: 12px; font-weight: 850; }.form-section h2 { margin-bottom: 3px; }.form-section p { margin: 0; font-size: 12px; }
.onboarding-form hr { height: 1px; border: 0; margin: 25px 0; background: var(--line-soft); }
.onboarding-form > label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.onboarding-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px -26px -26px; border-top: 1px solid var(--line); padding: 17px 26px; background: var(--surface); }.onboarding-form > footer > span { color: var(--muted); font-size: 12px; }.onboarding-form > footer i { color: var(--success); font-style: normal; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label, .modal-body > label, .login-card label, .invite-card label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.form-grid .wide { grid-column: span 2; }
input, select, textarea { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; outline: none; padding: 0 11px; color: var(--text); background: var(--surface); font-size: 12px; }
textarea { padding-block: 10px; }
input::placeholder, textarea::placeholder { color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--line); box-shadow: 0 0 0 3px rgba(255,122,61,.08); }

.health-hero { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border: 1px solid var(--line); margin-bottom: 16px; padding: 23px; background: var(--surface); }
.health-hero.degraded { border-color: var(--line); background: var(--surface); }
.health-hero > div { display: flex; align-items: center; gap: 17px; }.health-hero > div > i { width: 51px; height: 51px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: var(--success); font-size: 20px; font-style: normal; font-weight: 900; }.health-hero.degraded > div > i { background: var(--warning); }
.health-hero span { display: grid; gap: 3px; }.health-hero small { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .11em; }.health-hero strong { font-size: 21px; letter-spacing: -.04em; }.health-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.health-hero > span { min-width: 150px; border-left: 1px solid var(--line); padding-left: 28px; }.health-hero > span strong { font-size: 25px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 14px; }
.check-card { min-height: 200px; padding: 18px; }.check-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }.check-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--text); background: var(--success); font-size: 12px; font-weight: 900; }.check-icon.error, .check-icon.degraded { background: var(--warning); }.check-card p { color: var(--muted); font-size: 12px; }.check-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; border-top: 1px solid var(--line-soft); padding-top: 13px; }.check-card footer span { color: var(--muted); font-size: 12px; }.check-card footer strong { font-size: 12px; }
.system-info { display: grid; grid-template-columns: repeat(4, 1fr); }.system-info > div { min-height: 70px; display: grid; align-content: center; gap: 4px; padding: 13px 18px; border-right: 1px solid var(--line-soft); }.system-info > div:last-child { border: 0; }.system-info span { color: var(--muted); font-size: 12px; }.system-info strong { font-size: 12px; }

.timeline { padding: 10px 22px; }
.timeline article { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; min-height: 75px; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }.timeline article:last-child { border-bottom: 0; }.timeline article::before { content: ""; position: absolute; top: 32px; bottom: -17px; left: 4px; width: 1px; background: var(--line); }.timeline article:last-child::before { display: none; }.timeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,61,.17); }.timeline header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }.timeline header strong { font-size: 12px; }.timeline time { color: var(--muted-2); font-size: 12px; }.timeline p { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.access-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 16px; align-items: start; }
.access-layout > .panel { padding: 21px; }.count-badge { min-width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 12px; font-weight: 800; }
.admin-list > div { min-height: 62px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid var(--line-soft); }.admin-list > div > span:nth-child(2) { display: grid; }.admin-list strong { font-size: 12px; }.admin-list small { font-size: 12px; }.root-badge { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; color: var(--success); background: var(--surface); font-size: 12px; font-weight: 820; text-transform: uppercase; }
.invite-card { display: grid; gap: 11px; }.invite-card .invite-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 18px; }.invite-card .eyebrow { margin: 7px 0 0; }.invite-card h2, .invite-card p { margin-bottom: 0; }.invite-card button { margin-top: 3px; }

.notice { position: fixed; top: 89px; right: 23px; z-index: 80; max-width: min(440px, calc(100vw - 46px)); display: grid; grid-template-columns: 23px minmax(0,1fr) 22px; align-items: center; gap: 9px; border: 1px solid var(--line); padding: 11px 12px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 680; box-shadow: var(--shadow); }.notice > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: var(--success); font-weight: 900; }.notice > button { border: 0; color: inherit; background: transparent; }.notice.error { border-color: var(--line); color: var(--danger); background: #fff0ee; }.notice.error > span { background: var(--danger); }
.loading { position: fixed; right: 23px; bottom: 23px; z-index: 70; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 99px; padding: 9px 13px; color: var(--text); background: var(--surface); font-size: 12px; box-shadow: var(--shadow); }.loading i { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-shell { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--surface); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: min(100%, 480px); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.65); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: .2; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card.large-modal { width: min(100%, 670px); }
.modal-card > header { min-height: 83px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 19px 21px; }.modal-card > header .eyebrow { margin-bottom: 5px; }.modal-card > header h2 { margin-bottom: 3px; font-size: 17px; }.modal-card > header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.modal-body { display: grid; gap: 14px; padding: 21px; }.modal-body.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-summary { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-soft); margin-top: 5px; }.modal-summary > span { display: grid; gap: 3px; padding: 12px; }.modal-summary > span + span { border-left: 1px solid var(--line-soft); }.modal-summary small { font-size: 12px; font-weight: 800; letter-spacing: .1em; }.modal-summary strong { font-size: 12px; }
.modal-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); padding: 15px 21px; background: var(--surface); }
.drawer-shell { place-items: stretch end; padding: 0; }.detail-drawer { position: relative; z-index: 1; width: min(100%, 430px); height: 100vh; display: flex; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--line); padding: 22px; background: var(--surface); box-shadow: -25px 0 80px rgba(0,0,0,.45); animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.detail-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; }.drawer-title { margin: 18px 0 23px; }.drawer-title h2 { margin-bottom: 4px; font-size: 24px; letter-spacing: -.045em; }.drawer-title > p:not(.eyebrow) { margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-soft); margin-bottom: 23px; }.detail-grid > span { min-height: 72px; display: grid; align-content: center; gap: 4px; padding: 12px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }.detail-grid > span:nth-child(even) { border-right: 0; }.detail-grid > span:nth-last-child(-n+2) { border-bottom: 0; }.detail-grid small { font-size: 12px; font-weight: 800; letter-spacing: .1em; }.detail-grid strong { font-size: 12px; }
.detail-drawer h3 { margin: 0; }.store-list { border-top: 1px solid var(--line-soft); }.store-list > div { min-height: 57px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; border-bottom: 1px solid var(--line-soft); }.store-list > div > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: var(--accent-soft); }.store-list > div > span:last-child { display: grid; }.store-list strong { font-size: 12px; }.store-list small { font-size: 12px; }
.detail-drawer > footer { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 17px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(390px, .85fr); align-items: center; gap: 30px; padding: clamp(30px, 7vw, 100px); background: var(--surface); }
.login-shell::before { content: "OPERAÇÃO • RECEITA • SUPORTE • PRODUTO"; position: fixed; right: -145px; bottom: 120px; color: var(--text); font-size: 58px; font-weight: 900; letter-spacing: .08em; transform: rotate(-90deg); }
.login-brand { align-self: start; display: flex; align-items: center; gap: 12px; font-size: 25px; font-weight: 850; letter-spacing: -.05em; }.login-brand .brand-mark { width: 47px; height: 47px; border-radius: 13px; font-size: 22px; }.login-brand small { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.login-card { justify-self: end; width: min(100%, 440px); display: grid; gap: 16px; border: 1px solid var(--line); padding: 34px; background: var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.42); }.login-card h1 { margin-bottom: 0; font-size: 34px; }.login-card .muted { margin-bottom: 6px; }.secure-note { display: flex; justify-content: center; align-items: center; gap: 7px; }.secure-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Control Center v2: confiança dos dados e sinais operacionais */
.data-quality-banner, .integration-warning { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 12px 15px; color: var(--warning); background: #fff4e4; }
.data-quality-banner { margin-bottom: 14px; }
.data-quality-banner > span, .integration-warning > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--warning); background: #fff4e4; font-size: 12px; font-style: normal; font-weight: 900; }
.data-quality-banner strong, .integration-warning strong { display: block; margin-bottom: 3px; font-size: 12px; }
.data-quality-banner p, .integration-warning p { margin: 0; color: var(--warning); font-size: 12px; line-height: 1.45; }
.data-quality-banner button { border: 0; padding: 5px 0; color: var(--text); background: transparent; font-size: 12px; font-weight: 800; white-space: nowrap; }
.integration-warning { grid-template-columns: 32px minmax(0, 1fr); margin-bottom: 14px; border-color: var(--line); color: var(--warning); background: #fff4e4; }
.integration-warning > span { color: var(--warning); background: var(--warning); }
.integration-warning p { color: var(--warning); }
.compact-warning { margin: -7px 0 24px; }

.operations-radar, .support-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-soft); margin: 0 0 16px; background: var(--surface); }
.operations-radar button, .support-kpis > div { min-height: 82px; display: grid; align-content: center; gap: 4px; border: 0; border-right: 1px solid var(--line-soft); padding: 13px 16px; color: inherit; background: transparent; text-align: left; }
.operations-radar button:last-child, .support-kpis > div:last-child { border-right: 0; }
.operations-radar button:hover { background: var(--surface); }
.operations-radar span, .support-kpis span { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .11em; }
.operations-radar strong, .support-kpis strong { font-size: 20px; letter-spacing: -.04em; }
.operations-radar small, .support-kpis small { color: var(--muted); font-size: 12px; }
.support-kpis { margin-top: -2px; }

.health-signal, .sla { display: inline-flex; align-items: center; width: fit-content; gap: 6px; border-radius: 99px; padding: 4px 7px; font-size: 12px; font-weight: 760; white-space: nowrap; }
.health-signal { color: var(--muted); background: var(--surface); }
.health-signal i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.health-signal.success { color: var(--success); background: #edf3e8; }
.health-signal.warning { color: var(--warning); background: #fff4e4; }
.health-signal.danger { color: var(--danger); background: #fff0ee; }
.health-signal.neutral { color: var(--text); }
.sla { border: 1px solid transparent; color: var(--text); background: var(--surface); }
.sla-warning { color: var(--warning); border-color: var(--line); background: #fff4e4; }
.sla-overdue { color: var(--text); border-color: var(--line); background: var(--surface); }
.sla-done { color: var(--muted); background: var(--surface); }
.status-unpaid { color: var(--text); border-color: var(--line); background: var(--surface); }
.status-closed { color: var(--text); border-color: var(--line); background: var(--surface); }
.alert-dot.info { background: var(--surface); box-shadow: 0 0 0 4px rgba(109,158,255,.08); }
.snapshot-status { display: grid; justify-items: end; gap: 5px; }
.customer-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.warning-text strong { color: var(--warning); }
.dataset-meta { margin: 10px 2px 0; color: var(--muted-2); font-size: 12px; text-align: right; }

.conversation-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.composer-hint { margin: -3px 0 0; color: var(--muted-2); font-size: 12px; }
.modal-alert { border: 1px solid var(--line); padding: 11px 12px; color: var(--text); background: var(--surface); }
.modal-alert strong { display: block; margin-bottom: 3px; font-size: 12px; }
.modal-alert p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.5; }
.modal-body textarea { min-height: 78px; resize: vertical; }
.drawer-signals { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-checklist { margin-bottom: 22px; }
.drawer-checklist > div:not(.panel-heading) { min-height: 54px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; border-top: 1px solid var(--line-soft); }
.drawer-checklist > div > i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--text); background: var(--warning); font-size: 12px; font-style: normal; font-weight: 900; }
.drawer-checklist > div > span { display: grid; gap: 2px; }
.drawer-checklist strong { font-size: 12px; }.drawer-checklist small { color: var(--muted); font-size: 12px; }
.drawer-all-clear { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; margin-bottom: 22px; border: 1px solid var(--line); padding: 12px; background: #edf3e8; }
.drawer-all-clear > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--success); background: var(--success); font-style: normal; font-weight: 900; }
.drawer-all-clear > span { display: grid; gap: 3px; }.drawer-all-clear strong { font-size: 12px; }.drawer-all-clear small { color: var(--muted); font-size: 12px; }

/* Produto e ativação v2 */
.plan-card { min-height: 430px; position: relative; }
.plan-card.featured { border-color: var(--line); box-shadow: inset 0 2px 0 var(--accent); }
.plan-card > header > span { min-width: 0; }
.plan-card > header p { min-height: 34px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.plan-labels { display: flex; align-items: center; gap: 7px; }
.plan-labels b { border-radius: 4px; padding: 3px 6px; color: var(--muted); background: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .09em; }
.billing-state { width: fit-content; display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; margin: -4px 0 15px; padding: 4px 8px; font-size: 12px; font-weight: 800; }
.billing-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.billing-state.ready { color: var(--success); background: var(--surface); }
.billing-state.warning { color: var(--warning); background: #fff4e4; }
.billing-state.neutral { color: var(--text); background: var(--surface); }
.plan-card .plan-stats { grid-template-columns: repeat(3, 1fr); }
.plan-card .plan-stats span + span { border-left: 1px solid var(--line-soft); padding-left: 11px; }
.plan-card > footer > div, .row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.danger-link:disabled { cursor: not-allowed; opacity: .35; }
.plan-modal { width: min(100%, 940px); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 15px; }
.choice-grid label, .confirmation-check { display: grid !important; grid-template-columns: 17px minmax(0, 1fr); align-items: start; gap: 9px !important; border: 1px solid var(--line-soft); padding: 11px; color: inherit !important; background: var(--surface); }
.choice-grid input, .confirmation-check input { width: 16px; height: 16px; min-height: 0; margin: 1px 0 0; accent-color: var(--accent); }
.choice-grid span, .confirmation-check span { display: grid; gap: 3px; }
.choice-grid strong, .confirmation-check strong { font-size: 12px; }.choice-grid small, .confirmation-check small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.4; }

.permission-picker { display: grid; gap: 13px; border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 19px; }
.permission-picker > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.permission-picker > header h3 { margin: 3px 0 4px; font-size: 16px; }.permission-picker > header small { color: var(--muted); font-size: 12px; }
.permission-picker > header > strong { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; padding: 7px 10px; color: var(--accent-light); background: var(--accent-soft); font-size: 12px; }
.permission-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: center; gap: 8px; }
.permission-toolbar > label { min-height: 40px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; border: 1px solid var(--line); padding: 0 10px; background: var(--surface); }
.permission-toolbar > label:focus-within { border-color: var(--line); box-shadow: 0 0 0 3px var(--accent-soft); }
.permission-toolbar > label span { color: var(--muted-2); font-size: 13px; }.permission-toolbar input { min-height: 38px; border: 0; padding: 0; background: transparent; box-shadow: none !important; }
.permission-groups { display: grid; gap: 10px; }
.permission-group { border: 1px solid var(--line-soft); background: var(--surface); }
.permission-group > header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); padding: 11px 13px; background: var(--surface); }
.permission-group > header > span:first-child { min-width: 0; display: grid; gap: 3px; }.permission-group > header strong { font-size: 12px; }.permission-group > header small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.permission-group > header > span:last-child { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; }.permission-group > header b { min-width: 31px; color: var(--accent-light); font-size: 12px; text-align: right; }
.permission-group > header button { border: 0; padding: 0; color: var(--text); background: transparent; font-size: 12px; font-weight: 800; }.permission-group > header button:hover { color: var(--accent-light); }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); }
.permission-option { position: relative; min-height: 74px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; gap: 10px; padding: 13px; cursor: pointer; background: var(--surface); transition: background .15s ease, box-shadow .15s ease; }
.permission-option:hover { background: var(--surface); }.permission-option:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent); }
.permission-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.permission-option > i { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: transparent; background: var(--surface); font-size: 12px; font-style: normal; font-weight: 900; transition: all .15s ease; }
.permission-option > span { display: grid; gap: 4px; }.permission-option strong { font-size: 12px; }.permission-option small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
.permission-option:has(input:checked) { background: var(--surface); }.permission-option:has(input:checked) > i { border-color: var(--accent); color: var(--text); background: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,61,.08); }.permission-option:has(input:checked) strong { color: var(--text); }
.legacy-permission-note { display: grid; grid-template-columns: 27px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid var(--line); padding: 10px; background: var(--surface); }.legacy-permission-note i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--text); background: var(--warning); font-style: normal; font-weight: 900; }.legacy-permission-note span { display: grid; gap: 3px; }.legacy-permission-note strong { font-size: 12px; }.legacy-permission-note small { color: var(--muted); font-size: 12px; }
.permission-empty { border: 1px dashed var(--line); padding: 20px; color: var(--muted); font-size: 12px; text-align: center; }

.catalog-context { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(170px, 1fr); gap: 8px; }
.catalog-context label { display: grid; gap: 5px; }
.catalog-context label > span { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .1em; }
.catalog-context select { min-height: 36px; }
.catalog-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.data-toolbar > .primary { min-height: 40px; white-space: nowrap; }
.row-actions .row-action { min-width: 54px; }

.onboarding-intro { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 12px; margin: -7px 0 26px; border: 1px solid var(--line); padding: 14px; background: var(--surface); }
.onboarding-intro > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--text); background: var(--success); font-size: 14px; }
.onboarding-intro strong { font-size: 12px; }.onboarding-intro p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.password-field > span { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.password-field > span button { min-height: 40px; white-space: nowrap; }
.password-field > small { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.onboarding-form > .confirmation-check { margin-top: 18px; }

.onboarding-success { width: min(100%, 570px); }
.onboarding-success .modal-body { gap: 17px; }
.success-mark { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; color: var(--success); background: var(--success); font-size: 22px; font-weight: 900; box-shadow: 0 0 0 8px rgba(46,211,166,.06); }
.credential-list { border: 1px solid var(--line-soft); }
.credential-list > div { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding: 11px 13px; }.credential-list > div:last-child { border-bottom: 0; }
.credential-list span { min-width: 0; display: grid; gap: 3px; }.credential-list small { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .1em; }.credential-list strong { font-size: 12px; overflow-wrap: anywhere; }
.credential-list .credential-note { justify-content: flex-start; color: var(--text); background: var(--surface); }.credential-note > i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--text); background: var(--warning); font-style: normal; font-weight: 900; }
.technical-value { color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px !important; }
.security-reminder { border: 1px solid var(--line); padding: 12px; background: var(--accent-soft); }.security-reminder strong { font-size: 12px; }.security-reminder p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .overview-grid.lower { grid-template-columns: 1fr; }
  .support-workspace { grid-template-columns: 320px minmax(0,1fr); }
  .topbar { grid-template-columns: auto minmax(250px, 1fr) auto; }
  .breadcrumbs { display: none; }
  .menu-button { display: grid; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: 252px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .sidebar-close { display: grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; background: var(--surface); }
  .access-layout { grid-template-columns: 1fr; }
  .customer-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .topbar { height: auto; min-height: 68px; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; padding: 12px 16px; }
  .top-action { width: 38px; padding: 0; justify-content: center; font-size: 0; }.top-action span { font-size: 17px; }
  .content { padding: 30px 16px 60px; }
  .page-header { display: grid; }.header-actions { flex-wrap: wrap; }
  .summary-strip { grid-template-columns: 1fr 1fr; }.summary-strip > div:nth-child(2) { border-right: 0; }.summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .onboarding-layout { grid-template-columns: 1fr; }.onboarding-steps { position: static; grid-template-columns: repeat(3, 1fr); }.onboarding-steps > span { border-left: 0; border-top: 1px solid var(--line); padding: 12px 4px; }.onboarding-steps > span.active { border-top-color: var(--accent); }.onboarding-note { display: none; }
  .support-workspace { height: auto; min-height: 0; grid-template-columns: 1fr; }.ticket-queue { max-height: 480px; border-right: 0; border-bottom: 1px solid var(--line); }.conversation { min-height: 620px; }
  .system-info { grid-template-columns: 1fr 1fr; }.system-info > div:nth-child(2) { border-right: 0; }.system-info > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .operations-radar, .support-kpis { grid-template-columns: 1fr 1fr; }.operations-radar button:nth-child(2), .support-kpis > div:nth-child(2) { border-right: 0; }.operations-radar button:nth-child(-n+2), .support-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .customer-summary { grid-template-columns: 1fr 1fr; }
  .catalog-context { grid-template-columns: 1fr 1fr; width: 100%; }.catalog-summary { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: 1fr; padding: 28px 20px; }.login-brand { align-self: center; justify-self: center; }.login-card { justify-self: center; }
}

@media (max-width: 560px) {
  h1 { font-size: 30px; }
  .global-search kbd { display: none; }
  .global-search { grid-template-columns: 24px minmax(0,1fr); }
  .metrics { grid-template-columns: 1fr 1fr; }.metric-card { min-height: 125px; padding: 14px; }.metric-card strong { font-size: 23px; }.metric-card small { font-size: 12px; }
  .revenue-hero { grid-template-columns: 1fr; }.revenue-hero span + span { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .distribution-legend { grid-template-columns: 1fr 1fr; }
  .data-toolbar { align-items: stretch; flex-direction: column; }.search-field, .data-toolbar select { width: 100%; }.result-count { margin-left: 0; }
  .summary-strip { grid-template-columns: 1fr; }.summary-strip > div { border-right: 0; border-bottom: 1px solid var(--line-soft) !important; }.summary-strip > div:last-child { border-bottom: 0 !important; }
  .onboarding-steps { display: none; }.form-grid, .modal-body.form-grid { grid-template-columns: 1fr; }.form-grid .wide { grid-column: auto; }.onboarding-form { padding: 19px; }.onboarding-form > footer { align-items: stretch; flex-direction: column; margin: 24px -19px -19px; padding: 15px 19px; }
  .health-hero { align-items: flex-start; flex-direction: column; }.health-hero > span { width: 100%; border-top: 1px solid var(--line); border-left: 0; padding: 16px 0 0; }
  .conversation-meta { grid-template-columns: 1fr 1fr; }.conversation-meta > span:last-child { display: none; }.message { max-width: 94%; }.composer footer { align-items: stretch; flex-direction: column; }.composer label { justify-content: space-between; }.composer .primary { width: 100%; }
  .data-quality-banner { grid-template-columns: 30px minmax(0, 1fr); }.data-quality-banner button { grid-column: 2; justify-self: start; }
  .choice-grid, .password-field > span, .catalog-context, .permission-options, .permission-toolbar { grid-template-columns: 1fr; }
  .permission-picker > header, .permission-group > header { align-items: flex-start; flex-direction: column; }.permission-picker > header > strong { align-self: flex-start; }.permission-group > header > span:last-child { width: 100%; justify-content: space-between; }
  .modal-shell { padding: 0; place-items: end center; }.modal-card { width: 100%; max-height: 92vh; }.modal-body.form-grid { grid-template-columns: 1fr; }.modal-body .wide { grid-column: auto; }
  .detail-drawer { width: 100%; }.detail-drawer > footer { grid-template-columns: 1fr; }
  .login-card { padding: 25px 20px; }.login-card h1 { font-size: 29px; }.login-shell::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Control Center: saúde, auditoria e identidade */
.success-text { color: var(--success) !important; }
.danger-text { color: var(--danger) !important; }
.invite-acceptance .login-brand > div { display: grid; gap: 2px; }.invite-acceptance .login-brand strong { line-height: 1; }.invite-acceptance .login-security { display: grid; grid-template-columns: 27px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid var(--line); padding: 11px; background: var(--surface); }.invite-acceptance .login-security > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: var(--success); font-size: 12px; font-weight: 900; }.invite-acceptance .login-security p { display: grid; gap: 3px; margin: 0; }.invite-acceptance .login-security strong { font-size: 12px; }.invite-acceptance .login-security small { color: var(--muted); font-size: 12px; }
.mfa-shell .login-brand > div { display: grid; gap: 2px; }.mfa-card { width: min(100%, 470px); }.mfa-setup { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 15px; border: 1px solid var(--line); padding: 14px; background: var(--surface); }.mfa-setup > img { width: 150px; height: 150px; border-radius: 8px; padding: 7px; background: var(--surface); }.mfa-setup > div { min-width: 0; display: grid; gap: 7px; }.mfa-setup small { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .1em; }.mfa-setup code { border: 1px solid var(--line-soft); padding: 9px; color: var(--text); background: var(--surface); font-size: 12px; overflow-wrap: anywhere; }.mfa-setup .text-button { justify-self: start; }.mfa-prompt { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid var(--line); padding: 12px; background: var(--surface); }.mfa-prompt > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--text); background: var(--surface); font-size: 16px; }.mfa-prompt > div { display: grid; gap: 3px; }.mfa-prompt strong { font-size: 12px; }.mfa-prompt small { color: var(--muted); font-size: 12px; }.mfa-card input[name='code'] { font-size: 20px; font-weight: 800; letter-spacing: .35em; text-align: center; }.mfa-logout { justify-self: center; margin-top: -4px; }
.migration-banner { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; border: 1px solid var(--line); margin-bottom: 14px; padding: 13px 15px; background: var(--surface); }
.migration-banner > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--text); background: var(--warning); font-style: normal; font-weight: 900; }
.migration-banner > span { display: grid; gap: 3px; }.migration-banner strong { font-size: 12px; }.migration-banner small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.migration-banner.critical { border-color: var(--line); background: #fff0ee; }.migration-banner.critical > i { color: var(--danger); background: #fff0ee; }

.health-overall-attention { border-color: var(--line); background: #fff4e4; }.health-overall-attention > div > i { background: var(--warning) !important; }
.health-overall-degraded, .health-overall-critical { border-color: var(--line); background: #fff0ee; }.health-overall-degraded > div > i, .health-overall-critical > div > i { color: var(--danger) !important; background: #fff0ee !important; }
.health-overall-unknown { border-color: var(--line); background: var(--surface); }.health-overall-unknown > div > i { color: var(--text) !important; background: var(--muted) !important; }
.health-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.health-domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.health-domain { min-width: 0; padding: 0; overflow: hidden; }
.health-domain > header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); padding: 17px; background: var(--surface); }
.health-domain > header span { min-width: 0; display: grid; gap: 4px; }.health-domain > header .eyebrow { margin: 0; }.health-domain > header h2 { margin: 0; font-size: 15px; }.health-domain > header small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.health-domain > header b { min-width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.health-domain > div { display: grid; }
.health-check { min-height: 112px; display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: start; gap: 11px; border-bottom: 1px solid var(--line-soft); padding: 15px 16px; }.health-check:last-child { border-bottom: 0; }
.health-check:has(> .text-button) { grid-template-columns: 29px minmax(0, 1fr) auto; }
.health-check-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--text); background: var(--success); font-size: 12px; font-weight: 900; }
.health-check > div { min-width: 0; display: grid; align-content: start; gap: 5px; }.health-check header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.health-check header strong { font-size: 12px; }.health-check header span { color: var(--success); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.health-check p { min-height: 28px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }.health-check small { color: var(--muted-2); font-size: 12px; }.health-check > .text-button { align-self: center; font-size: 12px; white-space: nowrap; }
.health-attention .health-check-icon { color: var(--warning); background: var(--warning); }.health-attention header span { color: var(--warning); }
.health-degraded .health-check-icon, .health-critical .health-check-icon { color: var(--danger); background: #fff0ee; }.health-degraded header span, .health-critical header span { color: var(--danger); }
.health-unknown .health-check-icon { color: var(--text); background: var(--muted); }.health-unknown header span { color: var(--muted); }
.health-lower-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 14px; margin-top: 14px; }
.health-history, .incident-list { padding: 19px; }.health-history-track { min-height: 92px; display: flex; align-items: center; gap: 7px; overflow-x: auto; }
.health-history-track > span { min-width: 40px; display: grid; justify-items: center; gap: 7px; }.health-history-track i { width: 11px; height: 32px; border-radius: 3px; background: var(--success); }.health-history-track small { color: var(--muted-2); font-size: 12px; white-space: nowrap; transform: rotate(-45deg); }
.health-history-track .history-attention i { background: var(--warning); }.health-history-track .history-degraded i, .health-history-track .history-critical i { background: #fff0ee; }.health-history-track .history-unknown i { background: var(--muted); }
.incident-list > article { min-height: 56px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); }.incident-list > article > div { display: grid; gap: 3px; }.incident-list > article strong { font-size: 12px; }.incident-list > article small, .incident-list > article > span:last-child { color: var(--muted); font-size: 12px; }.all-clear { min-height: 78px; display: grid; grid-template-columns: 31px minmax(0,1fr); align-items: center; gap: 11px; }.all-clear > i { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success); font-style: normal; font-weight: 900; }.all-clear > span { display: grid; gap: 3px; }.all-clear strong { font-size: 12px; }.all-clear small { color: var(--muted); font-size: 12px; }

.audit-summary { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 14px; }
.audit-filters { display: grid; grid-template-columns: minmax(230px, 1.5fr) minmax(150px, .8fr) minmax(130px, .7fr) minmax(180px, 1fr) auto auto auto auto; align-items: end; gap: 8px; margin-bottom: 14px; padding: 13px; }
.audit-filters > input, .audit-filters > select, .audit-filters .audit-search { min-height: 40px; }.audit-search { display: grid; grid-template-columns: 26px minmax(0,1fr); align-items: center; border: 1px solid var(--line); padding: 0 8px; background: var(--surface); }.audit-search span { color: var(--muted-2); }.audit-search input { min-height: 36px; border: 0; padding: 0; background: transparent; box-shadow: none !important; }
.date-filter { display: grid; gap: 4px; color: var(--muted-2); font-size: 12px; font-weight: 800; }.date-filter input { min-width: 122px; min-height: 29px; padding: 6px; }
.audit-table td:first-child { min-width: 128px; }.audit-table td:nth-child(2) { min-width: 220px; }.audit-table td:nth-child(3) { min-width: 185px; }
.category-pill, .outcome, .severity { display: inline-flex; align-items: center; width: fit-content; border-radius: 99px; padding: 5px 8px; font-size: 12px; font-weight: 820; white-space: nowrap; }
.category-pill { color: var(--text); background: var(--surface); }.outcome { color: var(--success); background: var(--surface); }.outcome-failure { color: var(--text); background: var(--surface); }.outcome-blocked { color: var(--warning); background: var(--surface); }
.severity { color: var(--muted); background: var(--surface); text-transform: uppercase; }.severity-medium { color: var(--text); background: var(--surface); }.severity-high { color: var(--warning); background: var(--surface); }.severity-critical { color: var(--danger); background: #fff0ee; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }.pagination > span { color: var(--muted); font-size: 12px; }.pagination > div { display: flex; gap: 7px; }.pagination .secondary { min-height: 34px; }
.audit-drawer { padding: 22px; overflow-y: auto; }.audit-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.audit-drawer > header h2 { margin: 5px 0 0; }.audit-drawer .drawer-signals { margin: 18px 0; }.audit-detail-grid { margin-bottom: 16px; }.audit-detail-grid strong { overflow-wrap: anywhere; }
.audit-reason { border: 1px solid var(--line); margin-bottom: 15px; padding: 13px; background: var(--surface); }.audit-reason small, .audit-diff small { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .1em; }.audit-reason p { margin: 6px 0 0; color: var(--text); font-size: 12px; line-height: 1.55; }
.audit-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.audit-diff > div { min-width: 0; border: 1px solid var(--line-soft); padding: 12px; background: var(--surface); }.audit-diff pre, .audit-metadata pre { max-height: 300px; margin: 9px 0 0; overflow: auto; color: var(--text); font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-metadata { margin-top: 12px; border: 1px solid var(--line-soft); padding: 11px; }.audit-metadata summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }

.access-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; }
.access-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }.access-team { padding: 19px; }.access-table { display: grid; }.access-table > article { min-height: 76px; display: grid; grid-template-columns: 38px minmax(145px,1.2fr) minmax(100px,.7fr) minmax(110px,.7fr) minmax(105px,.7fr) minmax(95px,.7fr) auto; align-items: center; gap: 11px; border-top: 1px solid var(--line-soft); }.access-table > article > div { min-width: 0; display: grid; gap: 4px; }.access-table > article > div > small { color: var(--muted-2); font-size: 12px; font-weight: 850; letter-spacing: .08em; }.access-table > article > div > strong { font-size: 12px; overflow-wrap: anywhere; }.access-person strong { font-size: 12px !important; }.access-person small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.access-status, .mfa-state { display: inline-flex; align-items: center; width: fit-content; gap: 5px; font-size: 12px; font-weight: 780; white-space: nowrap; }.access-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }.access-active, .mfa-state.enabled { color: var(--success); }.access-invited { color: var(--text); }.access-suspended { color: var(--warning); }.access-revoked, .mfa-state.missing { color: var(--text); }.read-only-label { color: var(--muted-2); font-size: 12px; }
.access-invite { position: sticky; top: 82px; padding: 20px; }.access-invite textarea { min-height: 70px; }.access-invite .confirmation-check { margin-top: 4px; }.admin-access-modal { width: min(100%, 560px); }

/* Programa beta: triagem e acompanhamento operacional */
.beta-operational-summary strong { font-size: 24px; }
.beta-toolbar { border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; border-radius: 18px; }
.beta-toolbar .search-field { flex: 1; max-width: 520px; }
.beta-table { margin-bottom: 18px; }.beta-table table { min-width: 980px; }
.beta-table td:nth-child(4) small { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beta-participants { margin-top: 18px; }.beta-participants > .panel-heading { padding: 21px 21px 0; margin-bottom: 14px; }
.beta-drawer { width: min(100%, 560px); padding: 0; }
.beta-drawer > header { position: sticky; top: 0; z-index: 2; padding: 22px; border-bottom: 1px solid var(--line-soft); background: var(--surface); backdrop-filter: blur(16px); }
.beta-drawer > header h2 { margin: 5px 0 0; font-size: 22px; }
.beta-drawer > .drawer-title, .beta-drawer > section, .beta-drawer > .beta-contact-actions { margin-left: 22px; margin-right: 22px; }
.beta-drawer > .drawer-title { margin-top: 20px; margin-bottom: 16px; }
.beta-contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.beta-detail-grid { margin-bottom: 18px; }.beta-detail-grid strong { overflow-wrap: anywhere; }
.beta-consent { display: grid; gap: 8px; margin-bottom: 22px; }
.beta-consent > div { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 14px; padding: 11px; background: var(--surface); }
.beta-consent > div.optional { border-color: var(--line-soft); background: var(--surface); }
.beta-consent i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--text); background: var(--success); font-size: 12px; font-style: normal; font-weight: 900; }
.beta-consent .optional i { color: var(--muted); background: var(--surface); }
.beta-consent span { display: grid; gap: 3px; }.beta-consent strong { font-size: 12px; }.beta-consent small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.beta-participant-card { margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: var(--surface); }
.beta-participant-card .panel-heading { margin-bottom: 13px; }.beta-participant-card h3 { margin: 0; font-size: 13px; }.beta-participant-card .detail-grid { margin: 0; }
.beta-operation-form { display: grid; gap: 13px; margin-bottom: 23px; border-top: 1px solid var(--line-soft); padding-top: 20px; }
.beta-operation-form .panel-heading { margin-bottom: 0; }.beta-operation-form h3, .beta-timeline h3 { margin: 0; font-size: 14px; }.beta-operation-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.beta-operation-form textarea { min-height: 96px; resize: vertical; }
.beta-timeline { margin-bottom: 20px; border-top: 1px solid var(--line-soft); padding-top: 20px; }.beta-timeline .panel-heading { margin-bottom: 8px; }
.beta-timeline article { display: grid; grid-template-columns: 17px minmax(0,1fr); gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.beta-timeline article > i { width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--line); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(255,122,61,.45); }
.beta-timeline article > div { display: grid; gap: 4px; }.beta-timeline article strong { font-size: 12px; }.beta-timeline article p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.5; }.beta-timeline article small { color: var(--muted-2); font-size: 12px; }
.beta-drawer > footer { position: sticky; bottom: 0; z-index: 2; margin-top: auto; border-top: 1px solid var(--line); padding: 15px 22px; background: var(--surface); backdrop-filter: blur(16px); }

/* Kanban operacional: suporte e programa beta no mesmo centro de trabalho */
.work-center { max-width: none; }
.work-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.work-summary small { display: block; margin-top: 4px; }
.work-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.work-tabs { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-soft); border-radius: 13px; padding: 4px; background: var(--surface); }
.work-tabs button { min-height: 34px; border: 0; border-radius: 9px; padding: 0 13px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.work-tabs button:hover { color: var(--text); background: var(--surface); }
.work-tabs button.active { color: var(--text); background: var(--accent); box-shadow: 0 6px 20px rgba(221,103,31,.2); }
.work-filters { min-width: min(100%, 520px); display: grid; grid-template-columns: minmax(240px, 1fr) minmax(160px, .65fr); gap: 8px; }
.work-filters .search-field, .work-filters select { width: 100%; }
.work-intelligence { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; padding: 11px 13px; background: var(--surface); }
.work-intelligence > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--text); background: var(--surface); font-style: normal; font-weight: 900; }
.work-intelligence > span { display: grid; gap: 3px; }.work-intelligence strong { font-size: 12px; }.work-intelligence small { color: var(--muted); font-size: 12px; }
.kanban-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; padding: 1px 1px 15px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--surface-3) transparent; scroll-snap-type: x proximity; }
.board-radar { grid-auto-columns: minmax(280px, 1fr); }.board-support { grid-auto-columns: minmax(280px, 1fr); }.board-beta { grid-auto-columns: minmax(270px, 1fr); }
.kanban-lane { min-width: 0; min-height: 460px; display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--surface); scroll-snap-align: start; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.kanban-lane > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding: 14px; }
.kanban-lane > header > span { min-width: 0; display: grid; gap: 3px; }.kanban-lane > header h2 { margin: 0; font-size: 12px; }.kanban-lane > header small { color: var(--muted-2); font-size: 12px; }
.kanban-lane > header b { min-width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 12px; }
.kanban-lane.drag-over { border-color: var(--accent); background: var(--surface); transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(221,103,31,.22); }
.kanban-cards { min-height: 385px; display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 10px; }
.work-card { position: relative; border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px; background: var(--surface); box-shadow: 0 9px 24px rgba(0,0,0,.14); transition: border-color .15s ease, transform .15s ease, opacity .15s ease; }
.work-card[draggable='true'] { cursor: grab; }.work-card[draggable='true']:active { cursor: grabbing; }.work-card:hover { border-color: var(--line); transform: translateY(-1px); }.work-card.dragging { opacity: .42; transform: rotate(1deg) scale(.98); }
.work-card.source-beta { box-shadow: inset 2px 0 0 rgba(221,103,31,.75), 0 9px 24px rgba(0,0,0,.14); }.work-card.source-support { box-shadow: inset 2px 0 0 rgba(109,158,255,.75), 0 9px 24px rgba(0,0,0,.14); }.work-card.completed { opacity: .72; }
.work-card > header, .work-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.work-card > header { margin-bottom: 9px; }
.work-source { color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.attention-score { min-width: 26px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--success); background: #fff4e4; font-size: 12px; }.attention-score.score-high { color: var(--warning); background: #fff4e4; }.attention-score.score-critical { color: var(--danger); background: #fff0ee; }
.work-card-main { width: 100%; display: block; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }.work-card-main h3 { margin: 0 0 5px; font-size: 12px; line-height: 1.35; }.work-card-main p { margin: 0 0 5px; color: var(--text); font-size: 12px; }.work-card-main small { display: -webkit-box; min-height: 34px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.work-card-signals { min-height: 28px; display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }.work-card-signals span { width: fit-content; border: 1px solid var(--line); border-radius: 99px; padding: 4px 7px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 750; }.work-card-signals .quiet-signal { border-color: var(--line); color: var(--text); background: var(--surface); }
.work-card > footer { min-height: 28px; border-top: 1px solid var(--line-soft); padding-top: 9px; }.work-owner, .work-card time { color: var(--muted); font-size: 12px; }.work-owner.unassigned, .work-card time.overdue { color: var(--text); }.small-work-action { width: 27px; height: 27px; flex: 0 0 auto; }
.kanban-empty { min-height: 115px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted-2); text-align: center; }.kanban-empty i { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: var(--surface); font-style: normal; font-weight: 900; }.kanban-empty span { font-size: 12px; }
.work-item-modal { width: min(100%, 550px); }.work-item-modal .modal-body { gap: 13px; }.work-modal-score { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--surface); }.work-modal-score > strong { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 13px; color: var(--text); background: var(--surface); font-size: 18px; }.work-modal-score > span { display: grid; gap: 4px; }.work-modal-score b { font-size: 12px; }.work-modal-score small { color: var(--muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 1280px) {
  .health-domain-grid { grid-template-columns: 1fr; }
  .health-domain > div { grid-template-columns: repeat(2, minmax(0,1fr)); }.health-check:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .audit-filters { grid-template-columns: repeat(4, minmax(0,1fr)); }.audit-search { grid-column: span 2; }
  .access-workspace { grid-template-columns: 1fr; }.access-invite { position: static; }.access-table { overflow-x: auto; }.access-table > article { min-width: 920px; }
  .work-controls { align-items: stretch; flex-direction: column; }.work-filters { min-width: 0; width: 100%; }
}

@media (max-width: 820px) {
  .health-summary, .audit-summary, .access-summary { grid-template-columns: 1fr 1fr; }.access-summary > div:last-child { grid-column: span 2; }
  .health-domain > div { grid-template-columns: 1fr; }.health-check:nth-child(odd) { border-right: 0; }.health-lower-grid { grid-template-columns: 1fr; }
  .audit-filters { grid-template-columns: 1fr 1fr; }.audit-search { grid-column: span 2; }.audit-filters > .primary { grid-column: span 1; }.pagination { align-items: flex-start; flex-direction: column; }
  .audit-diff { grid-template-columns: 1fr; }
  .beta-toolbar { align-items: stretch; flex-direction: column; }.beta-toolbar .search-field, .beta-toolbar select { width: 100%; max-width: none; }.beta-contact-actions { grid-template-columns: 1fr; }
  .access-table { overflow: visible; }
  .access-table > article { min-width: 0; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 14px 0; }
  .access-table > article > .avatar { grid-column: 1; grid-row: 1; }
  .access-table > article > .access-person { grid-column: 2; grid-row: 1; }
  .access-table > article > .root-badge, .access-table > article > .row-action, .access-table > article > .read-only-label { grid-column: 3; grid-row: 1; }
  .access-table > article > div:not(.access-person) { grid-column: 2 / -1; grid-template-columns: 96px minmax(0,1fr); align-items: center; border-top: 1px solid var(--line); padding-top: 7px; }
  .work-summary { grid-template-columns: 1fr 1fr; }.work-tabs { width: max-content; max-width: 100%; overflow-x: auto; }.work-filters { grid-template-columns: 1fr; }.kanban-board { margin-right: -16px; padding-right: 16px; }.kanban-lane { min-height: 420px; }
}

@media (max-width: 560px) {
  .health-summary, .audit-summary, .access-summary { grid-template-columns: 1fr; }.access-summary > div:last-child { grid-column: auto; }
  .audit-filters { grid-template-columns: 1fr; }.audit-search { grid-column: auto; }.audit-filters > .primary { grid-column: auto; }.date-filter input { width: 100%; }
  .health-check:has(> .text-button) { grid-template-columns: 29px minmax(0,1fr); }.health-check > .text-button { grid-column: 2; justify-self: start; }
  .mfa-setup { grid-template-columns: 1fr; justify-items: center; }.mfa-setup > div { width: 100%; text-align: center; }.mfa-setup .text-button { justify-self: center; }
  .beta-drawer > footer { grid-template-columns: 1fr; }
  .work-summary { grid-template-columns: 1fr; }.work-tabs { width: 100%; }.work-tabs button { flex: 1; white-space: nowrap; }.kanban-board { grid-auto-columns: minmax(86vw, 1fr); }.work-item-modal footer { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   ChefOS administrative workspace foundation
   A single, accessible visual system for every operational module.
   -------------------------------------------------------------------------- */

body small { font-size: 12px !important; }

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: saturate(.45);
}

/* Shell and navigation */
.app-shell {
  min-height: 100dvh;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  height: 100dvh;
  border-right-color: var(--line);
  background: var(--sidebar);
  box-shadow: none;
}

.brand {
  height: 72px;
  gap: 12px;
  padding: 0 20px;
  background: transparent;
  font-size: 17px;
  letter-spacing: -.02em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 12px !important;
  letter-spacing: .06em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    url('/favicon.svg') center / 67% no-repeat,
    var(--accent);
  box-shadow: none;
}

.sidebar nav {
  padding: 16px 12px;
}

.nav-group { gap: 4px; margin-bottom: 18px; }
.nav-label {
  padding: 0 12px 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.nav-item {
  min-height: 44px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  border-radius: var(--radius-md);
  padding: 8px 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color .14s ease, background .14s ease;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
  transform: none;
}

.nav-item.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-glyph { color: var(--muted-2); font-size: 17px; }
.nav-item b { min-width: 24px; padding: 3px 7px; font-size: 12px; }
.sidebar-footer { gap: 10px; padding: 12px; }

.system-pill {
  min-height: 48px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  background: var(--surface);
}

.system-pill strong,
.user-card strong { font-size: 13px; }
.system-pill small,
.user-card small { font-size: 12px !important; }
.user-card { min-height: 52px; border-radius: var(--radius-md); padding: 7px; }

/* The generic icon-button display must not reveal responsive menu controls. */
.icon-button.menu-button,
.icon-button.sidebar-close { display: none; }

.topbar {
  height: 72px;
  grid-template-columns: minmax(130px, 1fr) minmax(320px, 560px) minmax(150px, 1fr);
  gap: 20px;
  padding: 0 clamp(20px, 3vw, 40px);
  border-bottom-color: var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.breadcrumbs { color: var(--muted-2); font-size: 13px; }
.breadcrumbs b { color: var(--muted-2); }
.breadcrumbs strong { color: var(--text); }

.global-search,
.search-field,
.audit-search,
.permission-toolbar > label {
  min-height: 44px;
  height: 44px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.global-search input,
.search-field input,
.audit-search input,
.permission-toolbar input {
  height: 42px;
  min-height: 42px;
  font-size: 14px;
}

.global-search > span,
.search-field > span,
.audit-search > span { color: var(--muted); }
.global-search kbd { color: var(--muted); border-color: var(--line); background: var(--surface-2); font-size: 12px; }

.command-results {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  box-shadow: var(--shadow-overlay);
}

.command-results > small { color: var(--muted-2); font-size: 12px !important; }
.command-results button { min-height: 48px; border-radius: var(--radius-sm); }
.command-results button:hover { background: var(--surface-3); }
.command-results strong { font-size: 14px; }
.command-results em { color: var(--muted); font-size: 12px; }

.top-action,
.primary,
.secondary,
.row-action {
  min-height: 44px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
}

.top-action,
.secondary,
.row-action {
  color: var(--text);
  border-color: var(--control-line);
  background: var(--surface-2);
  box-shadow: none;
}

.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.primary:hover { background: var(--accent-hover); }
.primary:hover,
.secondary:hover { filter: none; transform: none; }
.secondary:hover,
.row-action:hover { border-color: var(--accent-light); background: var(--surface-3); }

.small-button { min-height: 44px; padding: 0 12px; font-size: 13px; }
.icon-button { width: 44px; height: 44px; border-radius: var(--radius-sm); font-size: 19px; }
.quiet,
.text-button,
.danger-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* Content hierarchy */
.content {
  width: min(1500px, 100%);
  min-height: calc(100dvh - 72px);
  padding: 32px clamp(20px, 3vw, 44px) 64px;
}

.page { animation-duration: .16s; }
.page-header { gap: 24px; margin-bottom: 24px; }
.page-header > div:first-child { max-width: 720px; }
.page-header h1 { max-width: none; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .09em;
}
.muted { color: var(--muted); font-size: 14px; }
.header-actions { gap: 8px; }

.panel,
.metric-card,
.summary-strip,
.plan-card,
.kanban-lane,
.work-card,
.health-hero,
.data-quality-banner,
.integration-warning,
.operations-radar,
.support-kpis {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.panel-heading { gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { font-size: 18px; }
.panel-heading p { color: var(--muted); font-size: 13px; }

.metrics { gap: 14px; }
.metric-card {
  min-height: 132px;
  padding: 18px;
}
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { font-size: clamp(28px, 2.4vw, 34px); letter-spacing: -.035em; }
.metric-card small { font-size: 12px !important; }
.metric-card > div i { min-width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 12px; }

.overview-grid { gap: 16px; }
.revenue-panel,
.attention-panel,
.compact-table,
.support-snapshot { min-height: 280px; padding: 22px; }
.revenue-hero small { font-size: 12px !important; letter-spacing: .06em; }
.revenue-hero strong { font-size: 28px; }
.distribution-bar { height: 10px; border-radius: 999px; }
.distribution-legend strong { font-size: 14px; }
.attention-list button { min-height: 60px; border-radius: var(--radius-md); padding: 14px; background: var(--surface-2); }
.attention-list button strong { font-size: 14px; }
.attention-list button b { font-size: 12px; }
.recent-list > button,
.snapshot-list > button { min-height: 58px; padding: 10px 6px; }
.recent-list strong,
.snapshot-list strong { font-size: 13px; }
.recent-list time { font-size: 12px; }

.summary-strip { border-radius: var(--radius-lg); }
.summary-strip > div { min-height: 86px; gap: 5px; padding: 15px 18px; }
.summary-strip span { color: var(--muted); font-size: 13px; }
.summary-strip strong { font-size: 21px; }
.summary-strip > div::after { display: none; }

.data-toolbar {
  min-height: 64px;
  gap: 10px;
  border-color: var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 10px 12px;
  background: var(--surface);
}
.data-toolbar select { min-width: 180px; height: 44px; }
.result-count,
.dataset-meta { color: var(--muted); font-size: 12px; }

/* Data tables */
.table-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.data-toolbar + .table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
table { min-width: 880px; font-size: 13px; }
th {
  height: 48px;
  padding: 0 16px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  letter-spacing: .06em;
}
td { height: 60px; padding: 10px 16px; font-size: 13px; }
td > strong,
.customer-cell strong { font-size: 14px; }
.customer-cell { min-height: 44px; }
.customer-cell small { font-size: 12px !important; }
.row-action { padding: 0 13px; white-space: nowrap; }

.status,
.priority,
.availability,
.health-signal,
.sla,
.count-badge,
.root-badge,
.billing-state,
.category-pill,
.outcome,
.severity,
.access-status,
.mfa-state {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.2;
}

/* Forms and overlays */
.form-grid { gap: 16px; }
.form-grid label,
.modal-body > label,
.login-card label,
.invite-card label,
.onboarding-form > label,
.beta-operation-form label {
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  min-height: 44px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-sm);
  padding-inline: 12px;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
}
textarea { min-height: 96px; padding-block: 11px; line-height: 1.5; }
input::placeholder,
textarea::placeholder { color: var(--text); opacity: 1; }
input:focus,
select:focus,
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230, 104, 33, .18); }

.modal-shell { padding: 24px; }
.modal-backdrop { background: var(--surface); backdrop-filter: blur(3px); }
.modal-card,
.detail-drawer {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}
.modal-card > header { min-height: 84px; padding: 20px 22px; }
.modal-card > header h2 { font-size: 20px; }
.modal-card > header p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.modal-body { gap: 16px; padding: 22px; }
.modal-card > footer { min-height: 72px; gap: 10px; padding: 14px 22px; background: var(--surface-2); }
.detail-drawer { height: 100dvh; padding: 24px; }
.drawer-title h2 { font-size: 26px; }
.drawer-title > p:not(.eyebrow) { font-size: 13px; }
.detail-grid small { font-size: 12px !important; }
.detail-grid strong { font-size: 14px; }

.notice {
  min-height: 52px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow);
}
.loading { min-height: 44px; font-size: 13px; box-shadow: var(--shadow); }

/* Sign in */
.login-shell {
  min-height: 100dvh;
  background: var(--bg);
}
.login-shell::before { display: none; }
.login-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 32px; }
.login-card .muted { font-size: 14px; }
.login-security,
.secure-note { border-radius: var(--radius-md); }

/* Support workspace */
.support-kpis,
.operations-radar { overflow: hidden; }
.operations-radar button,
.support-kpis > div { min-height: 92px; padding: 15px 18px; }
.operations-radar span,
.support-kpis span { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.operations-radar strong,
.support-kpis strong { font-size: 22px; }
.support-workspace { min-height: 600px; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
.ticket-queue { background: var(--surface); }
.queue-head { gap: 12px; padding: 16px; }
.queue-head h2 { font-size: 16px; }
.queue-head > div:first-child span { font-size: 12px; }
.filter-tabs { gap: 4px; }
.filter-tabs button { min-height: 44px; border-radius: var(--radius-sm); padding: 7px 8px; font-size: 12px; }
.filter-tabs button:hover,
.filter-tabs button.active { background: var(--surface-3); }
.queue-item { gap: 8px; padding: 15px; }
.queue-item > div strong { font-size: 13px; }
.queue-item h3 { font-size: 14px; }
.queue-item > p { color: var(--muted); font-size: 13px; }
.queue-item time { font-size: 12px; }
.conversation { background: var(--surface); }
.conversation-head { min-height: 76px; padding: 14px 20px; }
.conversation-head h2 { font-size: 16px; }
.conversation-head p { font-size: 12px; }
.conversation-meta small { font-size: 12px !important; letter-spacing: .05em; }
.conversation-meta strong { font-size: 13px; }
.message header strong,
.message header time { font-size: 12px; }
.message p { padding: 11px 13px; font-size: 14px; }
.composer textarea { min-height: 88px; font-size: 14px; }
.composer-hint,
.composer label { font-size: 12px; }

/* Commercial catalog, onboarding and operational health */
.plan-grid { gap: 16px; }
.plan-card { min-height: 400px; padding: 22px; }
.plan-card > header p { font-size: 13px; }
.plan-card > header small { font-size: 12px !important; }
.plan-price strong { font-size: 30px; }
.plan-price span { font-size: 13px; }
.plan-stats strong { font-size: 16px; }
.permission-list { gap: 9px; font-size: 13px; }
.permission-list > small { font-size: 12px !important; }

.onboarding-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
.onboarding-steps > span { min-height: 64px; }
.onboarding-steps > span strong { font-size: 13px; }
.onboarding-form { padding: 28px; }
.form-section p { font-size: 13px; }

.health-hero { min-height: 144px; padding: 24px; }
.health-hero small { font-size: 12px !important; }
.health-hero strong { font-size: 24px; }
.health-hero p { font-size: 13px; }
.check-card { min-height: 210px; padding: 20px; }
.check-card p { font-size: 13px; }
.check-card footer span,
.check-card footer strong { font-size: 12px; }
.health-domain > header { min-height: 96px; }
.health-domain > header small { font-size: 12px !important; }
.health-check { min-height: 120px; }
.health-check header strong { font-size: 13px; }
.health-check header span { font-size: 12px; }
.health-check p { font-size: 13px; }
.health-check > .text-button { font-size: 12px; }
.health-history-track small { font-size: 12px !important; transform: none; }
.incident-list > article strong { font-size: 13px; }
.incident-list > article > span:last-child { font-size: 12px; }

/* Audit, access and beta */
.audit-filters { gap: 10px; padding: 14px; }
.date-filter { color: var(--muted); font-size: 12px; }
.date-filter input { min-height: 44px; }
.pagination > span { font-size: 12px; }
.audit-reason small,
.audit-diff small { font-size: 12px !important; }
.audit-reason p { font-size: 13px; }
.audit-diff pre,
.audit-metadata pre { font-size: 12px; line-height: 1.55; }
.audit-metadata summary { min-height: 44px; display: flex; align-items: center; font-size: 13px; }

.access-table > article { min-height: 84px; }
.access-table > article > div > small { font-size: 12px !important; }
.access-table > article > div > strong { font-size: 13px; }
.access-person strong { font-size: 14px !important; }
.access-person small { font-size: 12px !important; }
.read-only-label { font-size: 12px; }

.beta-toolbar { border-radius: var(--radius-lg); }
.beta-drawer > header { background: var(--surface); }
.beta-consent > div,
.beta-participant-card { border-radius: var(--radius-md); }
.beta-consent strong,
.beta-operation-form h3,
.beta-timeline h3 { font-size: 14px; }
.beta-timeline article strong,
.beta-timeline article p { font-size: 13px; }
.beta-drawer > footer { background: var(--surface); }

/* Kanban */
.work-controls { gap: 14px; }
.work-tabs { min-height: 52px; gap: 4px; border-color: var(--line); border-radius: var(--radius-md); padding: 4px; background: var(--surface); }
.work-tabs button { min-height: 42px; padding: 0 14px; font-size: 13px; }
.work-tabs button.active { color: var(--text); background: var(--accent); box-shadow: none; }
.work-intelligence { border-color: var(--line); border-radius: var(--radius-md); padding: 13px 14px; background: var(--surface); }
.work-intelligence strong { font-size: 13px; }
.work-intelligence small { font-size: 12px !important; }
.kanban-board { grid-auto-columns: minmax(300px, 1fr); gap: 14px; padding-bottom: 18px; }
.kanban-lane { min-height: 480px; }
.kanban-lane > header { min-height: 76px; padding: 15px; }
.kanban-lane > header h2 { font-size: 15px; }
.kanban-lane > header b { min-width: 32px; height: 32px; font-size: 12px; }
.kanban-cards { gap: 10px; padding: 11px; }
.work-card { padding: 14px; background: var(--surface-2); box-shadow: none; }
.work-card:hover { border-color: var(--control-line); transform: none; }
.work-source,
.attention-score,
.work-owner,
.work-card time { font-size: 12px; }
.attention-score { min-width: 32px; height: 28px; }
.work-card-main { min-height: 44px; }
.work-card-main h3 { font-size: 15px; }
.work-card-main p { font-size: 13px; }
.work-card-main small { font-size: 12px !important; }
.work-card-signals span { padding: 5px 8px; font-size: 12px; }
.small-work-action { width: 44px; height: 44px; }
.kanban-empty span { font-size: 12px; }
.composer select,
.catalog-context select,
.data-toolbar > .primary,
.password-field > span button,
.audit-filters > input,
.audit-filters > select,
.pagination .secondary,
.work-tabs button { min-height: 44px; }

@media (max-width: 1180px) {
  .icon-button.menu-button,
  .icon-button.sidebar-close { display: grid; }
  .app-shell { display: block; }
  .sidebar { position: fixed; width: 264px; visibility: hidden; pointer-events: none; box-shadow: var(--shadow-overlay); }
  .sidebar.open { visibility: visible; pointer-events: auto; }
  .topbar { grid-template-columns: auto minmax(240px, 1fr) auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid,
  .overview-grid.lower,
  .access-layout,
  .access-workspace { grid-template-columns: 1fr; }
  .access-invite { position: static; }
  .health-domain-grid { grid-template-columns: 1fr; }
  .work-controls { align-items: stretch; flex-direction: column; }
  .work-filters { width: 100%; }
}

@media (max-width: 820px) {
  .topbar { min-height: 68px; height: auto; padding: 10px 16px; }
  .content { padding: 26px 16px 56px; }
  .page-header { display: grid; gap: 16px; }
  .header-actions { width: 100%; }
  .header-actions > * { flex: 1 1 auto; }
  .summary-strip,
  .health-summary,
  .audit-summary,
  .access-summary,
  .work-summary,
  .customer-summary,
  .catalog-summary { grid-template-columns: 1fr 1fr; }
  .overview-grid,
  .overview-grid.lower { grid-template-columns: 1fr; }
  .support-workspace { min-height: 0; grid-template-columns: 1fr; }
  .ticket-queue { max-height: 440px; }
  .conversation { min-height: 560px; }
  .audit-filters { grid-template-columns: 1fr 1fr; }
  .audit-search { grid-column: span 2; }
  .access-table > article { font-size: 13px; }
  .work-tabs { max-width: 100%; overflow-x: auto; }
  .kanban-board { grid-auto-columns: minmax(320px, 82vw); }
  .modal-shell { padding: 12px; }
}

@media (max-width: 560px) {
  h1 { font-size: 28px; }
  h2 { font-size: 17px; }
  input,
  select,
  textarea,
  .global-search input,
  .search-field input,
  .audit-search input,
  .permission-toolbar input { font-size: 16px; }
  .content { padding-inline: 14px; }
  .global-search { min-width: 0; }
  .top-action { width: 44px; }
  .metrics { grid-template-columns: 1fr; }
  .summary-strip,
  .health-summary,
  .audit-summary,
  .access-summary,
  .work-summary,
  .customer-summary,
  .catalog-summary { grid-template-columns: 1fr; }
  .summary-strip > div { border-right: 0; }
  .operations-radar,
  .support-kpis { grid-template-columns: 1fr 1fr; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .data-toolbar select,
  .search-field { width: 100%; }
  .result-count { margin-left: 0; }
  .support-workspace { border-radius: var(--radius-md); }
  .conversation-head { align-items: flex-start; flex-direction: column; }
  .conversation-head > div:last-child { width: 100%; justify-content: flex-start; }
  .conversation-meta { grid-template-columns: 1fr 1fr; }
  .message { max-width: 96%; }
  .modal-shell { padding: 0; place-items: end center; }
  .modal-card,
  .detail-drawer { width: 100%; max-height: 94dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .detail-drawer { height: 94dvh; }
  .modal-card > footer,
  .detail-drawer > footer,
  .beta-drawer > footer { grid-template-columns: 1fr; }
  .modal-card > footer > button,
  .detail-drawer > footer > button,
  .beta-drawer > footer > button { width: 100%; }
  .audit-filters { grid-template-columns: 1fr; }
  .audit-search { grid-column: auto; }
  .work-tabs { width: 100%; }
  .work-tabs button { flex: 0 0 auto; }
  .work-filters { grid-template-columns: 1fr; }
  .kanban-board { width: 100%; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; margin-right: 0; padding-right: 0; }
  .top-action { width: 40px; margin-right: 1px; }
  .top-action,
  .menu-button { justify-self: start; }
}

/* ChefOS editorial identity. All page components share the canonical tokens above. */
h1, .login-card h1, .page-header h1 { font-family:"DM Serif Display", Georgia, serif; font-weight:400; letter-spacing:-.035em; }
.page-header h1 { font-size:clamp(30px,3.4vw,46px); }
.sidebar { background:var(--sidebar); color:#f6f3eb; box-shadow:none; --text:#f6f3eb; --muted:#c5cbbd; --muted-2:#b3bca9; --line:#444a3e; --line-soft:#444a3e; --surface:#353b30; --surface-2:#353b30; }
.sidebar .brand { background:transparent; letter-spacing:-.03em; }
.brand-mark, .login-brand .brand-mark { width:40px; height:40px; border:0; border-radius:12px; background:#f6f3eb url('/chefos-symbol.svg') center / 72% no-repeat; box-shadow:none; }
.sidebar .nav-label { color:#aeb8a2; letter-spacing:.12em; }
.sidebar .nav-item, .sidebar .nav-glyph { color:#d4dccb; }
.sidebar .nav-item:hover { background:#353b30; color:#fff; transform:none; }
.sidebar .nav-item.active { background:#e8ecd9; color:#272b25; box-shadow:none; }
.sidebar .nav-item.active .nav-glyph { color:#272b25; }
.sidebar .user-card, .sidebar .system-pill, .sidebar .system-pill small { color:#e8ecd9; background:#353b30; border-color:#444a3e; }
.sidebar .avatar { color:#f6f3eb; background:#535e46; }
.sidebar .quiet, .sidebar .ux-help-link { color:#d4dccb; }
.sidebar .icon-button { background:#353b30; color:#f6f3eb; }
.topbar { background:var(--bg); border-color:var(--line); box-shadow:none; }
.content { padding-top:30px; }
.eyebrow { color:var(--accent-light); letter-spacing:.12em; }
.panel, .metric-card, .summary-strip, .modal-card, .detail-drawer, .login-card { box-shadow:var(--shadow); border-color:var(--line); }
.primary { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:none; }
.primary:hover { background:var(--accent-hover); color:#fff; }
.secondary, .row-action, .icon-button { background:var(--surface); color:var(--text); border-color:var(--line); }
.secondary:hover, .row-action:hover { background:var(--surface-3); }
.quiet, .text-button { color:var(--accent-light); }
input, select, textarea { background:var(--surface); color:var(--text); border-color:var(--control-line); }
input::placeholder, textarea::placeholder { color:var(--muted-2); }
thead, th { background:var(--surface-2); color:var(--muted); }
.avatar { background:var(--surface-3); color:#34442b; }
.integration-warning, .modal-alert { background:#fff4e4; color:var(--text); border-color:#efd9b4; }
.integration-warning p, .modal-alert p { color:var(--muted); }
.integration-warning > span { color:#fff; background:var(--warning); }
.sidebar .system-unknown i { background:#a2aa97; box-shadow:none; }
.login-shell { background:var(--bg); }
.metric-value, .metric-card strong { color:var(--text); }
.operations-grid { display:grid; gap:24px; }
.operation-card { padding:24px; }
.operation-card > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:24px; }
.operation-card h2 { font-size:23px; margin:6px 0; }
.connection-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.connection-signal { min-width:0; border:1px solid var(--line); background:var(--surface-2); border-radius:12px; padding:18px; }
.signal-heading { display:flex; justify-content:space-between; gap:10px; font-size:12px; color:var(--muted); margin-bottom:12px; }
.signal-heading i { width:8px; height:8px; border-radius:50%; background:#979d91; margin-top:5px; }
.signal-ready .signal-heading i { background:var(--success); }
.signal-configured .signal-heading i { background:var(--info); }
.signal-attention .signal-heading i { background:var(--accent); }
.signal-unknown { border-style:dashed; }
.connection-signal strong { display:block; font-size:15px; line-height:1.4; }
.connection-signal p { margin:8px 0 0; color:var(--muted); font-size:13px; }
.operation-card footer { display:flex; gap:16px; flex-wrap:wrap; margin-top:22px; }
.operation-detail { display:flex; gap:18px; border-top:1px solid var(--line); padding-top:15px; margin-top:15px; font-size:13px; }
.operation-detail span { color:var(--muted); overflow-wrap:anywhere; }
.billing-status { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,.8fr); gap:24px; padding:24px; margin:24px 0; background:var(--surface-3); }
.billing-status p { color:var(--muted); margin-bottom:0; max-width:60ch; }
.billing-evidence { align-self:center; display:grid; gap:8px; }
.summary-date { font-size:16px!important; }
.modal-card > form { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.modal-card > form > .modal-body { overflow:auto; }
.modal-card > form > footer { display:flex; flex-wrap:wrap; gap:12px; justify-content:flex-end; padding:18px 22px; border-top:1px solid var(--line); }
.module-disclosure { margin-top:14px; font-size:13px; }
.module-disclosure summary { cursor:pointer; color:var(--accent-light); }
.module-disclosure ul { padding-left:18px; max-height:200px; overflow:auto; }
.integration-footnote { margin-top:25px; font-size:13px; color:var(--muted); }
@media(max-width:900px) { .connection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .connection-grid, .billing-status { grid-template-columns:1fr; } .operation-card { padding:18px; } .operation-card > header { flex-wrap:wrap; } .operation-detail { flex-direction:column; gap:6px; } }
@media(max-width:600px) {
  body { min-width:0; }
  .topbar { grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; padding:10px 12px; }
  .top-action { width:44px; min-width:44px; padding:0; justify-content:center; font-size:0; }
  .top-action span { font-size:22px; }
  .global-search { min-width:0; width:100%; grid-template-columns:20px minmax(0,1fr); }
  .global-search input { min-width:0; font-size:13px; }
  .summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .summary-strip > div { min-height:90px; padding:16px; border-bottom:1px solid var(--line); }
}
