*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  --bg:            #f2f2f7;
  --surface:       #ffffff;
  --fill-1:        rgba(120,120,128,0.12);
  --fill-2:        rgba(120,120,128,0.08);
  --sep:           rgba(60,60,67,0.12);
  --sep-opaque:    #c6c6c8;
  --t1:            #000000;
  --t2:            rgba(60,60,67,0.60);
  --t3:            rgba(60,60,67,0.30);
  --blue:          #007aff;
  --green:         #34c759;
  --orange:        #ff9500;
  --red:           #ff3b30;
  --indigo:        #5856d6;
  --gray:          #8e8e93;
  --gray-6:        #f2f2f7;
  --sidebar:       #1c1c1e;
  --sidebar-t:     rgba(235,235,245,0.72);
  --sidebar-muted: rgba(235,235,245,0.28);
  --sidebar-sel:   #0a84ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--t1);
  font-size: 15px;
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover {
  opacity: 0.8;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ══ TOP NAV (vr-* template) ══ */
.vr-topnav {
  background: #1c1c1e;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.vr-brand { display: flex; align-items: center; gap: 7px; margin-right: 24px; white-space: nowrap; }
.vr-brand-logo { display: block; height: 30px; width: auto; }
.vr-brand-name { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.vr-brand-sub { color: rgba(235,235,245,0.28); font-size: 11px; align-self: flex-end; margin-bottom: 3px; }

.vr-nav-link {
  color: #0a84ff;
  background: rgba(10,132,255,0.18);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
}
.vr-nav-link:hover { opacity: 1; background: rgba(10,132,255,0.28); }

.vr-nav-item { position: relative; }
.vr-nav-btn {
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(235,235,245,0.72);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13.5px;
}
.vr-nav-btn:hover { background: rgba(255,255,255,0.07); color: #fff; }
.vr-nav-btn.active { color: #0a84ff; background: rgba(10,132,255,0.18); font-weight: 500; }
.vr-nav-btn .caret { font-size: 9px; opacity: 0.5; }

.vr-badge { font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 999px; }
.vr-badge.green { background: rgba(52,199,89,0.20); color: #4cd964; }
.vr-badge.red   { background: rgba(255,59,48,0.22); color: #ff6961; }
.vr-badge.orange { background: rgba(255,149,0,0.18); color: #ffb340; }
.vr-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff9500; }

.vr-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  width: 230px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.24);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 50;
}
.vr-dropdown.open { display: flex; }
.vr-dropdown a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #000;
  font-size: 13.5px;
  padding: 8px 10px;
  border-radius: 8px;
}
.vr-dropdown a:hover { background: rgba(120,120,128,0.12); opacity: 1; }
.vr-dropdown a.active { color: var(--blue); font-weight: 600; }
.vr-dropdown .sep { height: 1px; background: rgba(60,60,67,0.1); margin: 5px 8px; }
.vr-dropdown .group-label {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(60,60,67,0.4); padding: 4px 10px 2px;
}
.vr-item-badge { font-size: 12px; font-weight: 700; color: rgba(60,60,67,0.6); }
.vr-item-badge.green { color: #34c759; }
.vr-item-badge.orange { color: #ff9500; }
.vr-item-badge.red { color: #ff3b30; }
.vr-item-badge.zero { color: rgba(60,60,67,0.3); font-weight: 400; }
.vr-sync-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 6px 10px; color: rgba(60,60,67,0.6);
}
.vr-sync-line .stale { color: #ff9500; font-weight: 500; }

.vr-right { margin-left: auto; display: flex; align-items: center; }
.stale-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: #ff6961;
  background: rgba(255,59,48,0.15); border-radius: 6px; padding: 3px 9px;
}
.stale-dot { width: 6px; height: 6px; border-radius: 50%; background: #ff6961; flex-shrink: 0; }
.vr-user { color: rgba(235,235,245,0.5); font-size: 12.5px; margin-left: 10px; }
.vr-signout {
  font-size: 11.5px; background: none; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px; padding: 2px 9px; color: rgba(235,235,245,0.5);
  cursor: pointer; margin-left: 6px;
}
.vr-signout:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.staff-tag { display: none; }

/* ══ SCROLL AREA ══ */
.scroll {
  overflow-y: auto;
  flex: 1;
}

/* ══ PAGE ══ */
.page {
  padding: 28px 28px 44px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ══ PAGE HEADER ══ */
.page-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.page-date {
  font-size: 13px;
  color: var(--t2);
  margin-top: 2px;
}
.btn-refresh {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.btn-refresh:active {
  opacity: 0.6;
}

/* ══ GROUPED SECTION ══ */
.section {
  margin-bottom: 8px;
}
.section-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--t2);
  padding: 20px 4px 7px;
}
.section-label:first-child {
  padding-top: 0;
}

/* ══ CARD (rounded grouped container) ══ */
.card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--sep);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}

/* ══ CARD FOOTER LINK ══ */
.card-foot {
  padding: 10px 16px;
  background: var(--fill-2);
  border-top: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-foot-stat {
  font-size: 12.5px;
  color: var(--t2);
}
.card-foot-stat strong {
  color: var(--red);
  font-weight: 600;
}
.lnk {
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 400;
}
.lnk:hover {
  opacity: 0.75;
}

/* ══ PIPELINE ROW (Leads) ══ */
.pipeline-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.pipe-cell {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 16px 14px;
  border-right: 1px solid var(--sep);
  transition: background 0.1s;
  position: relative;
}
.pipe-cell:last-child {
  border-right: none;
}
.pipe-cell:hover {
  background: var(--fill-2);
}

.pipe-cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}
.pipe-cell.c-green::before {
  background: var(--green);
}
.pipe-cell.c-orange::before {
  background: var(--orange);
}
.pipe-cell.c-red::before {
  background: var(--red);
}

.pipe-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--t2);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipe-count {
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--t1);
}
.pipe-count.c-orange {
  color: var(--orange);
}
.pipe-count.c-red {
  color: var(--red);
}
.pipe-count.c-zero {
  color: var(--t3);
}

/* ══ PROPERTY CELLS ══ */
.prop-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.prop-cell {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 16px 14px;
  border-right: 1px solid var(--sep);
  transition: background 0.1s;
}
.prop-cell:last-child {
  border-right: none;
}
.prop-cell:hover {
  background: var(--fill-2);
}
.prop-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--t2);
  margin-bottom: 8px;
}
.prop-count {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.prop-count.c-zero {
  color: var(--t3);
}

/* ══ INLINE ROW (sync note, etc.) ══ */
.inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-top: 1px solid var(--sep);
  font-size: 12.5px;
  color: var(--t2);
}
.inline-row .c-red {
  color: var(--red);
  font-weight: 600;
}

/* ══ STATUS ROWS (System) ══ */
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sep);
}
.status-row:last-child {
  border-bottom: none;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.green {
  background: var(--green);
}
.status-dot.red {
  background: var(--red);
}
.status-name {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
}
.status-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
}
.status-chip.ok {
  color: #1c7c4a;
  background: rgba(52,199,89,0.1);
}
.status-chip.fail {
  color: var(--red);
  background: rgba(255,59,48,0.08);
}
.status-time {
  font-size: 12px;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}
.status-time.stale {
  color: var(--red);
  font-weight: 600;
}

/* ══ TASK ROWS (Work) ══ */
.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--sep);
  transition: background-color 0.1s;
}
.task-row:hover {
  background-color: var(--fill-2);
}
.task-row:last-of-type {
  border-bottom: none;
}

.urgency-bar {
  width: 3px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--gray);
}
.urgency-bar.red {
  background: var(--red);
}
.urgency-bar.orange {
  background: var(--orange);
}

.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-title:hover {
  color: var(--blue);
}
.task-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.task-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
  white-space: nowrap;
}
.task-pri {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
}
.task-pri.high {
  color: #92400e;
  background: rgba(255,149,0,0.13);
}
.task-pri.medium {
  color: #1d4ed8;
  background: rgba(0,122,255,0.10);
}
.task-pri.low {
  color: var(--gray);
  background: var(--fill-1);
}
.task-prop {
  font-size: 12px;
  color: var(--t2);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-prop:hover {
  color: var(--blue);
}

.task-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.task-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 7px;
  border: 1px solid var(--sep-opaque);
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
}
.task-btn:hover {
  background: rgba(0,122,255,0.05);
}
.task-btn.done {
  color: var(--green);
  border-color: rgba(52,199,89,0.3);
}
.task-btn.done:hover {
  background: rgba(52,199,89,0.07);
}
.task-btn.dismiss {
  color: var(--t2);
}

/* ══ SYSTEM BADGES & CHIPS ══ */
.status {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sep);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status.needs_human, .status.failed, .status.parse_failed, .status.high {
  color: var(--red);
  border-color: rgba(255,59,48,0.3);
  background: rgba(255,59,48,0.05);
}
.status.completed, .status.qualified, .status.imported, .status.todo {
  color: var(--green);
  border-color: rgba(52,199,89,0.3);
  background: rgba(52,199,89,0.05);
}
.status.medium {
  color: var(--orange);
  border-color: rgba(255,149,0,0.3);
  background: rgba(255,149,0,0.05);
}
.status.in_progress {
  color: var(--blue);
  border-color: rgba(0,122,255,0.3);
  background: rgba(0,122,255,0.05);
}
/* Lead workflow statuses (uppercase keys from the API). */
.status.SUITABLE_STAFF_REVIEW {
  color: var(--green);
  border-color: rgba(52,199,89,0.3);
  background: rgba(52,199,89,0.05);
}
.status.NEEDS_INFO {
  color: var(--orange);
  border-color: rgba(255,149,0,0.3);
  background: rgba(255,149,0,0.05);
}
.status.UNSUITABLE {
  color: var(--red);
  border-color: rgba(255,59,48,0.3);
  background: rgba(255,59,48,0.05);
}
.status.ARCHIVED {
  color: var(--gray);
  border-color: var(--sep);
  background: var(--gray-6);
}

/* ══ SYSTEM TABLES ══ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 12px;
  overflow: hidden;
  table-layout: fixed;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}
th, td {
  border-bottom: 1px solid var(--sep);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
th {
  background: var(--fill-2);
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  transition: background-color 0.1s ease;
}
tbody tr:hover {
  background-color: var(--fill-2);
}

/* ══ SYSTEM NOTICES ══ */
.notice {
  background: rgba(255, 149, 0, 0.08);
  border: 1px solid rgba(255, 149, 0, 0.25);
  color: #c27d00;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}
.notice.ok {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.25);
  color: #248a3d;
}
.notice.error {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.25);
  color: var(--red);
}

.empty {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 12px;
  padding: 16px;
  color: var(--t2);
  font-size: 14px;
  text-align: center;
}

/* ══ FORMS & CONTROLS ══ */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
label {
  display: grid;
  gap: 4px;
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 600;
}
input, select, button, textarea {
  min-height: 34px;
  border: 1px solid var(--sep);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--t1);
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}
button, .button {
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  border: 1px solid var(--sep-opaque);
  background: var(--surface);
  color: var(--blue);
  transition: background 0.1s;
}
button:hover, .button:hover {
  background: rgba(0, 122, 255, 0.05);
}
.button.primary, button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.button.primary:hover, button.primary:hover {
  background: #0062cc;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ══ DETAIL GROUPS ══ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.detail-box {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.detail-box span {
  display: block;
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-box strong, .detail-box code {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.lead-identity {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.lead-identity-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.lead-identity-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}
.lead-identity-head .muted {
  font-weight: 600;
}
.lead-identity-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 22px;
}
.lead-identity-meta > div span {
  display: block;
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lead-identity-meta > div strong,
.lead-identity-meta > div code {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stack label {
  display: block;
  margin: 8px 0;
  font-size: 13px;
  color: var(--t2);
}
.stack select, .stack textarea {
  width: 100%;
  padding: 6px;
}

/* ══ SYSTEM STAT BADGES ══ */
.sstat {
  display: inline-block;
  border: 1px solid var(--sep);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}
.sstat-completed {
  color: var(--green);
  border-color: rgba(52,199,89,0.3);
  background: rgba(52,199,89,0.05);
}
.sstat-partial {
  color: var(--orange);
  border-color: rgba(255,149,0,0.3);
  background: rgba(255,149,0,0.05);
}
.sstat-failed {
  color: var(--red);
  border-color: rgba(255,59,48,0.3);
  background: rgba(255,59,48,0.05);
}
.sstat-running {
  color: var(--blue);
  border-color: rgba(0,122,255,0.3);
  background: rgba(0,122,255,0.05);
}
.sync-now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.sync-now-cell {
  border: 1px solid var(--sep);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sync-now-cell strong {
  display: block;
  margin-bottom: 6px;
}

/* Properties view headers */
.prop-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sync-line {
  text-align: right;
  font-size: 13px;
  color: var(--t2);
}
.light {
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
}
.light.red {
  background: rgba(255,59,48,0.08);
  color: var(--red);
}
.light.amber {
  background: rgba(255,149,0,0.1);
  color: #c27d00;
}
.light.green {
  background: rgba(52,199,89,0.08);
  color: #248a3d;
}

/* ══ LOGIN PAGE SPECIFIC CARDS ══ */
.login-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
}
.login-card .brand {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 2px;
  padding: 0;
  color: var(--t1);
  letter-spacing: -0.02em;
}
.login-card .sub {
  color: var(--t2);
  font-size: 13px;
  margin-bottom: 24px;
}
.login-card label {
  display: block;
  font-size: 12px;
  color: var(--t2);
  margin: 14px 0 4px;
  font-weight: 600;
}
.login-card input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--sep);
  border-radius: 8px;
  font-size: 15px;
  background: var(--surface);
}
.login-card button {
  margin-top: 24px;
  width: 100%;
  padding: 10px 0;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
}
.login-card button:hover {
  background: #0062cc;
}
.login-card .error {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.25);
  color: var(--red);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 14px;
}

/* HTMX Transition styling */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
  opacity: 1;
}
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 980px) {
  .pipeline-row { grid-template-columns: repeat(3, 1fr); }
  .pipe-cell:nth-child(3) { border-right: none; }
  .pipe-cell:nth-child(4),
  .pipe-cell:nth-child(5) { border-top: 1px solid var(--sep); }
  .pipe-cell:nth-child(5) { border-right: none; }
}

@media (max-width: 720px) {
  .app            { flex-direction: column; }
  .sidebar        { flex-basis: auto; width: 100%; height: auto; position: static;
                    flex-direction: row; overflow-x: auto; }
  .sb-brand       { padding: 10px 14px; flex-shrink: 0; white-space: nowrap; border-bottom: none; }
  .sb-brand img   { width: 120px !important; margin-bottom: 2px !important; }
  .sb-brand-sub   { display: none; }
  .sb-nav         { display: flex; flex-wrap: nowrap; padding: 4px 8px; align-items: center; }
  .sb-group-label { display: none; }
  .sb-link        { white-space: nowrap; border-radius: 6px; padding: 6px 11px; }
  .sb-badge       { display: none; }
  .page           { padding: 16px 14px 48px; }
  .task-btns      { display: none; }
  .pipeline-row   { grid-template-columns: repeat(2, 1fr); }
  .pipe-cell:nth-child(2) { border-right: none; }
  .pipe-cell:nth-child(3),
  .pipe-cell:nth-child(4) { border-top: 1px solid var(--sep); }
  .pipe-cell:nth-child(4) { border-right: none; }
  .pipe-cell:nth-child(5) { border-top: 1px solid var(--sep); grid-column: 1 / -1; border-right: none; }
  .two-col        { grid-template-columns: 1fr; gap: 16px; }
}

/* ══ APP FOOTER ══ */
.app-footer {
  margin-top: auto;
  padding: 14px 22px;
  border-top: 1px solid var(--sep);
  color: var(--gray);
  font-size: 11.5px;
  text-align: center;
  letter-spacing: 0.2px;
}
.app-footer-sep { margin: 0 6px; opacity: 0.6; }
