:root {
  --bg: #f4f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #5b6671;
  --line: #d8e0e6;
  --accent: #0078d4;
  --accent-dark: #005a9e;
  --good: #1f7a3f;
  --warn: #a15c00;
  --bad: #b3261e;
  --muted-bg: #eef3f7;
  --dashboard-width: min(1500px, calc(100vw - 96px));
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

body.auth-mode {
  background:
    radial-gradient(circle at 8% 12%, rgba(0, 120, 212, 0.16), transparent 28%),
    radial-gradient(circle at 90% 8%, rgba(31, 122, 63, 0.13), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #edf4f8 100%);
}

.shell {
  width: var(--dashboard-width);
  margin: 16px auto;
}

.topbar {
  width: var(--dashboard-width);
  min-height: 146px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
    var(--panel);
  border: 1px solid #d7e3ec;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(20, 39, 61, 0.08);
}

body.auth-mode .topbar {
  display: none;
}

.brand-lockup {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.brand-logo {
  width: 154px;
  height: auto;
  display: block;
  margin-top: 18px;
}

.brand-mark-divider {
  width: 1px;
  height: 44px;
  margin-top: 18px;
  background: linear-gradient(180deg, transparent, #cbd9e2, transparent);
}

.brand-copy {
  min-width: 0;
  padding-top: 10px;
}

h1 {
  margin: 0 0 4px;
  color: #0c1725;
  font-size: 21px;
  font-weight: 800;
  font-family: Ubuntu, "Open Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px 124px 148px 110px;
  grid-template-areas:
    "tabs tabs tabs tabs tabs"
    ". scan status user logout"
    "version version version version version";
  align-items: center;
  gap: 10px;
  justify-content: stretch;
  min-width: 0;
}

.tabs {
  grid-area: tabs;
  justify-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #eef4f8;
  border: 1px solid #d8e3ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tabs[hidden] {
  display: none;
}

button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { opacity: .65; cursor: wait; }

.secondary-button {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}

.topbar .secondary-button {
  height: 38px;
  border-radius: 999px;
  border-color: #d5e0e8;
  background: #fff;
  color: #536170;
  padding: 0 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.secondary-button:hover {
  background: var(--muted-bg);
  color: var(--ink);
}

input,
select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid #9fc9ef;
  outline-offset: 2px;
}

.tabs button.tab {
  height: 38px;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #556371;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tabs button.tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.tabs button.tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow:
    0 12px 26px rgba(31, 52, 78, 0.08),
    0 1px 2px rgba(16, 24, 40, 0.08);
}

#scanNow {
  grid-area: scan;
  justify-self: stretch;
  width: 100%;
  min-width: 250px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  white-space: nowrap;
  background: linear-gradient(135deg, #0678d8, #0b6e61);
  box-shadow: 0 10px 18px rgba(0, 120, 212, 0.18);
}

#scanNow:hover {
  background: linear-gradient(135deg, #006cc1, #095f54);
}

.pill {
  min-width: 0;
  width: 100%;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #eef3f7;
  color: var(--muted);
  font-weight: 650;
}

.pill.ok { background: #e7f5eb; border-color: #b8dec4; color: var(--good); }
.pill.scanning { background: #eef6ff; border-color: #b8d8f4; color: var(--accent-dark); }
.pill.error { background: #fdebea; border-color: #f3bbb7; color: var(--bad); }

.pill.user-pill {
  min-width: 0;
  padding: 0 16px;
  background: #eef4f8;
  color: #566474;
  border-color: #d7e2eb;
}

#statusPill {
  grid-area: status;
}

#userPill {
  grid-area: user;
}

#logoutButton {
  grid-area: logout;
  justify-self: stretch;
  width: 100%;
}

.auth-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100vh - 180px);
  margin: 24px auto 40px;
  display: grid;
  align-items: center;
}

.auth-card {
  border: 0;
  background: transparent;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 430px);
  gap: 18px;
  align-items: stretch;
}

.auth-hero,
.auth-panel {
  border: 1px solid rgba(216, 224, 230, 0.85);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(18, 35, 55, 0.11);
}

.auth-hero {
  position: relative;
  min-height: 520px;
  padding: 44px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(81, 207, 166, 0.32), transparent 28%),
    radial-gradient(circle at 18% 86%, rgba(57, 143, 235, 0.38), transparent 30%),
    linear-gradient(135deg, #081323 0%, #0c2d45 46%, #0d4a43 100%);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: auto -70px -120px auto;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.4), transparent 65%);
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-eyebrow,
.auth-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-eyebrow {
  padding: 7px 12px;
  color: #c8f6e2;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-hero h2,
.auth-panel h2 {
  font-family: Ubuntu, "Open Sans", "Segoe UI", Arial, sans-serif;
}

.auth-hero h2 {
  max-width: 720px;
  margin: 28px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.auth-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.auth-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.auth-proof-grid div {
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.auth-proof-grid span {
  display: block;
  color: #9fe8cf;
  font-size: 12px;
  font-weight: 800;
}

.auth-proof-grid strong,
.auth-proof-grid small {
  display: block;
}

.auth-proof-grid strong {
  margin-top: 18px;
  font-size: 16px;
}

.auth-proof-grid small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.auth-hero-footer {
  position: absolute;
  left: 44px;
  bottom: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.auth-hero-footer span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5ee1a8;
  box-shadow: 0 0 0 7px rgba(94, 225, 168, 0.14);
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 38px;
  background: rgba(255, 255, 255, 0.94);
}

.auth-panel-head {
  margin-bottom: 8px;
}

.auth-kicker {
  color: #0d695a;
}

.auth-panel h2 {
  margin: 14px 0 8px;
  color: #182234;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.auth-panel p {
  line-height: 1.6;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: #405064;
  font-weight: 800;
}

.auth-card input {
  height: 50px;
  border-radius: 14px;
  border-color: #cfdce6;
  background: #f8fbfd;
  font-size: 16px;
}

.auth-card input:focus {
  border-color: #3c8fda;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.12);
}

.auth-submit {
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0078d4, #0b6e61);
  box-shadow: 0 15px 28px rgba(0, 120, 212, 0.2);
  font-size: 16px;
}

.auth-submit:hover {
  background: linear-gradient(135deg, #006cbe, #095d52);
}

.auth-security-note {
  padding: 14px 16px;
  border: 1px solid #d8e8f2;
  border-radius: 16px;
  background: #f4f9fc;
  color: #526273;
  line-height: 1.5;
  text-align: center;
}

.app-version {
  grid-area: version;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
  justify-self: end;
}

.tab-panel[hidden] {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.metric {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.progress-wrap {
  margin-bottom: 12px;
}

.controls {
  display: grid;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #e2e8ee;
  border-radius: 999px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s ease;
}

.daily-time-card {
  margin-bottom: 12px;
  padding: 14px 16px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-title-inline {
  color: #2d3741;
  font-weight: 700;
}

.chart-head p {
  margin-top: 4px;
}

.chart-total {
  min-width: 140px;
  text-align: right;
}

.chart-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.chart-total strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.daily-chart {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  min-height: 300px;
}

.daily-axis,
.daily-plot {
  position: relative;
  height: 300px;
  transition: height .25s ease;
}

.daily-axis {
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.axis-tick {
  position: absolute;
  right: 10px;
  transform: translateY(50%);
  white-space: nowrap;
}

.daily-plot {
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 12px;
}

.daily-grid {
  position: absolute;
  inset: 0 12px 0 12px;
  pointer-events: none;
}

.grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--line);
}

.daily-bars {
  position: relative;
  z-index: 1;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 34px;
  padding: 0 24px 0;
}

.daily-person {
  position: relative;
  flex: 0 0 150px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}

.daily-stack {
  position: relative;
  height: calc(100% - 44px);
  border-bottom: 1px solid var(--line);
}

.bar-total {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  min-width: 46px;
  margin: 0 auto;
  padding: 1px 5px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transform: translateY(-18px);
  pointer-events: none;
}

.bar-fill {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  top: 0;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 1px 5px;
  color: #13202c;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 650;
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.owner-label {
  min-height: 38px;
  padding-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ink);
}

.chart-empty {
  width: 100%;
  align-self: center;
}

.error {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f3bbb7;
  background: #fdebea;
  color: var(--bad);
  border-radius: 6px;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}

.section-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: #2d3741;
  font-weight: 700;
}

.section-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.section-note.configured {
  color: var(--good);
}

.section-note.not-configured,
.section-note.failed {
  color: var(--bad);
}

.no-timer-wrap .section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.customer-replies-wrap .section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.no-timer-wrap .section-note {
  text-align: right;
}

.customer-replies-wrap .section-note {
  text-align: right;
}

.insightful-status,
.insightful-productivity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.insightful-status.status-active,
.insightful-productivity.productivity-good {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

.insightful-status.status-idle,
.insightful-status.status-inactive {
  color: var(--warn);
  background: #fff4de;
  border: 1px solid #ffd79b;
}

.insightful-status.status-offline,
.insightful-status.status-unknown,
.insightful-productivity.productivity-neutral,
.insightful-productivity.productivity-unknown {
  color: var(--muted);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.insightful-productivity.productivity-bad {
  color: var(--bad);
  background: #fdebea;
  border: 1px solid #f3bbb7;
}

.no-timer-name {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff4de;
  border: 1px solid #ffd79b;
  color: var(--warn);
  font-weight: 750;
}

.active-no-timer-name {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e7f5eb;
  border: 1px solid #b8dec4;
  color: var(--good);
  font-weight: 800;
}

.absence-name {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #b8d8f4;
  color: var(--accent-dark);
  font-weight: 750;
}

.break-status,
.absence-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.break-lunch,
.break-break {
  color: #6f3d00;
  background: #fff1c2;
  border: 1px solid #f0bd58;
  animation: activeBreakAmberPulse 2.8s ease-in-out infinite;
}

.break-lunch-ended,
.break-break-ended {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

.break-back {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

.break-none,
.break-unknown {
  color: var(--muted);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.absence-active {
  color: var(--accent-dark);
  background: #eef6ff;
  border: 1px solid #b8d8f4;
}

.absence-scheduled {
  color: var(--accent-dark);
  background: #f7fbff;
  border: 1px solid #b8d8f4;
}

.absence-ended {
  color: var(--muted);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.availability-onsite {
  color: #175e42;
  background: #e7f8ef;
  border: 1px solid #93d7b4;
}

.planned-absence-row td {
  background: #f7fbff;
}

.active-without-timer-row td {
  background: #edfdf3;
  box-shadow: inset 0 1px 0 rgba(31, 122, 63, 0.25), inset 0 -1px 0 rgba(31, 122, 63, 0.25);
}

.active-without-timer-row .active-no-timer-name {
  animation: activeNoTimerPulse 1.25s ease-in-out infinite;
}

.insightful-live-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 360px;
  min-width: 86px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.insightful-live-note.active-without-timer-badge {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

.insightful-live-note.status-active {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

.insightful-live-note.status-idle,
.insightful-live-note.status-inactive {
  color: var(--warn);
  background: #fff4de;
  border: 1px solid #ffd79b;
}

.insightful-live-note.status-offline,
.insightful-live-note.status-unknown {
  color: var(--muted);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.insightful-live-note.status-active.active-without-timer-badge {
  color: var(--good);
  background: #e7f5eb;
  border: 1px solid #b8dec4;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfc;
  color: #2d3741;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.active-timers-table td:nth-child(4) {
  min-width: 300px;
  white-space: normal;
}

.active-timers-table td:nth-child(8),
.active-timers-table td:nth-child(9) {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.active-timers-table th:nth-child(10),
.active-timers-table td:nth-child(10) {
  width: 240px;
  max-width: 240px;
}

.customer-replies-table {
  table-layout: fixed;
}

.customer-replies-table th:nth-child(1),
.customer-replies-table td:nth-child(1) {
  width: 58px;
  text-align: center;
}

.customer-replies-table th:nth-child(2),
.customer-replies-table td:nth-child(2) {
  width: 105px;
}

.customer-replies-table th:nth-child(3),
.customer-replies-table td:nth-child(3) {
  width: 90px;
}

.customer-replies-table th:nth-child(4),
.customer-replies-table td:nth-child(4) {
  width: 30%;
}

.customer-replies-table th:nth-child(7),
.customer-replies-table td:nth-child(7) {
  width: 150px;
  max-width: 150px;
}

.customer-replies-table th:nth-child(8),
.customer-replies-table td:nth-child(8) {
  width: 145px;
}

.customer-replies-table th:nth-child(9),
.customer-replies-table td:nth-child(9) {
  width: 92px;
}

.customer-replies-table th:nth-child(10),
.customer-replies-table td:nth-child(10) {
  width: 150px;
}

.customer-replies-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-reply-age {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
  color: var(--ink);
}

.customer-reply-subject strong,
.customer-reply-subject span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-reply-subject span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.reply-envelope {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 17px;
  border-radius: 4px;
  background: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.reply-envelope::before,
.reply-envelope::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.95);
}

.reply-envelope::before {
  transform: skewY(-35deg);
  transform-origin: left bottom;
}

.reply-envelope::after {
  transform: skewY(35deg);
  transform-origin: right bottom;
}

.sla-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  max-width: 100%;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sla-warning-badge.sla-red {
  color: var(--bad);
  background: #fdebea;
  border: 1px solid #f3bbb7;
}

.sla-warning-badge.sla-amber {
  color: var(--warn);
  background: #fff4de;
  border: 1px solid #ffd79b;
}

.sla-warning-badge.sla-none {
  color: var(--muted);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.customer-reply-sla-amber td {
  animation: customerReplyAmberPulse 1.4s ease-in-out infinite;
}

.customer-reply-sla-red td {
  animation: customerReplyRedPulse 1s ease-in-out infinite;
}

.timer-cost {
  color: var(--good);
}

.comment-preview {
  display: block;
  width: 100%;
  height: auto;
  max-width: 240px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-preview:hover {
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
}

.comment-empty {
  color: var(--muted);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.48);
}

.modal-card {
  width: min(720px, calc(100vw - 48px));
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.24);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-head p {
  margin-top: 4px;
  font-size: 12px;
}

.modal-close {
  flex: 0 0 auto;
}

.modal-body {
  padding: 18px;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
}

.support-timer-warning {
  color: #6f3d00;
  background: #fff1c2;
  animation: supportTimerAmberPulse 1s ease-in-out infinite;
}

.lunch-break-timer-warning-row td {
  background: #fff1c2;
  animation: supportTimerAmberPulse 1s ease-in-out infinite;
}

.planned-absence-timer-warning-row td {
  background: #fdebea;
  animation: absenceTimerPulse 1s ease-in-out infinite;
}

@keyframes supportTimerAmberPulse {
  0%, 100% {
    background: #fff1c2;
    box-shadow: inset 0 0 0 1px rgba(184, 111, 0, 0.18);
  }

  50% {
    background: #f6b73c;
    box-shadow: inset 0 0 0 2px rgba(111, 61, 0, 0.34);
  }
}

@keyframes activeBreakAmberPulse {
  0%, 100% {
    background: #fff1c2;
    box-shadow: 0 0 0 0 rgba(240, 189, 88, 0.28);
    opacity: 1;
  }

  50% {
    background: #ffd46f;
    box-shadow: 0 0 0 5px rgba(240, 189, 88, 0);
    opacity: 0.74;
  }
}

.owner-overlap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fdebea;
  color: var(--bad);
  font-weight: 750;
  animation: overlapPulse 1s ease-in-out infinite;
}

.owner-lunch-overdue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fdebea;
  color: var(--bad);
  font-weight: 750;
  animation: lunchOverduePulse .85s ease-in-out infinite;
}

.owner-planned-absence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fdebea;
  color: var(--bad);
  font-weight: 750;
  animation: lunchOverduePulse .85s ease-in-out infinite;
}

.owner-overlap.owner-lunch-overdue,
.owner-overlap.owner-planned-absence {
  background: #f8d7d5;
  color: #8f1f18;
}

.timer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

@keyframes overlapPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.32);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 0 5px rgba(179, 38, 30, 0);
    opacity: 0.62;
  }
}

@keyframes lunchOverduePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.36);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 0 6px rgba(179, 38, 30, 0);
    opacity: 0.54;
  }
}

@keyframes absenceTimerPulse {
  0%, 100% {
    background: #fdebea;
    box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.16);
  }

  50% {
    background: #f9c7c2;
    box-shadow: inset 0 0 0 2px rgba(179, 38, 30, 0.28);
  }
}

@keyframes customerReplyAmberPulse {
  0%, 100% {
    background: #fffaf0;
    box-shadow: inset 0 0 0 1px rgba(184, 111, 0, 0.14);
  }

  50% {
    background: #ffe1a3;
    box-shadow: inset 0 0 0 2px rgba(184, 111, 0, 0.28);
  }
}

@keyframes customerReplyRedPulse {
  0%, 100% {
    background: #fff2f0;
    box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.16);
  }

  50% {
    background: #f9c7c2;
    box-shadow: inset 0 0 0 2px rgba(179, 38, 30, 0.3);
  }
}

@keyframes activeNoTimerPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(31, 122, 63, 0.28);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 0 5px rgba(31, 122, 63, 0);
    opacity: 0.72;
  }
}

tr:last-child td { border-bottom: 0; }

.empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.sentiment-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sentiment-meta strong {
  display: block;
  font-size: 15px;
}

.sentiment-meta p {
  margin-top: 6px;
}

.sentiment-progress {
  margin: 2px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sentiment-progress[hidden] {
  display: none;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-row span {
  color: var(--muted);
  font-weight: 700;
}

.sentiment-progress p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sentiment-progress .progress-bar.complete {
  background: var(--good);
}

.sentiment-progress .progress-bar.error {
  background: var(--bad);
}

.sentiment-controls {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.sentiment-controls input {
  min-width: 0;
}

.resource-cost-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-cost-controls {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.resource-cost-controls input {
  min-width: 0;
}

.resource-cost-trend-card {
  margin: 2px 0 12px;
  padding: 14px 16px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trend-range-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.trend-range {
  height: 30px;
  padding: 0 10px;
  border-color: var(--line);
  background: #eef3f7;
  color: var(--muted);
}

.trend-range:hover {
  background: #e1edf7;
  color: var(--ink);
}

.trend-range.active {
  border-color: var(--accent-dark);
  background: var(--accent);
  color: #fff;
}

.trend-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.trend-summary div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.trend-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.trend-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.resource-trend-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resource-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.resource-trend-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.legend-radium,
.trend-radium {
  background: #2f80ed;
}

.legend-customers,
.trend-customers {
  background: #27ae60;
}

.resource-trend-chart {
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  overflow-x: auto;
  padding: 28px 6px 8px;
  border-top: 1px dashed var(--line);
}

.trend-point {
  flex: 0 0 132px;
  height: 260px;
  display: grid;
  grid-template-rows: 24px 1fr 34px;
  align-items: end;
  justify-items: center;
}

.trend-total {
  align-self: center;
  min-width: 72px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.trend-bar {
  width: 72px;
  min-height: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  background: #eef3f7;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 42, 0.08);
}

.trend-segment {
  width: 100%;
  min-height: 2px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(11, 18, 32, 0.4);
}

.trend-segment span {
  pointer-events: none;
}

.trend-segment-tight {
  font-size: 9px;
}

.trend-label {
  align-self: start;
  max-width: 126px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: normal;
}

.resource-cost-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.embedded-report-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.resource-cost-meta strong {
  display: block;
  font-size: 15px;
}

.embedded-report-meta strong {
  display: block;
  font-size: 15px;
}

.resource-cost-meta p {
  margin-top: 6px;
}

.billable-change-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.billable-change-meta strong {
  display: block;
  font-size: 15px;
}

.billable-change-meta p {
  margin-top: 6px;
}

.billable-view-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eaf0f5;
}

.billable-view {
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.billable-view:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.billable-view.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.billable-view span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: #d7e2ec;
  color: var(--muted);
  font-size: 12px;
}

.billable-view.active span {
  background: #e7f5eb;
  color: var(--good);
}

.billable-change-table table {
  table-layout: fixed;
  width: 100%;
}

.billable-change-table th:nth-child(1),
.billable-change-table td:nth-child(1) {
  width: 12%;
}

.billable-change-table th:nth-child(2),
.billable-change-table td:nth-child(2) {
  width: 34%;
}

.billable-change-table th:nth-child(3),
.billable-change-table td:nth-child(3) {
  width: 20%;
}

.billable-change-table th:nth-child(4),
.billable-change-table td:nth-child(4) {
  width: 11%;
}

.billable-change-table th:nth-child(5),
.billable-change-table td:nth-child(5) {
  width: 12%;
}

.billable-change-table th:nth-child(6),
.billable-change-table td:nth-child(6) {
  width: 11%;
}

.billable-change-table .truncate {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billable-request-cell,
.billable-work-cell,
.billable-treatment-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.billable-request-cell strong,
.billable-work-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billable-request-cell span,
.billable-work-cell span,
.billable-treatment-cell > span:first-child {
  color: var(--muted);
  font-size: 14px;
}

.billable-treatment-cell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.billable-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 5px 8px;
  border: 1px solid #f2b8b5;
  border-radius: 999px;
  background: #fff1f0;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.billable-learning {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
}

.billable-learning.decided {
  color: #245b36;
}

.billable-actions {
  display: grid;
  gap: 5px;
  align-items: stretch;
}

.billable-actions .mini-action {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.billable-actions .mini-action.accept {
  border-color: #b7dfc4;
  color: #1f6f3a;
}

.billable-actions .mini-action.reject {
  border-color: #ffd6a6;
  color: #9a5b00;
}

.billable-actions .mini-action.active {
  background: #eaf8ee;
  box-shadow: inset 0 0 0 1px currentColor;
  cursor: default;
  opacity: 1;
}

.billable-actions .mini-action.reject.active {
  background: #fff6e8;
}

.embedded-report-meta p {
  margin-top: 6px;
}

.report-frame {
  width: 100%;
  min-height: 820px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.report-link:hover {
  background: var(--accent-dark);
}

#resourceCostPanel .cost-status {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  text-transform: capitalize;
}

#resourceCostPanel .cost-complete { color: var(--good); background: #e7f5eb; border: 1px solid #b8dec4; }
#resourceCostPanel .cost-partial { color: var(--warn); background: #fff4de; border: 1px solid #ffd79b; }
#resourceCostPanel .cost-missing { color: var(--bad); background: #fdebea; border: 1px solid #f3bbb7; }
#resourceCostPanel .cost-fallback { color: var(--accent-dark); background: #eef6ff; border: 1px solid #b8d8f4; }

#resourceCostPanel .resource-people {
  min-width: 360px;
  white-space: normal;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.sentiment-metrics .critical strong { color: var(--bad); }
.sentiment-metrics .high strong { color: var(--warn); }
.sentiment-metrics .new strong { color: var(--accent); }

.tab-panel .table-wrap {
  margin-bottom: 12px;
}

#sentimentPanel .evidence {
  max-width: 560px;
  line-height: 1.42;
  white-space: normal;
}

#sentimentPanel .action {
  margin-top: 8px;
  color: var(--good);
  background: #edfdf3;
  border: 1px solid #c6f3d2;
  border-radius: 6px;
  padding: 7px 9px;
}

#sentimentPanel .sev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  text-transform: capitalize;
}

#sentimentPanel .sev-critical { color: var(--bad); background: #fdebea; border: 1px solid #f3bbb7; }
#sentimentPanel .sev-high { color: var(--warn); background: #fff4de; border: 1px solid #ffd79b; }
#sentimentPanel .sev-medium { color: var(--accent); background: #eef6ff; border: 1px solid #b8d8f4; }
#sentimentPanel .source,
#sentimentPanel .subject {
  font-weight: 700;
}

#sentimentPanel .table-wrap {
  overflow-x: hidden;
}

#sentimentPanel table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

#sentimentPanel th,
#sentimentPanel td {
  height: 58px;
  overflow: hidden;
  vertical-align: middle;
}

#sentimentPanel th {
  height: 40px;
  overflow: visible;
  white-space: nowrap;
}

#sentimentPanel th:nth-child(1),
#sentimentPanel td:nth-child(1) {
  width: 8%;
}

#sentimentPanel th:nth-child(2),
#sentimentPanel td:nth-child(2) {
  width: 15%;
}

#sentimentPanel th:nth-child(3),
#sentimentPanel td:nth-child(3) {
  width: 25%;
}

#sentimentPanel th:nth-child(4),
#sentimentPanel td:nth-child(4) {
  width: 17%;
}

#sentimentPanel th:nth-child(5),
#sentimentPanel td:nth-child(5) {
  width: 22%;
}

#sentimentPanel th:nth-child(6),
#sentimentPanel td:nth-child(6) {
  width: 13%;
  text-align: right;
}

#sentimentPanel .sentiment-concern-row {
  cursor: pointer;
}

#sentimentPanel .sentiment-concern-row:hover td {
  background: #f7fbff;
}

#sentimentPanel .truncate {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sentimentPanel td:nth-child(1) .sev {
  max-width: 100%;
}

#sentimentPanel .sentiment-context {
  color: var(--muted);
}

#sentimentPanel .sentiment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

#sentimentPanel .sentiment-close,
#sentimentPanel .sentiment-irrelevant {
  width: 74px;
  height: 30px;
  padding: 0 7px;
  border-color: var(--line);
  white-space: nowrap;
  font-size: 12px;
}

#sentimentPanel .sentiment-close {
  border-color: #b8dec4;
  background: #e7f5eb;
  color: var(--good);
}

#sentimentPanel .sentiment-close:hover {
  border-color: var(--good);
  background: #d8f0df;
  color: var(--good);
}

#sentimentPanel .sentiment-irrelevant {
  background: #eef3f7;
  color: var(--muted);
}

#sentimentPanel .sentiment-irrelevant:hover {
  border-color: var(--warn);
  background: #fff4de;
  color: var(--warn);
}

#sentimentPanel .sentiment-close:disabled,
#sentimentPanel .sentiment-irrelevant:disabled {
  opacity: .7;
}

.sentiment-modal-card {
  width: min(820px, calc(100vw - 48px));
}

.sentiment-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sentiment-modal-grid div {
  padding: 10px 12px;
  background: #f9fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sentiment-modal-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.sentiment-modal-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.modal-body h3 {
  margin: 16px 0 6px;
  font-size: 14px;
}

.modal-body p {
  color: var(--ink);
  white-space: pre-wrap;
}

.sentiment-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sentiment-modal-actions .sentiment-close,
.sentiment-modal-actions .sentiment-irrelevant {
  width: auto;
  min-width: 150px;
}

@media (max-width: 1500px) {
  :root {
    --dashboard-width: min(1360px, calc(100vw - 72px));
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: minmax(0, 1fr) 250px 124px 148px 104px;
  }
}

@media (max-width: 860px) {
  :root {
    --dashboard-width: min(100%, calc(100vw - 32px));
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
    border-radius: 18px;
  }
  .brand-lockup {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .brand-logo {
    width: 138px;
  }
  .brand-mark-divider {
    display: none;
  }
  .topbar, .actions { align-items: flex-start; }
  .actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "tabs tabs"
      "scan scan"
      "status user"
      "logout logout"
      "version version";
  }
  .auth-shell {
    min-height: auto;
    margin-top: 16px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    min-height: 430px;
    padding: 30px;
  }
  .auth-panel {
    padding: 28px;
  }
  .auth-proof-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .auth-proof-grid div {
    min-height: auto;
  }
  .auth-hero-footer {
    position: static;
    margin-top: 28px;
  }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .tabs button.tab {
    flex: 0 0 auto;
  }
  .actions { width: 100%; justify-content: flex-start; }
  .app-version {
    text-align: left;
  }
  .sentiment-controls { grid-template-columns: 1fr 1fr; }
  .resource-cost-controls { grid-template-columns: 1fr 1fr; }
  .sentiment-controls input { grid-column: 1 / -1; }
  .resource-cost-controls input { grid-column: 1 / -1; }
  .sentiment-meta { align-items: flex-start; flex-direction: column; }
  .resource-cost-meta { align-items: flex-start; flex-direction: column; }
  .embedded-report-meta { align-items: flex-start; flex-direction: column; }
  .resource-cost-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-head { flex-direction: column; }
  .chart-total { text-align: left; }
  .daily-chart { grid-template-columns: 46px minmax(0, 1fr); }
  .daily-bars { gap: 18px; }
  .daily-person { flex-basis: 96px; }
  .bar-fill { left: 12px; right: 12px; }
}
