/* Procarma brand: sky blue + gold */
:root,
html[data-theme="light"] {
  --pc-blue: #1e9fe8;
  --pc-blue-bright: #3bb4f5;
  --pc-blue-deep: #0a4a8a;
  --pc-gold: #f5c518;
  --pc-gold-deep: #d4a800;
  --rail: #0a4a8a;
  --rail-hover: #0c5aa8;
  --rail-active: #1e9fe8;
  --rail-text: #e8f6ff;
  --rail-muted: #9ec9ea;
  --bg: #f0f7fc;
  --panel: #ffffff;
  --card: #ffffff;
  --border: rgba(30, 159, 232, 0.22);
  --text: #0b1220;
  --muted: #5a7188;
  --danger: #e04555;
  --ok: #1b9e57;
  --shadow: 0 1px 2px rgba(10, 74, 138, 0.06), 0 10px 28px rgba(10, 74, 138, 0.08);
  --accent-soft: rgba(245, 197, 24, 0.16);
  --blue-soft: rgba(30, 159, 232, 0.12);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #ffffff;
}

html[data-theme="dark"] {
  --pc-blue: #1e9fe8;
  --pc-blue-bright: #3bb4f5;
  --pc-blue-deep: #0a4a8a;
  --pc-gold: #f5c518;
  --pc-gold-deep: #d4a800;
  --rail: #07101c;
  --rail-hover: #121c2c;
  --rail-active: #0a4a8a;
  --rail-text: #e8f6ff;
  --rail-muted: #7ea4c4;
  --bg: #0b1220;
  --panel: #121a2b;
  --card: #182236;
  --border: rgba(62, 120, 180, 0.28);
  --text: #f2f6fb;
  --muted: #93a4bd;
  --danger: #ff5a6a;
  --ok: #2ecc71;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --accent-soft: rgba(245, 197, 24, 0.12);
  --blue-soft: rgba(30, 159, 232, 0.14);
  --topbar-bg: rgba(18, 26, 43, 0.94);
  --input-bg: #182236;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

a { color: var(--pc-blue-bright); text-decoration: none; }
a:hover { color: var(--pc-gold); }

/* —— Workspace shell —— */
body.workspace {
  display: flex;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--accent-soft), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 100%, var(--blue-soft), transparent 55%),
    var(--bg);
}

.rail {
  width: 240px;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, var(--pc-blue-deep) 0%, #072f58 55%, #061f3a 100%);
  color: var(--rail-text);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 2px solid rgba(245, 197, 24, 0.35);
}

html[data-theme="dark"] .rail {
  background: linear-gradient(180deg, #07101c 0%, #0a1a2e 60%, #061018 100%);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.5rem 1rem;
  color: #fff !important;
  border-bottom: 1px solid rgba(245, 197, 24, 0.25);
  margin-bottom: 0.75rem;
}
.rail-brand img { width: 36px; height: 36px; object-fit: contain; }
.rail-brand-title { font-weight: 700; font-size: 0.95rem; line-height: 1.1; }
.rail-brand-sub {
  font-size: 0.72rem;
  color: var(--pc-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.rail-section {
  margin: 0.85rem 0.5rem 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rail-muted);
  font-weight: 600;
}

.rail-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--rail-text) !important;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.rail-link:hover { background: rgba(59, 180, 245, 0.18); color: #fff !important; }
.rail-link.active {
  background: linear-gradient(90deg, rgba(30, 159, 232, 0.95), rgba(10, 74, 138, 0.9));
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--pc-gold);
}

.workspace-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.topbar-search { flex: 1; max-width: 520px; }
.topbar-actions { display: flex; align-items: center; gap: 0.65rem; }
.topbar-user { color: var(--muted); font-size: 0.875rem; }

.theme-toggle {
  width: 38px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--pc-gold-deep);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--pc-blue);
  color: var(--pc-blue);
}

.workspace-body {
  padding: 1.25rem 1.5rem 2.5rem;
  flex: 1;
}

.page-wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.hero-card, .panel, .stat-card, .ticket-card, .catalog-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.stat-card { padding: 1rem 1.1rem; }
.stat-card .label { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.stat-card .value.gold { color: var(--pc-gold-deep); }
html[data-theme="dark"] .stat-card .value.gold { color: var(--pc-gold); }
.stat-card .value.blue { color: var(--pc-blue-bright); }
.stat-card .value.danger { color: var(--danger); }

button.stat-card {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
button.stat-card:hover,
button.stat-card[aria-pressed="true"] {
  border-color: var(--pc-blue);
  box-shadow: 0 0 0 1px var(--pc-blue);
}
.stat-hint {
  margin-top: .35rem;
  font-size: .72rem;
  color: var(--muted);
}

.btn-procarma {
  background: linear-gradient(135deg, var(--pc-blue-bright), var(--pc-blue) 45%, var(--pc-blue-deep));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(30, 159, 232, 0.28);
}
.btn-procarma:hover { color: #fff; filter: brightness(1.06); }

.btn-gold {
  background: linear-gradient(135deg, #ffe066, var(--pc-gold) 40%, var(--pc-gold-deep));
  border: none;
  color: #1a1400;
  font-weight: 700;
}
.btn-gold:hover { color: #1a1400; filter: brightness(1.04); }

.btn-ghost {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--pc-gold); }
.btn-ghost.text-danger { color: var(--danger) !important; }
.btn-ghost.text-danger:hover { border-color: var(--danger); }

.table-darkish {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: var(--blue-soft);
  --bs-table-hover-bg: var(--accent-soft);
  color: var(--text);
}

.badge-sla-ok { background: rgba(27,158,87,.14); color: var(--ok); }
.badge-sla-breach { background: rgba(224,69,85,.14); color: var(--danger); }
.badge-prio-critical { background: rgba(224,69,85,.16); color: var(--danger); }
.badge-prio-high { background: var(--accent-soft); color: var(--pc-gold-deep); }
html[data-theme="dark"] .badge-prio-high { color: var(--pc-gold); }
.badge-prio-medium { background: var(--blue-soft); color: var(--pc-blue-deep); }
html[data-theme="dark"] .badge-prio-medium { color: var(--pc-blue-bright); }
.badge-prio-low { background: rgba(90,113,136,.14); color: var(--muted); }

.form-control, .form-select {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--pc-blue);
  box-shadow: 0 0 0 .2rem rgba(30,159,232,.2);
}
.form-control:read-only,
.form-control:disabled,
.form-select:disabled {
  background: var(--blue-soft);
  border-color: var(--border);
  color: var(--muted);
  opacity: 1;
}
textarea.notes-grow {
  overflow: hidden;
  resize: none;
  min-height: 6rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.notes-word-count.text-danger {
  color: var(--danger) !important;
  font-weight: 600;
}
.notes-display {
  white-space: pre-wrap;
  word-break: break-word;
}

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.filter-chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.filter-chip:hover { border-color: var(--pc-blue); color: var(--pc-blue); }
.filter-chip.active {
  background: var(--blue-soft);
  border-color: var(--pc-blue);
  color: var(--pc-blue-deep);
  box-shadow: inset 0 -2px 0 var(--pc-gold);
}
html[data-theme="dark"] .filter-chip.active { color: var(--pc-blue-bright); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.catalog-tile {
  padding: 1.4rem 1.25rem;
  transition: border-color .15s ease, transform .15s ease;
  color: inherit !important;
  display: block;
  height: 100%;
  border-top: 3px solid var(--pc-blue);
}
.catalog-tile:nth-child(2) { border-top-color: var(--pc-gold); }
.catalog-tile:nth-child(3) { border-top-color: var(--pc-blue-deep); }
.catalog-tile:hover {
  border-color: var(--pc-blue);
  transform: translateY(-2px);
  color: inherit !important;
}
.catalog-tile .tile-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-blue);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.catalog-tile:nth-child(2) .tile-kicker { color: var(--pc-gold-deep); }
html[data-theme="dark"] .catalog-tile:nth-child(2) .tile-kicker { color: var(--pc-gold); }
.catalog-tile h2 { font-size: 1.2rem; margin: 0 0 0.4rem; color: var(--text); }
.catalog-tile p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.catalog-tile-readonly {
  cursor: default;
  opacity: 0.92;
}
.catalog-tile-readonly:hover {
  transform: none;
  border-color: var(--border);
}

.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item {
  border-left: 3px solid var(--pc-blue);
  padding: 0.65rem 0 0.65rem 0.9rem;
  margin-left: 0.35rem;
}
.activity-item:nth-child(even) { border-left-color: var(--pc-gold); }
.activity-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.activity-body { white-space: pre-wrap; font-size: 0.92rem; }

.kb-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 0.65rem;
  color: inherit !important;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--pc-blue);
}
.kb-card:hover { border-color: var(--pc-gold); }
.kb-card .kb-num { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.kb-card h3 { font-size: 1.05rem; margin: 0.15rem 0; color: var(--text); }
.kb-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.dept-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .85rem;
}
.dept-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem .7rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.dept-card.winner {
  border-color: rgba(245, 197, 24, 0.7);
  box-shadow: 0 0 0 1px var(--pc-gold), var(--shadow);
}
.dept-card .days { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--pc-blue-deep); }
html[data-theme="dark"] .dept-card .days { color: var(--pc-blue-bright); }
.dept-card.winner .days { color: var(--pc-gold-deep); }
html[data-theme="dark"] .dept-card.winner .days { color: var(--pc-gold); }
.dept-card .clock {
  display: inline-block;
  margin-top: .5rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--pc-blue);
  background: var(--blue-soft);
  border: 1px solid var(--border);
}
.alert-pro {
  border-radius: 10px;
  border: 1px solid rgba(27, 158, 87, 0.35);
  background: rgba(27, 158, 87, 0.1);
  color: var(--ok);
}

.footer-note { color: var(--muted); font-size: .8rem; text-align: center; margin-top: 2rem; }
.text-secondary { color: var(--muted) !important; }

/* —— Marketing landing —— */
.mkt {
  min-height: 100vh;
  position: relative;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  background:
    linear-gradient(180deg, #061018 0%, #0a1628 50%, #0c1c32 100%);
  color: #e8eef5;
  overflow-x: hidden;
}
html[data-theme="light"] .mkt {
  background: linear-gradient(180deg, #f2f7fc 0%, #e6eef6 100%);
  color: #0b1220;
}
.mkt-net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.mkt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5vw;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(30, 159, 232, 0.12);
}
html[data-theme="light"] .mkt-nav {
  border-bottom-color: rgba(10, 74, 138, 0.1);
}
.mkt-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit !important;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.mkt-nav-brand img { width: 36px; height: 36px; object-fit: contain; }
.mkt-nav-actions { display: flex; gap: 1rem; align-items: center; }
.mkt-theme {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.55;
  cursor: pointer;
  padding: 0;
}
.mkt-theme:hover { opacity: 0.9; }

.mkt-hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 5vw 5rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.mkt-hero-inner { position: relative; z-index: 1; max-width: 640px; }
.mkt-product {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pc-gold);
}
html[data-theme="light"] .mkt-product { color: var(--pc-gold-deep); }
.mkt-brand-hero {
  margin: 0 0 1.1rem;
  line-height: 1;
  color: #1e9fe8;
}
.mkt-brand-mark {
  display: inline-block;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(3.4rem, 9vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #1e9fe8 !important;
  position: relative;
  padding-bottom: 0.12em;
}
.mkt-brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #f5c518;
}
html[data-theme="light"] .mkt-brand-hero,
html[data-theme="light"] .mkt-brand-mark {
  color: #0a4a8a !important;
}
.mkt-lead {
  font-size: 1.125rem;
  font-weight: 400;
  color: rgba(183, 198, 216, 0.95);
  max-width: 28rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}
html[data-theme="light"] .mkt-lead { color: #5a7188; }
.mkt-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.mkt .btn-procarma {
  background: #0a4a8a;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.4rem;
}
.mkt .btn-procarma:hover {
  background: #0c5aa8;
  filter: none;
  color: #fff;
}
.mkt-cta-secondary {
  color: rgba(232, 238, 245, 0.7) !important;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(232, 238, 245, 0.25);
  padding-bottom: 1px;
}
.mkt-cta-secondary:hover {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}
html[data-theme="light"] .mkt-cta-secondary {
  color: #0a4a8a !important;
  border-bottom-color: rgba(10, 74, 138, 0.3);
}
html[data-theme="light"] .mkt-cta-secondary:hover {
  border-bottom-color: #0a4a8a;
}

.mkt-section {
  position: relative;
  z-index: 1;
  padding: 3.5rem 5vw 4rem;
  border-top: 1px solid rgba(30, 159, 232, 0.12);
  background: rgba(6, 16, 24, 0.55);
  backdrop-filter: blur(6px);
}
html[data-theme="light"] .mkt-section {
  border-top-color: rgba(10, 74, 138, 0.1);
  background: rgba(242, 247, 252, 0.72);
}
.mkt-section h2 {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff;
}
html[data-theme="light"] .mkt-section h2 { color: #0b1220; }
.mkt-section .lead {
  color: rgba(147, 164, 189, 0.95);
  margin: 0 0 2.25rem;
  max-width: 34rem;
  font-size: 1rem;
}
html[data-theme="light"] .mkt-section .lead { color: #5a7188; }
.mkt-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.mkt-feature {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  border-top: 2px solid #1e9fe8;
  padding-top: 1.15rem;
}
.mkt-feature:nth-child(2) { border-top-color: #f5c518; }
.mkt-feature:nth-child(3) { border-top-color: #0a4a8a; }
html[data-theme="light"] .mkt-feature {
  border-top-width: 2px;
}
.mkt-feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  color: #fff;
}
html[data-theme="light"] .mkt-feature h3 { color: #0b1220; }
.mkt-feature p {
  margin: 0;
  color: rgba(147, 164, 189, 0.95);
  font-size: 0.92rem;
  line-height: 1.5;
}
html[data-theme="light"] .mkt-feature p { color: #5a7188; }

.mkt-footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 5vw 2.5rem;
  color: rgba(122, 140, 163, 0.9);
  font-size: 0.8rem;
  border-top: 1px solid rgba(30, 159, 232, 0.12);
}
html[data-theme="light"] .mkt-footer {
  border-top-color: rgba(10, 74, 138, 0.1);
  color: #7a8ca3;
}

.rail-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(245, 197, 24, 0.25);
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}
.rail-brand-row .rail-brand {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
  flex: 1;
}
.rail-close {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  margin-top: 0.2rem;
}
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--pc-blue);
  border-radius: 2px;
}
.rail-backdrop {
  display: none;
}
.topbar-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

/* —— Mobile / tablet —— */
@media (max-width: 992px) {
  body.workspace {
    flex-direction: column;
    overflow-x: hidden;
  }

  .nav-burger { display: inline-flex; }

  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100%;
    height: 100dvh;
    z-index: 1040;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  body.rail-open .rail { transform: translateX(0); }

  .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(6, 22, 40, 0.55);
    z-index: 1035;
    backdrop-filter: blur(2px);
  }
  .rail-backdrop[hidden] { display: none !important; }

  .rail-close { display: inline-flex; align-items: center; justify-content: center; }
  .rail-section { display: block; }

  .topbar {
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    padding-top: max(0.55rem, env(safe-area-inset-top));
  }
  .topbar-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
  .topbar-actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
  }
  .topbar-user {
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
  }
  .topbar-new { min-width: 3.25rem; }

  .workspace-body {
    padding: 0.85rem 0.75rem 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .catalog-grid,
  .mkt-features { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }

  .panel { border-radius: 10px; }
  .filter-chips { gap: 0.35rem; }
  .filter-chip { font-size: 0.78rem; padding: 0.4rem 0.7rem; }

  .table-responsive {
    margin: 0 -0.15rem;
    -webkit-overflow-scrolling: touch;
  }
  .table-darkish { font-size: 0.85rem; }
  .table-darkish th,
  .table-darkish td { white-space: nowrap; }

  .btn, .btn-sm {
    min-height: 36px;
  }
  .form-control, .form-select {
    min-height: 40px;
    font-size: 16px; /* avoid iOS zoom */
  }

  .mkt-nav {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 4vw;
  }
  .mkt-nav-actions { margin-left: auto; }
  .mkt-hero {
    min-height: auto;
    padding: 2.5rem 4vw 3.5rem;
  }
  .mkt-brand-hero { font-size: inherit; }
  .mkt-brand-mark { font-size: clamp(2.8rem, 12vw, 3.6rem); }
  .mkt-lead { font-size: 1rem; }
  .mkt-cta { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .mkt-section { padding: 2.5rem 4vw; }
  .mkt-features { gap: 1.75rem; }

  .auth-body { padding: 1.25rem 0.85rem; }
  .auth-card { padding: 1.35rem 1.1rem; }
}

@media (max-width: 576px) {
  .dept-grid { grid-template-columns: 1fr 1fr; }
  .dept-card .days { font-size: 1.85rem; }
  .stat-card .value { font-size: 1.35rem; }
  .row.g-3 > [class*="col-"] { margin-bottom: 0; }
  .topbar-logout .btn { padding-left: 0.5rem; padding-right: 0.5rem; }
  h1.h3 { font-size: 1.25rem; }
  .d-flex.gap-2.flex-wrap .btn { flex: 1 1 auto; }
}


/* Password show/hide (workspace forms) */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .form-control {
  padding-right: 4.25rem;
}
.password-toggle {
  position: absolute;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
}
.password-toggle:hover { color: var(--pc-blue); }

/* —— Days Safe: streak broken column —— */
.streak-cell { white-space: nowrap; line-height: 1.35; }

.streak-days {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pc-gold);
}

.streak-unit {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 2px;
}

.streak-clock {
  margin-left: 7px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--pc-blue-bright);
}

.streak-from {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
