/* XCodefix Helpdesk — the desk (staff) and the portal (customers).

   Built on the platform's tokens.css and ui-core.css. Colours that carry
   meaning — status, priority, SLA, services — are fixed hex values, never the
   brand variables: a company's brand colour (XCodefix's is red) must not make
   "In progress" read as an error. The brand colour is kept for actions. */

:root {
  --hd-ink: #0F172A;
  --hd-ink-2: #1E293B;
  --hd-line: #EEF0F3;
  --hd-row-hover: #F8FAFC;
  --hd-violet: #7C3AED;
  --hd-note: #FFFBEB;
  --hd-note-line: #FDE68A;
  --hd-radius: 12px;
  --hd-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 1px 3px rgb(16 24 40 / .06);
  --hd-shadow-lg: 0 4px 6px -2px rgb(16 24 40 / .05), 0 12px 24px -4px rgb(16 24 40 / .10);
}

/* ------------------------------------------------------------------ basics */
.tabular { font-variant-numeric: tabular-nums; }
.hd-muted { color: var(--muted); }
.hd-sub { color: var(--text-2); font-size: 13px; }
.hd-stack { display: flex; flex-direction: column; gap: 14px; }
.hd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hd-spacer { flex: 1; }
.hd-card {
  background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
}
.hd-card-pad { padding: 18px; }
.hd-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--hd-line);
}
.hd-card-head h3, .hd-card-head h2 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.hd-card-head .icon { color: var(--text-2); }
.hd-card-body { padding: 16px 18px; }
.hd-empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.hd-empty .icon { width: 28px; height: 28px; color: #CBD5E1; display: block; margin: 0 auto 8px; }
.hd-link-more { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--border-table); border-bottom-width: 2px; border-radius: 5px;
  font: 600 11px var(--font-mono); color: var(--text-2); background: #fff;
}
.hd-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin: 0; }
.hd-dl dt { color: var(--text-2); }
.hd-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ pills */
.st {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; line-height: 1;
}
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st-info    { background: #EFF6FF; color: #1D4ED8; border-color: #DBEAFE; }
.st-violet  { background: #F5F3FF; color: #6D28D9; border-color: #EDE9FE; }
.st-warning { background: #FFFBEB; color: #B45309; border-color: #FEF3C7; }
.st-neutral { background: #F3F4F6; color: #4B5563; border-color: #E5E7EB; }
.st-success { background: #F0FDF4; color: #15803D; border-color: #DCFCE7; }
.st-muted   { background: #F9FAFB; color: #6B7280; border-color: #E5E7EB; }
.st-lg { height: 26px; padding: 0 11px; font-size: 12.5px; }

/* Priority: signal bars, and a red square for urgent. */
.pri { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.pbars i { width: 3px; border-radius: 1px; background: #D1D5DB; }
.pbars i:nth-child(1) { height: 5px; } .pbars i:nth-child(2) { height: 8px; } .pbars i:nth-child(3) { height: 12px; }
.pbars-low i:nth-child(1) { background: #64748B; }
.pbars-normal i:nth-child(-n+2) { background: #2563EB; }
.pbars-high i { background: #EA580C; }
.pbars-urgent { width: 14px; height: 14px; border-radius: 4px; background: #DC2626; color: #fff; align-items: center; justify-content: center;
  font: 800 10px/1 var(--font-sans); }
.pbars-urgent::before { content: '!'; }
.pbars-urgent i { display: none; }

/* SLA */
.sla-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums; border: 1px solid;
}
.sla-chip .icon { width: 13px; height: 13px; flex: none; }
.sla-chip.is-running  { color: #374151; background: #F9FAFB; border-color: #E5E7EB; }
.sla-chip.is-warning  { color: #B45309; background: #FFFBEB; border-color: #FDE68A; }
.sla-chip.is-breached { color: #B91C1C; background: #FEF2F2; border-color: #FECACA; }
.sla-chip.is-paused   { color: #6B7280; background: #F3F4F6; border-color: #E5E7EB; }
.sla-chip.is-met      { color: #15803D; background: #F0FDF4; border-color: #BBF7D0; }
.sla-chip.is-missed   { color: #B91C1C; background: #fff; border-color: #FECACA; }

/* Services */
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; max-width: 100%; }
.cat .cat-ico {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none;
  color: var(--c, #64748B); background: #F1F5F9; background: color-mix(in srgb, var(--c, #64748B) 13%, #fff);
}
.cat .cat-ico .icon { width: 13px; height: 13px; }
.cat span { overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; background: #F1F5F9; color: #475569; font-size: 11.5px; font-weight: 500; }

/* People */
.pa {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  font-weight: 700; color: #fff; letter-spacing: .01em; user-select: none;
}
.pa-xs { width: 20px; height: 20px; font-size: 9px; }
.pa-sm { width: 26px; height: 26px; font-size: 10.5px; }
.pa-md { width: 34px; height: 34px; font-size: 12.5px; }
.pa-lg { width: 44px; height: 44px; font-size: 15px; }
.pa-empty { background: #F1F5F9; color: #94A3B8; border: 1px dashed #CBD5E1; }
.pa-empty .icon { width: 60%; height: 60%; }
.pa-t1 { background: #2563EB; } .pa-t2 { background: #7C3AED; } .pa-t3 { background: #0891B2; } .pa-t4 { background: #059669; }
.pa-t5 { background: #D97706; } .pa-t6 { background: #DB2777; } .pa-t7 { background: #4F46E5; } .pa-t8 { background: #475569; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who b { font-weight: 600; }

/* ----------------------------------------------------------------- inbox */
.inbox { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.views {
  position: sticky; top: calc(var(--topbar-h) + 16px);
  background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius);
  padding: 8px; box-shadow: var(--hd-shadow);
}
.views p { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 6px; }
.views a {
  display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 36px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; text-decoration: none;
}
.views a .icon { color: #94A3B8; flex: none; }
.views a:hover { background: var(--bg); color: var(--text); }
.views a.is-active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.views a.is-active .icon { color: var(--brand); }
.views .count { margin-left: auto; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.views .count.is-hot { background: #FEF2F2; color: #B91C1C; border-radius: 999px; padding: 1px 7px; }
.views .count.is-ask { background: #F5F3FF; color: #6D28D9; border-radius: 999px; padding: 1px 7px; }
.views hr { border: 0; border-top: 1px solid var(--hd-line); margin: 6px 4px; }

.inbox-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.inbox-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inbox-title h2 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.inbox-title h2 .count { font-size: 13px; font-weight: 600; color: var(--muted); }
.inbox-title p { color: var(--text-2); font-size: 13px; margin-top: 2px; }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.filters .search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filters .search input { padding-left: 34px; height: 36px; }
.filters select.input { height: 36px; width: auto; min-width: 0; padding-right: 30px; font-size: 13px; }
.filters select.input.is-set { border-color: var(--brand); background-color: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.filters .clear { font-size: 13px; font-weight: 600; }

.bulkbar {
  display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; background: var(--hd-ink); color: #E2E8F0;
}
.bulkbar.is-on { display: flex; }
.bulkbar b { color: #fff; }
.bulkbar select.input { height: 32px; width: auto; background-color: #1E293B; color: #fff; border-color: #334155; font-size: 13px; }
.bulkbar .btn-sm { min-height: 32px; }

.tk-list { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius); box-shadow: var(--hd-shadow); overflow: hidden; }
.tk-row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 22px minmax(0, 1fr) 132px 128px 30px 64px;
  padding: 12px 16px 12px 14px; border-bottom: 1px solid var(--hd-line); position: relative;
  transition: background .12s ease;
}
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover, .tk-row.is-focus { background: var(--hd-row-hover); }
.tk-row.is-focus { box-shadow: inset 3px 0 0 var(--brand); }
.tk-row.is-selected { background: #F5F3FF; }
.tk-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.tk-row.p-urgent::before { background: #DC2626; }
.tk-row.p-high::before { background: #F97316; }
.tk-check { width: 16px; height: 16px; accent-color: var(--brand); }
.tk-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tk-line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-ref { font: 600 12px var(--font-mono); color: var(--muted); flex: none; }
.tk-subject { color: var(--text); font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.tk-subject:hover { text-decoration: underline; }
.tk-row.is-unread .tk-subject { font-weight: 700; }
.tk-dot { width: 8px; height: 8px; border-radius: 50%; background: #2563EB; flex: none; box-shadow: 0 0 0 3px #DBEAFE; }
.tk-line2 { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.tk-line2 .sep { color: #CBD5E1; }
.tk-line2 .client { font-weight: 600; color: #334155; }
.tk-line2 .needs { color: #B45309; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tk-line2 .needs .icon { width: 13px; height: 13px; }
.tk-accept { color: #6D28D9; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tk-accept .icon { width: 13px; height: 13px; }
.tk-when { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.tk-cell { display: flex; align-items: center; min-width: 0; }
.tk-list-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--hd-line); font-size: 12.5px; color: var(--muted); }
.tk-hints { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-hints span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------------------------------------------------------------- ticket */
.tk-head {
  background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.tk-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tk-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.tk-crumbs .tk-ref { font-size: 12.5px; color: var(--text-2); }
.tk-title { font-size: 21px; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; margin-top: 4px; overflow-wrap: anywhere; }
.tk-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.tk-meta .icon { width: 14px; height: 14px; color: var(--muted); }
.tk-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-clocks { display: flex; gap: 8px; flex-wrap: wrap; }

.accept-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--hd-radius); margin-top: 14px;
  background: linear-gradient(100deg, #F5F3FF 0%, #FAF5FF 55%, #FFFFFF 100%); border: 1px solid #DDD6FE;
}
.accept-banner .ab-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #7C3AED; color: #fff; flex: none; }
.accept-banner .ab-text { flex: 1 1 260px; min-width: 0; }
.accept-banner .ab-text b { display: block; font-size: 14px; color: #3B0764; }
.accept-banner .ab-text span { font-size: 12.5px; color: #6B21A8; }
.accept-banner form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.accept-banner select.input { height: 36px; width: auto; min-width: 220px; }
.accept-banner .btn-accept { background: #7C3AED; color: #fff; border-color: #7C3AED; }
.accept-banner .btn-accept:hover { background: #6D28D9; }
.notice-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--hd-radius); margin-top: 14px;
  background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; font-size: 13.5px;
}
.notice-bar .icon { color: #B45309; flex: none; }
.notice-bar form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.notice-bar select.input { height: 34px; width: auto; min-width: 220px; }

.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 16px; }
.tk-side { display: flex; flex-direction: column; gap: 14px; }

.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; scroll-margin-top: calc(var(--topbar-h) + 20px); }
.msg-card { background: #fff; border: 1px solid var(--border-card); border-radius: var(--hd-radius); overflow: hidden; box-shadow: var(--hd-shadow); }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--hd-line); font-size: 13px; background: #FCFCFD; }
.msg-head b { font-weight: 650; color: var(--text); }
.msg-head .role { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #F1F5F9; color: #475569; }
.msg-head time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg-head .via { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.msg-head .via .icon { width: 13px; height: 13px; }
.msg-body { padding: 14px 16px 16px; font-size: 14px; line-height: 1.65; color: #1F2937; overflow-wrap: anywhere; }
.msg-body .rich-text p { margin: 0 0 10px; }
.msg-body .rich-text p:last-child { margin-bottom: 0; }
.msg-body .rich-text ul, .msg-body .rich-text ol { margin: 0 0 10px 20px; }
.msg-body .rich-text h4 { font-size: 14px; font-weight: 650; margin: 12px 0 6px; }
.msg-body a { word-break: break-all; }
.msg-agent .msg-card { border-color: #DCE3F5; }
.msg-agent .msg-head { background: #F7F9FE; }
.msg-agent .role { background: #E0E7FF; color: #3730A3; }
.msg-note .msg-card { background: var(--hd-note); border-color: var(--hd-note-line); }
.msg-note .msg-head { background: #FEF3C7; border-bottom-color: #FDE68A; }
.msg-note .role { background: #FDE68A; color: #78350F; }
.msg-initial .msg-card { border-color: #CBD5E1; }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.file-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 6px 10px;
  border: 1px solid var(--border-card); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--text); text-decoration: none;
}
.file-pill:hover { border-color: var(--muted); text-decoration: none; }
.file-pill .icon { color: var(--text-2); flex: none; }
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill small { color: var(--muted); flex: none; }
.ev { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; padding: 2px 0 2px 46px; position: relative; }
.ev::before { content: ''; position: absolute; left: 14px; top: -10px; bottom: -10px; width: 2px; background: var(--hd-line); }
.ev .ev-dot { position: absolute; left: 10px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #CBD5E1; }
.ev.is-alert { color: #B91C1C; }
.ev.is-alert .ev-dot { border-color: #F87171; }
.ev.is-good .ev-dot { border-color: #4ADE80; }
.ev time { color: var(--muted); font-size: 12px; }

.composer {
  background: #fff; border: 1px solid var(--border-table); border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow-lg); scroll-margin-top: calc(var(--topbar-h) + 20px);
}
.composer.is-note { background: var(--hd-note); border-color: #FCD34D; }
.composer.is-drag { outline: 2px dashed var(--brand); outline-offset: 2px; }
.composer-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--hd-line); }
.composer.is-note .composer-tabs { border-bottom-color: #FDE68A; }
.composer-tabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px 10px; font-size: 13px; font-weight: 600; color: var(--text-2);
  border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.composer-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.composer.is-note .composer-tabs button[aria-selected="true"] { border-bottom-color: #D97706; }
.composer-tabs .to { margin-left: auto; font-size: 12.5px; color: var(--muted); padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer textarea {
  display: block; width: 100%; min-height: 150px; max-height: 60vh; border: 0; resize: vertical; padding: 14px 16px;
  font: inherit; font-size: 14px; line-height: 1.6; background: transparent; color: var(--text); outline: none;
}
.composer-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.composer-files:empty { display: none; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--hd-line); flex-wrap: wrap; }
.composer.is-note .composer-bar { border-top-color: #FDE68A; }
.composer-bar .tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: none; border: 1px solid transparent; cursor: pointer; }
.composer-bar .tool:hover { background: var(--bg); border-color: var(--border-card); color: var(--text); }
.composer-bar label.tool input { display: none; }
.composer-bar .after { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-left: auto; }
.composer-bar .after select.input { height: 32px; width: auto; font-size: 12.5px; }
.composer-hint { padding: 0 16px 10px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.canned-wrap { position: relative; }
.canned-panel { width: 380px; max-height: 360px; overflow: auto; padding: 6px; }
.canned-panel input { margin: 2px 2px 6px; width: calc(100% - 4px); }
.canned-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.canned-item:hover, .canned-item:focus { background: var(--bg); outline: none; }
.canned-item b { display: block; font-size: 13px; color: var(--text); }
.canned-item span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-card { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius); box-shadow: var(--hd-shadow); }
.side-card > h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
  padding: 13px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-card > h3 a, .side-card > h3 button { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.side-body { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.prop { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.prop > label, .prop > span:first-child { color: var(--text-2); font-weight: 500; }
.prop select.input, .prop input.input { height: 34px; font-size: 13px; padding-top: 0; padding-bottom: 0; }
.clock { display: flex; flex-direction: column; gap: 6px; }
.clock-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.clock-top b { font-weight: 600; }
.clock-bar { height: 6px; background: #F1F5F9; border-radius: 999px; overflow: hidden; }
.clock-bar i { display: block; height: 100%; border-radius: 999px; background: #22C55E; }
.clock.is-warning .clock-bar i { background: #F59E0B; }
.clock.is-breached .clock-bar i { background: #EF4444; }
.clock.is-paused .clock-bar i { background: #94A3B8; }
.clock.is-met .clock-bar i, .clock.is-missed .clock-bar i { background: transparent; }
.clock small { font-size: 12px; color: var(--muted); }
.cust-head { display: flex; align-items: center; gap: 12px; }
.cust-head > div b { display: block; font-size: 14px; }
.cust-head > div span { display: block; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.cust-facts { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.cust-facts div { display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); }
.cust-facts .icon { width: 15px; height: 15px; color: var(--muted); flex: none; margin-top: 2px; }
.cust-facts b { color: var(--text); font-weight: 600; }
.grade { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--hd-ink); color: #fff; font-size: 11px; font-weight: 700; }
.site-list { display: flex; flex-direction: column; gap: 6px; }
.site-list a, .site-list span.site { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.site-list small { color: var(--muted); }
.mini-list { display: flex; flex-direction: column; }
.mini-list a { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--hd-line); font-size: 12.5px; color: var(--text); text-decoration: none; min-width: 0; }
.mini-list a:first-child { border-top: 0; }
.mini-list a:hover .t { text-decoration: underline; }
.mini-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .r { font: 600 11px var(--font-mono); color: var(--muted); }
.side-actions { display: flex; flex-direction: column; gap: 6px; }
.side-actions .btn { justify-content: flex-start; }
.watchers { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ home */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.hello p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.hello p b { color: var(--text); }
.away-strip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; font-size: 13.5px; margin-bottom: 16px; }
.away-strip form { margin-left: auto; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius); box-shadow: var(--hd-shadow);
  transition: border-color .15s, box-shadow .15s, transform .15s; color: var(--text);
}
.kpi-tile:hover { text-decoration: none; border-color: #CBD5E1; box-shadow: var(--hd-shadow-lg); transform: translateY(-1px); }
.kpi-tile .k-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.kpi-tile .k-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: #F1F5F9; background: color-mix(in srgb, var(--c) 12%, #fff); }
.kpi-tile .k-ico .icon { width: 16px; height: 16px; }
.kpi-tile .k-val { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-tile .k-foot { font-size: 12px; color: var(--muted); }
.kpi-tile.is-alert .k-val { color: #B91C1C; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--hd-line); text-decoration: none; color: var(--text); }
.att-row:hover { background: var(--hd-row-hover); text-decoration: none; }
.att-row:first-child { border-top: 0; }
.att-row .t { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row .m { font-size: 12px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row .m .tk-ref { font-size: 11.5px; }
.metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hd-line); border-radius: 10px; overflow: hidden; border: 1px solid var(--hd-line); }
.metric-pair > div { background: #fff; padding: 12px 14px; }
.metric-pair b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-pair span { font-size: 12px; color: var(--text-2); }
.csat-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #F1F5F9; }
.csat-bar i { display: block; height: 100%; }
.csat-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.csat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.csat-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.load-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.load-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 18px; border-bottom: 1px solid var(--hd-line); }
.load-table td { padding: 10px 18px; border-bottom: 1px solid var(--hd-line); }
.load-table tr:last-child td { border-bottom: 0; }
.load-table .n { text-align: right; font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; }
.load-table .hot { color: #B91C1C; font-weight: 700; }
.load-table .ask { color: #6D28D9; font-weight: 700; }
.load-table a { color: var(--text); font-weight: 600; }
.load-table small { display: block; color: var(--muted); font-size: 11.5px; }

/* --------------------------------------------------------------- reports */
.rep-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-filters select.input { height: 36px; width: auto; }
.rep-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.rep-kpi { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--hd-radius); padding: 14px 16px; box-shadow: var(--hd-shadow); }
.rep-kpi span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.rep-kpi b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.rep-kpi small { font-size: 12px; color: var(--muted); }
.rep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.meter { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.meter i { flex: 1; height: 6px; border-radius: 999px; background: #F1F5F9; position: relative; overflow: hidden; display: block; min-width: 50px; }
.meter i b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #22C55E; }
.meter.is-mid i b { background: #F59E0B; }
.meter.is-low i b { background: #EF4444; }
.meter span { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

/* ----------------------------------------------------------------- admin */
.set-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.set-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.set-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.set-section { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.set-section h3 { font-size: 15px; font-weight: 650; }
.set-section > .hd-card-body > p.hd-sub { margin-top: -6px; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border-table); border-radius: 10px; cursor: pointer; background: #fff; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card b { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.radio-card span { font-size: 12.5px; color: var(--text-2); }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hd-line); }
.switch-row:first-child { border-top: 0; }
.switch-row b { font-size: 13.5px; font-weight: 600; display: block; }
.switch-row span { font-size: 12.5px; color: var(--text-2); }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1; transition: background .15s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.toggle input:checked + i { background: var(--brand); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.inline-num { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.inline-num input.input { width: 76px; height: 34px; text-align: center; }
.svc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--hd-line); }
.svc-row:first-child { border-top: 0; }
.svc-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: #F1F5F9; background: color-mix(in srgb, var(--c) 13%, #fff); }
.svc-row details > summary { list-style: none; cursor: pointer; }
.svc-row details > summary::-webkit-details-marker { display: none; }
.svc-row h4 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.svc-row p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.svc-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.svc-facts span { display: inline-flex; align-items: center; gap: 5px; }
.svc-facts .icon { width: 13px; height: 13px; color: var(--muted); }
.svc-edit { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-card); }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick label { position: relative; width: 34px; height: 34px; border: 1px solid var(--border-card); border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick label:has(input:checked) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.team-card { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.team-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.team-head h4 { font-size: 15px; font-weight: 650; }
.team-head .kind { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: #F1F5F9; color: #475569; }
.team-head .kind.k-pod { background: #EEF2FF; color: #4338CA; }
.team-head .kind.k-desk { background: #F5F3FF; color: #6D28D9; }
.team-people { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.person-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border-card); background: #fff; font-size: 12.5px; }
.person-chip.is-lead { border-color: #C7D2FE; background: #EEF2FF; }
.person-chip .state { font-size: 11px; color: var(--muted); }
.person-chip .state.is-off { color: #B45309; }
.person-chip form { display: inline; }
.person-chip button.x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; display: inline-flex; }
.team-route { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--hd-line); background: #FCFCFD; border-radius: 0 0 var(--hd-radius) var(--hd-radius); }
.team-route select.input { height: 34px; width: auto; font-size: 13px; }
.targets { width: 100%; border-collapse: collapse; font-size: 13px; }
.targets th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--hd-line); font-weight: 700; }
.targets td { padding: 8px 10px; border-bottom: 1px solid var(--hd-line); vertical-align: middle; }
.dur { display: inline-flex; align-items: center; gap: 4px; }
.dur input.input { width: 64px; height: 32px; text-align: right; padding: 0 8px; }
.dur select.input { width: auto; height: 32px; padding: 0 26px 0 8px; font-size: 12.5px; }
.week { display: grid; gap: 8px; }
.week-day { display: grid; grid-template-columns: 130px auto auto auto; gap: 10px; align-items: center; font-size: 13px; }
.week-day input[type="time"] { height: 32px; width: 120px; }

/* ------------------------------------------------------------- utilities */
.pagination-wrap { display: flex; justify-content: center; }
.hd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hd-table th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--hd-line); font-weight: 700; background: #FCFCFD; }
.hd-table td { padding: 11px 16px; border-bottom: 1px solid var(--hd-line); vertical-align: middle; }
.hd-table tr:last-child td { border-bottom: 0; }
.hd-table tr:hover td { background: var(--hd-row-hover); }
.hd-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-table a.strong { color: var(--text); font-weight: 600; }
.hd-table small { display: block; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.auth-portal-note { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border-card); font-size: 13px; }
.auth-portal-note .icon { color: var(--text-2); flex: none; margin-top: 2px; }
.auth-portal-note b { display: block; }
.auth-portal-note span { color: var(--text-2); }
.availability-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid var(--border-table); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.availability-btn i { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px #DCFCE7; }
.availability-btn.is-away i { background: #F59E0B; box-shadow: 0 0 0 3px #FEF3C7; }
.topbar-new { white-space: nowrap; }
.launcher-wrap, .orgswitch-wrap, .avail-wrap { position: relative; }
.launcher-panel { width: 340px; padding: 12px; }
.launcher-search { position: relative; margin-bottom: 10px; }
.launcher-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.launcher-search input { padding-left: 32px; height: 36px; }
.launcher-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.launcher-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 10px; text-align: center; color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 600; }
a.launcher-tile:hover { background: var(--bg); text-decoration: none; }
.launcher-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--app); }
.launcher-tile.is-soon .launcher-icon, .launcher-tile.is-off .launcher-icon, .launcher-tile.is-no_access .launcher-icon { opacity: .35; }
.launcher-tile.is-soon, .launcher-tile.is-off, .launcher-tile.is-no_access { color: var(--muted); }
.launcher-tile.is-current { background: var(--bg); }
.launcher-note { font-size: 11px; font-weight: 500; color: var(--muted); }
.launcher-empty { font-size: 13px; color: var(--muted); padding: 8px; }
.launcher-foot { border-top: 1px solid var(--hd-line); margin-top: 10px; padding-top: 10px; font-size: 12.5px; text-align: center; }
.launcher-foot a { display: inline-flex; align-items: center; gap: 4px; }
.orgswitch { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-table); background: #fff; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; max-width: 200px; }
.orgswitch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgswitch-panel { width: 260px; padding: 6px; }
.os-heading { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.os-option { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; padding: 8px 10px; border-radius: 7px; border: 0; background: none; text-align: left; cursor: pointer; }
.os-option:hover { background: var(--bg); }
.os-option.is-current { cursor: default; }
.os-option.is-sub .os-name { padding-left: 12px; }
.os-name { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--text); }
.os-name small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.os-check { color: var(--brand); }

@media (max-width: 1280px) {
  .kpi-grid, .rep-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .inbox { grid-template-columns: 1fr; }
  .views { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .views p, .views hr { display: none; }
  .views a { flex: none; }
  .home-grid { grid-template-columns: 1fr; }
  .tk-layout { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .rep-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tk-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .tk-row .tk-col-status, .tk-row .tk-col-who { display: none; }
  .tk-row .tk-when { grid-column: 3; }
  .tk-row .tk-col-sla { grid-column: 2 / 4; justify-content: flex-start; }
  .kpi-grid, .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .radio-cards { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .prop { grid-template-columns: 1fr; gap: 4px; }
  .week-day { grid-template-columns: 1fr 1fr; }
}

/* ================================================================ portal */
body.portal { background: #F6F7FB; color: var(--text); font-family: var(--font-sans); min-height: 100vh; display: flex; flex-direction: column; }
.pt-top { background: #fff; border-bottom: 1px solid var(--border-card); position: sticky; top: 0; z-index: 20; }
.pt-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }
.pt-top .pt-wrap { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pt-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.pt-brand:hover { text-decoration: none; }
.pt-brand img { height: 34px; width: auto; max-width: 200px; display: block; }
.pt-brand .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.pt-brand .name { display: flex; flex-direction: column; line-height: 1.2; }
.pt-brand .name b { font-size: 15px; }
.pt-brand .name span { font-size: 12px; color: var(--text-2); }
.pt-brand .divider { width: 1px; height: 28px; background: var(--border-card); }
.pt-brand .support { font-size: 14px; font-weight: 600; color: var(--text-2); }
.pt-nav { display: flex; align-items: center; gap: 6px; }
.pt-nav a, .pt-nav button.linkish { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-decoration: none; background: none; border: 0; cursor: pointer; }
.pt-nav a:hover, .pt-nav button.linkish:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.pt-nav a.is-active { color: var(--text); background: var(--bg); }
.pt-nav .btn-primary { color: #fff; background: var(--brand); height: 36px; min-height: 36px; padding: 0 14px; }
.pt-nav .btn-primary:hover { color: #fff; background: var(--brand-hover); }
.pt-me { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding-left: 8px; border-left: 1px solid var(--border-card); margin-left: 4px; }
.pt-main { flex: 1; padding-bottom: 48px; }
.pt-hero { background: radial-gradient(1200px 400px at 85% -20%, rgb(124 58 237 / .35), transparent 60%), linear-gradient(135deg, #0F172A 0%, #1E293B 100%); color: #fff; padding: 48px 0 96px; position: relative; overflow: hidden; }
.pt-hero::after { content: ''; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 45%, transparent), transparent 65%); opacity: .55; pointer-events: none; }
.pt-hero .pt-wrap { position: relative; z-index: 1; }
.pt-hero h1 { font-size: 36px; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; max-width: 640px; }
.pt-hero p { font-size: 16px; color: #CBD5E1; margin-top: 12px; max-width: 620px; line-height: 1.55; }
.pt-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pt-hero .btn-secondary { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .25); }
.pt-hero .btn-secondary:hover { background: rgb(255 255 255 / .14); }
.pt-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: #CBD5E1; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); }
.pt-status i { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgb(74 222 128 / .25); }
.pt-status.is-closed i { background: #FBBF24; box-shadow: 0 0 0 3px rgb(251 191 36 / .25); }
.pt-lift { margin-top: -64px; position: relative; z-index: 2; }
.pt-section-title { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 28px 0 12px; }
.pt-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.pt-service {
  background: #fff; border: 1px solid var(--border-card); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 20px -6px rgb(16 24 40 / .10); color: var(--text); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pt-service:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgb(16 24 40 / .18); border-color: #CBD5E1; text-decoration: none; }
.pt-service:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: #F1F5F9; background: color-mix(in srgb, var(--c) 12%, #fff); }
.pt-ico .icon { width: 21px; height: 21px; }
.pt-service b { font-size: 15px; font-weight: 650; }
.pt-service span { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.pt-service .go { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--brand-text); display: inline-flex; align-items: center; gap: 4px; }
.pt-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.pt-card { background: #fff; border: 1px solid var(--border-card); border-radius: 14px; box-shadow: var(--hd-shadow); }
.pt-card-pad { padding: 22px; }
.pt-card h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.pt-card h3 { font-size: 15px; font-weight: 650; }
.pt-card p.lede { color: var(--text-2); font-size: 14px; margin-top: 4px; line-height: 1.55; }
.pt-info { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; }
.pt-info div { display: flex; gap: 10px; align-items: flex-start; }
.pt-info .icon { color: var(--text-2); flex: none; margin-top: 2px; }
.pt-info b { display: block; }
.pt-info span { color: var(--text-2); }
.pt-list { display: flex; flex-direction: column; }
.pt-req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--hd-line); color: var(--text); text-decoration: none; }
.pt-req:first-child { border-top: 0; }
.pt-req:hover { background: #FAFBFC; text-decoration: none; }
.pt-req .t { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-req .m { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.pt-req.is-yours { background: #FFFBEB; }
.pt-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--hd-line); }
.pt-tabs a { padding: 12px 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.pt-tabs a.is-active { color: var(--text); border-bottom-color: var(--brand); }
.pt-tabs .n { font-size: 12px; color: var(--muted); }
.pt-form { display: flex; flex-direction: column; gap: 18px; }
.pt-step { display: flex; flex-direction: column; gap: 10px; }
.pt-step > .lbl { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.pt-step > .lbl .n { width: 22px; height: 22px; border-radius: 50%; background: var(--hd-ink); color: #fff; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.svc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.svc-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-table); border-radius: 10px; cursor: pointer; background: #fff; font-size: 13.5px; font-weight: 600; transition: border-color .12s, box-shadow .12s; }
.svc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.svc-opt .pt-ico { width: 30px; height: 30px; border-radius: 8px; }
.svc-opt .pt-ico .icon { width: 16px; height: 16px; }
.svc-opt:hover { border-color: #94A3B8; }
.svc-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.svc-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.svc-hint { display: none; font-size: 13px; color: #1E40AF; background: #EFF6FF; border: 1px solid #DBEAFE; padding: 10px 12px; border-radius: 10px; }
.svc-hint.is-on { display: flex; gap: 8px; align-items: flex-start; }
.urg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.urg label { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-table); border-radius: 10px; cursor: pointer; background: #fff; }
.urg input { margin-top: 3px; accent-color: var(--brand); }
.urg b { display: block; font-size: 13.5px; }
.urg span { font-size: 12.5px; color: var(--text-2); }
.urg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.dropzone { border: 1.5px dashed var(--border-table); border-radius: 12px; padding: 16px; text-align: center; font-size: 13px; color: var(--text-2); background: #FCFCFD; cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { display: none; }
.dropzone b { color: var(--brand-text); }
.dropzone-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.dropzone-files:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pt-thread { display: flex; flex-direction: column; gap: 16px; }
.pt-msg { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; scroll-margin-top: 90px; }
.pt-msg .bubble { background: #fff; border: 1px solid var(--border-card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--hd-shadow); min-width: 0; }
.pt-msg.is-team .bubble { background: #F8FAFF; border-color: #DCE3F5; }
.pt-msg .who-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.pt-msg .who-line b { font-size: 14px; }
.pt-msg .who-line span { color: var(--text-2); }
.pt-msg .who-line time { margin-left: auto; color: var(--muted); font-size: 12px; }
.pt-msg .body { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.pt-msg .body .rich-text p { margin: 0 0 10px; }
.pt-msg .body .rich-text p:last-child { margin: 0; }
.pt-msg .body .rich-text ul, .pt-msg .body .rich-text ol { margin: 0 0 10px 20px; }
.pt-reply textarea.input { min-height: 130px; font-size: 14.5px; line-height: 1.55; }
.pt-side { display: flex; flex-direction: column; gap: 14px; }
.pt-steps { display: flex; flex-direction: column; gap: 0; }
.pt-steps li { list-style: none; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; position: relative; font-size: 13px; color: var(--muted); }
.pt-steps li::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--hd-line); }
.pt-steps li:last-child::before { display: none; }
.pt-steps li i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CBD5E1; background: #fff; display: grid; place-items: center; }
.pt-steps li.is-done { color: var(--text); }
.pt-steps li.is-done i { background: #16A34A; border-color: #16A34A; color: #fff; }
.pt-steps li.is-done i .icon { width: 12px; height: 12px; }
.pt-steps li.is-now { color: var(--text); font-weight: 600; }
.pt-steps li.is-now i { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pt-steps.is-numbered li { color: var(--text); }
.pt-steps.is-numbered li i { background: var(--hd-ink); border-color: var(--hd-ink); color: #fff; font: 700 11px/1 var(--font-sans); font-style: normal; }
.pt-callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 13.5px; }
.pt-callout .icon { flex: none; margin-top: 1px; }
.pt-callout.is-wait { background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.pt-callout.is-done { background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D; }
.pt-callout.is-info { background: #EFF6FF; border: 1px solid #DBEAFE; color: #1E3A8A; }
.pt-callout b { display: block; }
.pt-auth { max-width: 440px; margin: 48px auto 0; }
.code-input { font: 700 28px var(--font-mono); letter-spacing: .5em; text-align: center; height: 60px; padding-left: .5em; }
.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.face { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border: 1px solid var(--border-table); border-radius: 14px; cursor: pointer; background: #fff; font-weight: 600; font-size: 14px; }
.face input { position: absolute; opacity: 0; pointer-events: none; }
.face .icon { width: 34px; height: 34px; }
.face.f3 .icon { color: #16A34A; } .face.f2 .icon { color: #CA8A04; } .face.f1 .icon { color: #DC2626; }
.face:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.face:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-success { text-align: center; padding: 34px 26px; }
.pt-success .big { width: 64px; height: 64px; border-radius: 50%; background: #DCFCE7; color: #16A34A; display: grid; place-items: center; margin: 0 auto 14px; }
.pt-success .big .icon { width: 32px; height: 32px; }
.pt-success h1 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.pt-success .ref { display: inline-block; margin-top: 10px; font: 700 15px var(--font-mono); background: var(--bg); border: 1px solid var(--border-card); padding: 6px 12px; border-radius: 8px; }
.pt-foot { border-top: 1px solid var(--border-card); background: #fff; padding: 20px 0; font-size: 12.5px; color: var(--muted); }
.pt-foot .pt-wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pt-foot a { color: var(--text-2); }
.pt-flash { max-width: 1080px; margin: 16px auto 0; padding: 0 20px; }
@media (max-width: 900px) {
  .pt-grid-2 { grid-template-columns: 1fr; }
  .pt-hero h1 { font-size: 28px; }
  .urg { grid-template-columns: 1fr; }
  .pt-nav .hide-sm { display: none; }
  .pt-brand .divider, .pt-brand .support { display: none; }
}
@media print {
  .sidebar, .topbar, .composer, .tk-side, .views, .filters, .bulkbar { display: none !important; }
  .tk-layout, .inbox { display: block; }
}

/* Platform modals with a form inside: the form takes no box of its own. */
.modal > form { display: contents; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.dropzone .icon, .tk-meta .icon, .hd-muted .icon { display: inline-block; vertical-align: -3px; }

/* Rows stay two lines: the detail line fades out rather than wrapping. */
.tk-line2 { flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
.tk-line2 > * { flex: none; }
.filters select.input { max-width: 168px; }
.filters .search { flex: 1 1 220px; max-width: 320px; }
.cust-head > .pa { display: inline-grid; }

/* Flash messages, chart legend and tooltip: the platform leaves these to each
   app's sheet (HRMS and Projects ship the same rules). */
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px; border: 1px solid;
  font-size: 14px; line-height: 1.5; box-shadow: var(--hd-shadow);
}
.flash-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.flash span { flex: 1; }
.flash-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.flash-error   { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.flash-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.flash-info    { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; }
.pt-flash .flash-stack { margin: 0 0 4px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-2, #4b5563); list-style: none; padding: 0; }
.chart-legend button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; color: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; font-size: 12.5px; }
.chart-legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; list-style: none; padding: 0; }
.donut-legend li, .donut-legend a { display: flex; align-items: center; gap: 8px; color: inherit; }
.chart-tip { position: fixed; z-index: 120; pointer-events: none; background: #111827; color: #fff; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-pop); max-width: 280px; }
.chart-tip b { display: block; margin-bottom: 4px; font-weight: 600; color: #fff; }
.chart-tip .row { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip .row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #cbd5e1; }
.chart-tip .num { font-variant-numeric: tabular-nums; }
.field + .field { margin-top: 0; }
.hd-stack > .field + .field, .side-body > .field + .field { margin-top: 0; }
.team-people .person-chip { color: var(--text); font-weight: 500; }
.team-people .person-chip.is-lead { font-weight: 600; }
.team-section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 10px 2px 0; display: flex; align-items: center; gap: 8px; }
.team-section-title span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.rep-compact .hd-table th, .rep-compact .hd-table td { padding-left: 12px; padding-right: 12px; }
.rich-text ul { list-style: disc; padding-left: 22px; }
.rich-text ol { list-style: decimal; padding-left: 22px; }
.rich-text li { margin: 2px 0; }
@media (max-width: 760px) {
  .availability-btn span, .topbar-new span { display: none; }
  .topbar-new { padding: 0 10px; }
  .orgswitch span { display: none; }
}
