* { box-sizing: border-box; }

/* Selfcare UI tokens — cohesive light theme */
:root {
  --sc-page: #f0f4fa;
  --sc-surface: #ffffff;
  --sc-surface-2: #fafbfd;
  --sc-border: #e4eaf2;
  --sc-border-soft: #eef2f8;
  --sc-text: #0f172a;
  --sc-muted: #64748b;
  --sc-muted-2: #94a3b8;
  --sc-slate-700: #334155;
  --sc-accent: #2563eb;
  --sc-accent-2: #3b82f6;
  --sc-accent-soft: #eff6ff;
  --sc-shadow: 0 4px 28px rgba(15, 23, 42, 0.055);
  --sc-shadow-lg: 0 22px 50px -32px rgba(15, 23, 42, 0.12);
  --sc-radius: 16px;
  --sc-radius-xl: 22px;
  --sc-radius-sm: 11px;
}

body { margin: 0; font-family: Arial, sans-serif; background: #f3f6fc; color: #0f172a; }
body.sc-auth {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--sc-page);
  background-image:
    radial-gradient(1000px 520px at 8% -12%, rgba(59, 130, 246, 0.1), transparent 52%),
    radial-gradient(820px 480px at 96% 4%, rgba(129, 140, 248, 0.08), transparent 48%),
    radial-gradient(700px 420px at 48% 108%, rgba(14, 165, 233, 0.06), transparent 55%);
  background-attachment: fixed;
  color: var(--sc-text);
  -webkit-font-smoothing: antialiased;
}
body.sc-nav-locked { overflow: hidden; }

a { color: var(--sc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sc-wrap { width: min(1100px, calc(100% - 24px)); margin: 0 auto; }
.sc-main { padding: 16px 0 24px; }
body.sc-auth .sc-content > .sc-main {
  padding: clamp(12px, 3vw, 22px) clamp(12px, 4vw, 28px) clamp(24px, 5vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* App shell — desktop sidebar + mobile drawer */
.sc-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 272px) 1fr;
  position: relative;
}

.sc-nav-backdrop {
  display: none;
}

/* Sidebar — light rail, airy spacing, soft accents */
.sc-side {
  background: var(--sc-surface);
  color: var(--sc-text);
  padding: 20px 14px 28px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--sc-border-soft);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.85) inset, 8px 0 32px rgba(15, 23, 42, 0.035);
  z-index: 40;
  scrollbar-width: thin;
  scrollbar-color: var(--sc-border) transparent;
}

.sc-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.sc-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sc-side .sc-brand {
  flex: 1;
  min-width: 0;
  width: 100%;
  justify-content: flex-start;
  padding: 4px 6px 18px;
  margin-bottom: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--sc-border-soft);
}
.sc-brand.inline { width: auto; padding: 8px 10px; }
.sc-brand img { max-height: 32px; width: auto; display: block; }

.sc-nav-close {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--sc-radius-sm);
  border: 1px solid var(--sc-border);
  background: var(--sc-surface-2);
  color: var(--sc-muted);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sc-nav-close:hover { background: var(--sc-surface); color: var(--sc-text); border-color: var(--sc-muted-2); }

.sc-user {
  margin-top: 0;
  padding: 16px 6px 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--sc-border-soft);
  margin-bottom: 8px;
}
.sc-user-name { font-weight: 700; color: var(--sc-text); margin-bottom: 6px; font-size: 14px; line-height: 1.4; letter-spacing: -0.01em; }
.sc-user-meta { font-size: 12px; color: var(--sc-muted); line-height: 1.55; word-break: break-word; }

.sc-side-nav {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px 10px 9px;
  border-radius: var(--sc-radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-muted);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.sc-nav-link:hover {
  background: var(--sc-surface-2);
  color: var(--sc-text);
  text-decoration: none;
}
.sc-nav-ico {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--sc-border-soft);
  color: var(--sc-muted-2);
  transition: inherit;
}
.sc-nav-link:hover .sc-nav-ico { background: #e8eef6; color: var(--sc-muted); }
.sc-nav-link.active {
  background: linear-gradient(105deg, var(--sc-accent-soft) 0%, rgba(239, 246, 255, 0.35) 100%);
  border-left-color: var(--sc-accent);
  color: var(--sc-accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.sc-nav-link.active .sc-nav-ico {
  background: #dbeafe;
  color: var(--sc-accent);
  box-shadow: none;
}
.sc-nav-txt { flex: 1; min-width: 0; }

.sc-nav-link--logout {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--sc-border-soft);
  border-left-color: transparent;
  color: #c2410c;
  background: transparent;
}
.sc-nav-link--logout .sc-nav-ico { background: #fff7ed; color: #ea580c; }
.sc-nav-link--logout:hover {
  background: #fffbeb;
  color: #9a3412;
}

.sc-content { min-width: 0; display: flex; flex-direction: column; }

.sc-topbar {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--sc-border-soft);
  padding: 12px clamp(14px, 3vw, 24px);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 8px 24px rgba(15, 23, 42, 0.04);
}
.sc-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sc-nav-toggle {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--sc-radius-sm);
  border: 1px solid var(--sc-border);
  background: var(--sc-surface);
  color: var(--sc-text);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--sc-shadow);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sc-nav-toggle:hover { background: var(--sc-surface-2); border-color: var(--sc-muted-2); }
.sc-nav-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.sc-topbar-title { font-size: clamp(17px, 2.5vw, 20px); font-weight: 800; color: var(--sc-text); letter-spacing: -0.03em; }
.sc-topbar-sub { font-size: 12px; color: var(--sc-muted-2); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }

.sc-login-top { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 10px 0; }

@media (min-width: 1024px) {
  .sc-nav-toggle { display: none !important; }
  .sc-nav-close { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-side,
  .sc-nav-backdrop,
  .sc-kpi-tile { transition: none !important; }
  .sc-kpi-tile:hover { transform: none; }
}

@media (max-width: 1023px) {
  .sc-app { grid-template-columns: 1fr; }

  .sc-nav-toggle { display: inline-flex; }

  .sc-nav-close { display: inline-flex; }

  .sc-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sc-app.sc-nav-open .sc-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sc-nav-backdrop[hidden] {
    display: none !important;
  }

  .sc-side {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    max-width: 320px;
    transform: translateX(-104%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    border-right: 1px solid #e2e8f0;
  }
  .sc-app.sc-nav-open .sc-side {
    transform: translateX(0);
    box-shadow: 16px 0 48px rgba(15, 23, 42, 0.18);
  }
}

/* Dashboard & shared “pro” surfaces */
.sc-page-head {
  margin-bottom: clamp(18px, 4vw, 28px);
  padding: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 32px);
  border-radius: var(--sc-radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.92) 42%, rgba(239, 246, 255, 0.55) 100%);
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.sc-page-title {
  margin: 0 0 10px;
  font-size: clamp(1.38rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--sc-text);
  line-height: 1.18;
}
.sc-page-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--sc-muted);
  max-width: 54ch;
}
.sc-page-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sc-accent);
  opacity: 0.9;
}

.sc-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: clamp(16px, 3vw, 24px);
}
@media (min-width: 900px) {
  .sc-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sc-kpi-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 20px;
  border-radius: var(--sc-radius);
  background: var(--sc-surface);
  border: 1px solid var(--sc-border-soft);
  box-shadow: var(--sc-shadow), 0 0 0 1px rgba(255, 255, 255, 0.75) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.sc-kpi-tile:hover {
  transform: translateY(-1px);
  border-color: var(--sc-border);
  box-shadow: var(--sc-shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}
.sc-kpi-ico {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}
.sc-kpi-tile--invoices .sc-kpi-ico { color: #7c3aed; background: linear-gradient(145deg, #f5f3ff, #ede9fe); }
.sc-kpi-tile--payments .sc-kpi-ico { color: #059669; background: linear-gradient(145deg, #ecfdf5, #d1fae5); }
.sc-kpi-tile--tickets .sc-kpi-ico { color: #ea580c; background: linear-gradient(145deg, #fff7ed, #ffedd5); }
.sc-kpi-tile--due .sc-kpi-ico { color: #c2410c; background: linear-gradient(145deg, #fff7ed, #fed7aa); }
.sc-kpi-value--money { font-size: clamp(1.25rem, 3.5vw, 1.65rem); }
.sc-kpi-value--compact { font-size: 1.125rem; font-weight: 800; color: #059669; letter-spacing: -0.01em; }
.sc-kpi-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sc-muted-2);
}
.sc-kpi-value {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  color: var(--sc-text);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.sc-kpi-body { min-width: 0; }

.sc-dash-panels {
  display: grid;
  gap: clamp(14px, 3vw, 20px);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .sc-dash-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/*
 * Dashboard only — matches git tag v1.0.0 `public/css/selfcare.css` for this layout.
 * Note: `storage/app/selfcare_php/*.php` is not tracked in git; markup mirrors that release.
 */
.sc-dash-legacy .sc-title {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: normal;
  color: #0f172a;
}
.sc-dash-legacy .sc-sub {
  margin: 0 0 14px;
  color: #64748b;
}
.sc-dash-legacy > .sc-grid.sc-grid-4:first-of-type {
  margin-bottom: 14px;
}
.sc-dash-legacy .sc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.05);
}
.sc-dash-legacy .sc-kpi h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}
.sc-dash-legacy .sc-kpi .v {
  font-size: 28px;
  font-weight: 800;
  color: #1d4ed8;
}
.sc-dash-legacy .sc-grid {
  display: grid;
  gap: 14px;
}
.sc-dash-legacy .sc-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sc-dash-legacy .sc-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sc-dash-legacy .sc-table {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.sc-dash-legacy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sc-dash-legacy th,
.sc-dash-legacy td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.sc-dash-legacy th {
  background: #f8fafc;
  color: #334155;
}
.sc-dash-legacy .sc-row-due td {
  background: #fff5f5;
  color: #7f1d1d;
}
@media (max-width: 992px) {
  .sc-dash-legacy .sc-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .sc-dash-legacy .sc-grid-2,
  .sc-dash-legacy .sc-grid-4 {
    grid-template-columns: 1fr;
  }
}

.sc-panel {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border-soft);
  border-radius: var(--sc-radius-xl);
  box-shadow: var(--sc-shadow), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
}
.sc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sc-border-soft);
  background: linear-gradient(180deg, var(--sc-surface-2) 0%, var(--sc-surface) 100%);
}
.sc-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--sc-text);
  letter-spacing: -0.025em;
}
.sc-panel-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--sc-accent);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sc-accent-soft);
  border: 1px solid rgba(37, 99, 235, 0.12);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sc-panel-link:hover {
  color: var(--sc-accent-2);
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.2);
  text-decoration: none;
}
.sc-panel-body { padding: 0; }

.sc-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sc-pill--due {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.sc-mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.sc-num { font-variant-numeric: tabular-nums; font-weight: 700; }

.sc-table-modern {
  border: 0;
  border-radius: 0;
}
.sc-table-modern table { font-size: 14px; }
.sc-table-modern th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--sc-muted-2);
  background: linear-gradient(180deg, var(--sc-surface-2) 0%, #f4f7fb 100%);
  padding: 14px 18px;
  border-bottom: 1px solid var(--sc-border-soft);
}
.sc-table-modern td {
  padding: 14px 18px;
  vertical-align: middle;
  color: var(--sc-slate-700);
}
.sc-table-modern tbody tr:hover td { background: rgba(248, 250, 252, 0.85); }
.sc-table-modern tbody tr.sc-row-due:hover td { background: #fff5f5; }
.sc-table-empty {
  text-align: center;
  color: #64748b !important;
  font-weight: 600;
  padding: 28px 16px !important;
}

@media (max-width: 640px) {
  .sc-table-modern thead { display: none; }
  .sc-table-modern tbody tr {
    display: block;
    margin-bottom: 14px;
    border: 1px solid var(--sc-border-soft);
    border-radius: var(--sc-radius);
    overflow: hidden;
    background: var(--sc-surface);
    box-shadow: var(--sc-shadow);
  }
  .sc-table-modern tbody tr:hover td { background: transparent; }
  .sc-table-modern td {
    display: grid;
    grid-template-columns: minmax(0, 38%) 1fr;
    gap: 10px;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
  }
  .sc-table-modern td:last-child { border-bottom: 0; }
  .sc-table-modern td::before {
    content: attr(data-label);
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
  }
  .sc-table-modern td.sc-table-empty {
    display: block;
    padding: 24px 16px !important;
  }
  .sc-table-modern td.sc-table-empty::before { content: none; }
  .sc-row-due td { background: #fffafb !important; }
}

body.sc-auth .sc-footer.sc-app-footer {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  padding: 12px clamp(12px, 4vw, 28px);
}
.sc-app-footer-inner {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
@media (min-width: 1024px) {
  .sc-app-footer-inner { text-align: left; }
}

.sc-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border-soft);
  border-radius: var(--sc-radius);
  padding: 18px;
  box-shadow: var(--sc-shadow), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}
.sc-grid { display: grid; gap: 14px; }
.sc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-kpi h3 { margin: 0 0 6px; font-size: 13px; color: #64748b; font-weight: 700; }
.sc-kpi .v { font-size: 28px; font-weight: 800; color: #1d4ed8; }

.sc-title { margin: 0 0 14px; font-size: 24px; }
.sc-sub { margin: 0 0 14px; color: #64748b; }
.sc-alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.sc-ok { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; }
.sc-bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px; border-bottom: 1px solid #e2e8f0; text-align: left; }
th { background: #f8fafc; color: #334155; }
.sc-table { overflow: auto; border-radius: 12px; border: 1px solid #e2e8f0; }

form.sc-form { display: grid; gap: 12px; }
form.sc-form .row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
textarea { min-height: 120px; }
.sc-btn { display: inline-block; border: 0; background: #1d4ed8; color: #fff; border-radius: 10px; padding: 11px 14px; font-weight: 700; cursor: pointer; }
.sc-btn:hover { filter: brightness(.95); text-decoration: none; }
.sc-btn-sm { padding: 7px 10px; border-radius: 8px; font-size: 12px; }
.sc-btn-pay { background: #dc2626; }
.sc-btn-pay:hover { background: #b91c1c; }
.sc-muted { color: #94a3b8; font-size: 13px; }
.sc-status { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef2ff; color: #1e3a8a; font-size: 12px; font-weight: 700; }
.sc-status.is-due { background: #fee2e2; color: #b91c1c; }
.sc-status.is-ok { background: #dcfce7; color: #166534; }
.sc-row-due td { background: #fff5f5; color: #7f1d1d; }

.sc-ticket-list { display: grid; gap: 10px; }
.sc-ticket { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
.sc-ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sc-ticket-id { font-size: 12px; font-weight: 800; color: #475569; letter-spacing: .3px; }
.sc-ticket-title { margin: 0 0 6px; font-size: 16px; }
.sc-ticket-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #64748b; font-size: 12px; margin-bottom: 8px; }
.sc-ticket-desc { margin: 0 0 8px; color: #0f172a; font-size: 14px; line-height: 1.45; }
.sc-ticket-update { border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 8px 10px; font-size: 13px; color: #78350f; margin-top: 8px; }
.sc-ticket-update.done { border-color: #bbf7d0; background: #ecfdf5; color: #166534; }

.sc-support-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-action-row { display: flex; gap: 8px; align-items: center; }
.sc-btn-ghost { background: #e2e8f0; color: #0f172a; }
.sc-btn-ghost:hover { background: #cbd5e1; }
.sc-support-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); margin-top: 14px; }
.sc-ticket-table tbody tr.is-selected td { background: #eff6ff; }
.sc-row-title { font-weight: 700; color: #0f172a; }
.sc-row-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.sc-duration { font-weight: 700; color: #1f2937; }
.sc-duration.live { color: #92400e; }
.sc-duration.done { color: #166534; }
.sc-ticket-detail { display: grid; gap: 8px; }
.sc-ticket-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sc-ticket-top-actions { display: flex; gap: 8px; align-items: center; }
.sc-ticket-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-info-pill { border: 1px solid #dbe3ef; background: #f8fbff; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.sc-ticket-hero { background: linear-gradient(135deg, #eef4ff 0%, #ffffff 45%, #f0fdf4 100%); border: 1px solid #dbe7ff; }
.sc-ticket-hero-title { margin-top: 8px; font-size: 16px; font-weight: 700; color: #0f172a; }
.sc-ticket-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sc-sum-card { border-radius: 14px; padding: 12px 14px; border: 1px solid #e2e8f0; box-shadow: 0 8px 18px rgba(2, 6, 23, .05); }
.sc-sum-card .k { font-size: 12px; color: #64748b; margin-bottom: 6px; font-weight: 700; }
.sc-sum-card .v { font-size: 16px; color: #0f172a; font-weight: 800; }
.sc-sum-card.status { background: linear-gradient(180deg, #eff6ff, #ffffff); }
.sc-sum-card.created { background: linear-gradient(180deg, #fff7ed, #ffffff); }
.sc-sum-card.connection { background: linear-gradient(180deg, #f5f3ff, #ffffff); }
.sc-sum-card.duration { background: linear-gradient(180deg, #ecfdf5, #ffffff); }

.sc-timeline { position: relative; display: grid; gap: 14px; }
.sc-tl-item { display: grid; grid-template-columns: 120px 28px 1fr; gap: 10px; align-items: start; }
.sc-tl-time { text-align: right; color: #334155; font-size: 12px; padding-top: 2px; }
.sc-tl-time small { color: #64748b; }
.sc-tl-track { position: relative; min-height: 100%; }
.sc-tl-track::before { content: ""; position: absolute; left: 13px; top: -10px; bottom: -10px; width: 2px; background: #dbe3ef; }
.sc-tl-item:first-child .sc-tl-track::before { top: 12px; }
.sc-tl-item:last-child .sc-tl-track::before { bottom: calc(100% - 12px); }
.sc-tl-dot { position: absolute; left: 7px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: #1d4ed8; border: 2px solid #fff; box-shadow: 0 0 0 2px #bfdbfe; }
.sc-tl-content { border: 1px solid #e2e8f0; background: linear-gradient(180deg,#ffffff,#f8fbff); border-radius: 12px; padding: 10px 12px; }
.sc-tl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.sc-tl-head span { color: #64748b; font-size: 12px; font-weight: 700; }
.sc-tl-text { margin-top: 6px; color: #0f172a; font-size: 14px; line-height: 1.45; white-space: normal; word-break: break-word; }
.sc-type-complete .sc-tl-dot { background: #16a34a; box-shadow: 0 0 0 2px #bbf7d0; }
.sc-type-client .sc-tl-dot { background: #7c3aed; box-shadow: 0 0 0 2px #ddd6fe; }
.sc-type-admin .sc-tl-dot { background: #0ea5e9; box-shadow: 0 0 0 2px #bae6fd; }
.sc-type-assigned .sc-tl-dot { background: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }

/* Invoice page — refined layout (pairs with invoices.php) */
.sc-inv-page-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(16px, 3vw, 22px);
}
@media (min-width: 768px) {
  .sc-inv-page-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.sc-inv-page-hero-main { flex: 1; min-width: 0; }
.sc-inv-page-hero-meta {
  flex-shrink: 0;
  padding: 16px 18px;
  border-radius: var(--sc-radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%);
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow), 0 0 0 1px rgba(255, 255, 255, 0.75) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 280px;
}
@media (max-width: 767px) {
  .sc-inv-page-hero-meta { max-width: none; }
}
.sc-inv-signal {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.sc-inv-signal--clear {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}
.sc-inv-signal--alert {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fda4af;
}
.sc-inv-meta-note {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
}
.sc-inv-meta-sub {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.sc-inv-flash { margin-bottom: 16px; }

.sc-inv-kpis { margin-bottom: clamp(14px, 3vw, 20px); }

.sc-inv-panel { margin-bottom: 24px; }
.sc-inv-panel-head { align-items: flex-start; }
.sc-panel-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--sc-muted-2);
  white-space: nowrap;
}

.sc-inv-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--sc-radius-xl) var(--sc-radius-xl);
}
.sc-inv-table {
  min-width: 880px;
  width: 100%;
}
.sc-inv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.sc-inv-table tbody td {
  padding: 13px 16px;
  font-size: 14px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.sc-inv-table tbody tr:last-child td { border-bottom: 0; }
.sc-inv-table tbody tr:hover td { background: #f8fafc; }
/* Due row: one left accent only — inset shadow on every td looked like broken vertical red lines */
.sc-inv-table tbody tr.sc-row-due td {
  background: #fff5f6;
  box-shadow: none;
}
.sc-inv-table tbody tr.sc-row-due td:first-child {
  box-shadow: inset 4px 0 0 #fb7185;
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.98) 0%, #fff5f6 20px);
}
.sc-inv-table tbody tr.sc-row-due:hover td {
  background: #fff1f2;
}
.sc-inv-table tbody tr.sc-row-due:hover td:first-child {
  background: linear-gradient(90deg, rgba(255, 228, 230, 0.98) 0%, #fff1f2 22px);
}

.sc-inv-chip {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.sc-inv-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.sc-inv-status-pill--due {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.sc-inv-status-pill--paid {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}
.sc-inv-dash { color: #cbd5e1; font-weight: 600; }
.sc-inv-action-cell { white-space: nowrap; }

.sc-inv-id-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.sc-inv-id-link:hover {
  color: #1e40af;
  text-decoration: underline;
}
.sc-inv-id-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

.sc-inv-view-hero .sc-ticket-top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sc-inv-view-doc-actions {
  align-items: center;
  max-width: min(100%, 560px);
}
.sc-inv-doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  background: #ffffff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.sc-inv-doc-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a8a;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.sc-inv-doc-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.sc-inv-receipt-col {
  white-space: nowrap;
  width: 1%;
}
.sc-inv-receipt-link {
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.sc-inv-receipt-link:hover {
  background: #dbeafe;
  color: #1e3a8a;
  text-decoration: none;
}
.sc-inv-receipt-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}
.sc-inv-view-pay {
  margin-top: 4px;
}
.sc-inv-view-summary .sc-sum-card .v.sc-num {
  font-variant-numeric: tabular-nums;
}
.sc-inv-view-bdt {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-left: 2px;
}
.sc-inv-view-lines {
  min-width: 720px;
}
.sc-inv-view-desc-title {
  font-weight: 600;
  color: #0f172a;
}
.sc-inv-view-desc-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
}
.sc-inv-view-totals {
  margin-top: 20px;
  margin-left: auto;
  max-width: 380px;
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-inv-view-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
  color: #475569;
}
.sc-inv-view-total-row .sc-num {
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.sc-inv-view-total-strong {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
}
.sc-inv-view-total-due {
  color: #be123c;
}
.sc-inv-view-total-due .sc-num {
  color: #be123c;
  font-size: 16px;
}

.sc-inv-pay-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Pay Online — primary blue */
.sc-btn-pay-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  border: 1.5px solid #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.22), 0 1px 3px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.sc-btn-pay-modern:hover {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), 0 2px 4px rgba(15, 23, 42, 0.06);
}
.sc-btn-pay-modern:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* bKash — official brand pink (sslcommerz / merchant guidelines) */
.sc-btn-pay-bkash {
  background: #e2136e;
  color: #ffffff;
  border-color: #e2136e;
  box-shadow: 0 1px 2px rgba(226, 19, 110, 0.35), 0 1px 3px rgba(15, 23, 42, 0.06);
  letter-spacing: 0.01em;
}
.sc-btn-pay-bkash:hover {
  background: #c0115f;
  border-color: #c0115f;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(226, 19, 110, 0.4), 0 2px 4px rgba(15, 23, 42, 0.06);
}
.sc-btn-pay-bkash:focus-visible {
  outline: 2px solid #e2136e;
  outline-offset: 2px;
}

/* Nagad — brand orange (digital wallet UI guidelines) */
.sc-btn-pay-nagad {
  background: #f7941d;
  color: #ffffff;
  border-color: #e8890b;
  box-shadow: 0 1px 2px rgba(247, 148, 29, 0.45), 0 1px 3px rgba(15, 23, 42, 0.06);
  letter-spacing: 0.01em;
}
.sc-btn-pay-nagad:hover {
  background: #e8890b;
  border-color: #d67a08;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(247, 148, 29, 0.45), 0 2px 4px rgba(15, 23, 42, 0.06);
}
.sc-btn-pay-nagad:focus-visible {
  outline: 2px solid #f7941d;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .sc-inv-panel .sc-table-modern tbody tr.sc-row-due {
    border-color: #fecdd3;
    box-shadow: inset 4px 0 0 #fb7185, 0 4px 14px rgba(15, 23, 42, 0.06);
  }
  .sc-inv-panel .sc-table-modern .sc-inv-action-cell {
    padding-top: 14px;
  }
  .sc-inv-panel .sc-inv-pay-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .sc-inv-panel .sc-inv-pay-actions .sc-btn-pay-modern,
  .sc-inv-panel .sc-inv-pay-actions .sc-btn-pay-bkash,
  .sc-inv-panel .sc-inv-pay-actions .sc-btn-pay-nagad {
    width: 100%;
    min-height: 44px;
  }
}

/* Connections page */
.sc-conn-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 55%, #f0fdf4 100%);
  border-color: #dbe7ff;
}
.sc-conn-kpis .sc-card:nth-child(1) { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.sc-conn-kpis .sc-card:nth-child(2) { background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%); }
.sc-conn-kpis .sc-card:nth-child(3) { background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%); }
.sc-conn-kpis .sc-card:nth-child(4) { background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%); }
.sc-conn-table-wrap { padding: 10px; }
.sc-conn-table { min-width: 920px; }
.sc-conn-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.sc-conn-table tbody tr:nth-child(even) td { background: #fbfdff; }
.sc-conn-table tbody tr:hover td { background: #eef4ff; }
.sc-conn-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 2px; }
.sc-conn-item {
  border-color: #dbe7ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
}
.sc-conn-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.sc-conn-id {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  background: #eef4ff;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 5px 10px;
}
.sc-conn-item-body { display: grid; gap: 8px; }
.sc-conn-field {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}
.sc-conn-field span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #64748b;
  font-weight: 700;
}
.sc-conn-field strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}
.sc-conn-item-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sc-conn-activation { font-size: 12px; color: #475569; }
.sc-conn-activation strong { color: #0f172a; }
.sc-conn-empty { color: #64748b; font-weight: 700; }

/* Connections list — compact summary + inline live usage */
.sc-conn-list-page {
  max-width: 1080px;
  margin: 0 auto;
}
/* Single-connection row: same width as summary strip (no narrow column) */
.sc-conn-card-grid--single {
  grid-template-columns: 1fr;
  width: 100%;
}
.sc-conn-card-grid--single .sc-conn-item {
  padding: 12px;
}
@media (min-width: 520px) {
  .sc-conn-card-grid--single .sc-conn-item-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
}
.sc-conn-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--sc-radius-xl);
  border: 1px solid var(--sc-border-soft);
  background: linear-gradient(120deg, #ffffff 0%, #f0f7ff 42%, #fafafa 100%);
  box-shadow: var(--sc-shadow);
}
.sc-conn-strip__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.sc-conn-strip__dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #22c55e, #16a34a);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.sc-conn-strip__title {
  display: block;
  font-size: 15px;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.sc-conn-strip__meta {
  margin: 4px 0 0;
  font-size: 13px;
}
.sc-conn-live {
  margin-top: 10px;
  padding: 10px 10px 8px;
  border-radius: 12px;
  border: 1px solid #d9f3e4;
  background: linear-gradient(145deg, #f8fffb 0%, #ffffff 45%, #eff6ff 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.sc-conn-live__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 8px;
}
.sc-conn-live__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.sc-conn-live__badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.sc-conn-live__badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: sc-live-pulse 1.6s ease-in-out infinite;
}
@keyframes sc-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.sc-conn-live__time {
  margin-left: auto;
  font-size: 12px;
}
.sc-conn-live__meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sc-conn-live__meter-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.sc-conn-live__meter--rx .sc-conn-live__meter-label { color: #166534; }
.sc-conn-live__meter--tx .sc-conn-live__meter-label { color: #991b1b; }
.sc-conn-live__meter-val {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.sc-conn-live__meter--rx .sc-conn-live__meter-val { color: #15803d; }
.sc-conn-live__meter--tx .sc-conn-live__meter-val { color: #b91c1c; }
.sc-conn-live__meter-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.sc-conn-live__meter-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.sc-conn-live__meter--rx .sc-conn-live__meter-bar span {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}
.sc-conn-live__meter--tx .sc-conn-live__meter-bar span {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}
.sc-conn-live__chart-wrap {
  margin-top: 8px;
  position: relative;
}
.sc-conn-live__canvas {
  display: block;
  width: 100%;
  height: 52px;
  border-radius: 8px;
  vertical-align: middle;
}
.sc-conn-live__legend {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
}
.sc-conn-live__lg--rx::before,
.sc-conn-live__lg--tx::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.sc-conn-live__lg--rx { color: #166534; }
.sc-conn-live__lg--rx::before { background: #16a34a; }
.sc-conn-live__lg--tx { color: #991b1b; }
.sc-conn-live__lg--tx::before { background: #dc2626; }
.sc-conn-live__err {
  margin: 8px 0 0;
  font-size: 12px;
}

/* Connection detail page — address hero + definition lists */
.sc-conn-view-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
}
.sc-conn-view-hero {
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: var(--sc-radius-xl);
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 48%, #f8fafc 100%);
  border: 1px solid var(--sc-border-soft);
  box-shadow: var(--sc-shadow-lg);
}
.sc-conn-view-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px 10px;
}
.sc-conn-view-hero__lead .sc-page-kicker {
  margin: 0 0 6px;
}
.sc-conn-view-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.sc-conn-view-hero__h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
}
.sc-conn-view-hero__actions {
  flex-shrink: 0;
}
.sc-conn-view-addr {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px 18px;
  margin: 0 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e8eef5;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
.sc-conn-view-addr__pin {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  color: #1d4ed8;
}
.sc-conn-view-addr__text {
  min-width: 0;
  flex: 1;
}
.sc-conn-view-addr__kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}
.sc-conn-view-addr__line {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
}
.sc-conn-view-addr__line:last-of-type {
  margin-bottom: 0;
}
.sc-conn-view-addr__line--soft {
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
}
.sc-conn-view-addr__maplink {
  margin-top: 12px;
}
.sc-conn-view-addr-empty {
  margin: 0 22px 18px;
}
.sc-conn-view-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sc-detail-panel {
  border-radius: 18px;
  padding: 18px 20px 20px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--sc-border-soft);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 14px 36px -14px rgba(15, 23, 42, 0.09);
}
.sc-detail-panel--network {
  background: linear-gradient(165deg, #ffffff 0%, #f8fbff 55%, #fafafa 100%);
}
.sc-detail-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.sc-detail-panel__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
}
.sc-detail-panel--network .sc-detail-panel__icon {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4338ca;
}
.sc-detail-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.sc-detail-panel__empty {
  margin: 0;
}
.sc-detail-rows {
  margin: 0;
  display: grid;
  gap: 8px;
}
.sc-detail-row {
  display: grid;
  grid-template-columns: minmax(110px, 32%) minmax(0, 1fr);
  gap: 6px 14px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
}
.sc-detail-row dt {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.sc-detail-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}
.sc-detail-row__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 500;
}
.sc-detail-row--note dd {
  font-weight: 500;
  color: #334155;
  white-space: pre-wrap;
}

.sc-info-list { display: grid; gap: 8px; font-size: 14px; color: #0f172a; }
.sc-info-list > div { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; }
.sc-live-usage { background: linear-gradient(135deg, #f8fffb 0%, #ffffff 55%, #eff6ff 100%); border-color: #d9f3e4; }
.sc-live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sc-live-right { display: flex; align-items: center; gap: 10px; }
.sc-live-loader {
  margin-bottom: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-live-loader.is-loading { border-color: #93c5fd; }
.sc-live-clock {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.sc-live-clock svg {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
  display: block;
}
.sc-live-clock-track {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 4;
}
.sc-live-clock-progress {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .12s linear;
}
.sc-live-clock span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #1e3a8a;
}
.sc-live-loader-text {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.sc-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.sc-live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}
.sc-live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sc-live-item {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(2, 6, 23, .07);
}
.sc-live-item-rx {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 55%, #f0fdf4 100%);
}
.sc-live-item-tx {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 55%, #fef2f2 100%);
}
.sc-live-item-rx .sc-live-label { color: #166534; }
.sc-live-item-tx .sc-live-label { color: #991b1b; }
.sc-live-item-rx .sc-live-value { color: #166534; }
.sc-live-item-tx .sc-live-value { color: #991b1b; }
.sc-live-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.sc-live-value {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 11px;
}
.sc-live-bar { width: 100%; height: 12px; border-radius: 999px; background: rgba(255,255,255,.7); overflow: hidden; }
.sc-live-fill { height: 100%; border-radius: 999px; transition: width .35s ease; }
.sc-live-fill.rx { background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%); }
.sc-live-fill.tx { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }
.sc-live-card-meta {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.sc-live-max { color: #334155; font-weight: 700; }
.sc-live-max strong { font-weight: 900; }
.sc-live-peak-time { color: #64748b; }
.sc-live-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 12px;
}
.sc-prof-hero { background: linear-gradient(135deg, #eef4ff 0%, #ffffff 55%, #f0fdf4 100%); border-color: #dbe7ff; }
.sc-prof-grid { display: grid; gap: 14px; grid-template-columns: 1.2fr 1fr; }
.sc-prof-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sc-prof-list > div { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 14px; }
.sc-prof-list strong { color: #334155; display: block; font-size: 12px; margin-bottom: 3px; }
.sc-prof-address-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sc-prof-address-card { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; background: #ffffff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04); }
.sc-prof-address-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sc-prof-map-wrap { margin-top: 10px; }
.sc-prof-map { width: 100%; border: 0; border-radius: 10px; min-height: 160px; background: #f1f5f9; }
.sc-security-card { background: linear-gradient(135deg, #eef4ff 0%, #ffffff 60%, #ecfeff 100%); border-color: #dbe7ff; }
.sc-security-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* Profile page — polished “app profile” layout */
.sc-prof-page {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 980px;
}
.sc-prof-page-intro .sc-page-kicker {
  margin: 0 0 6px;
}
.sc-prof-page-intro .sc-title {
  margin: 0 0 8px;
  letter-spacing: -0.04em;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
}
.sc-prof-page-intro .sc-sub {
  margin: 0;
  max-width: 42ch;
  line-height: 1.55;
  color: #64748b;
}

.sc-prof-id-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 22px 50px -12px rgba(15, 23, 42, 0.12);
}
.sc-prof-id-card__accent {
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #6366f1 38%, #22c55e 100%);
}
.sc-prof-id-card__body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 22px 24px;
  flex-wrap: wrap;
}
.sc-prof-id-card__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 55%, #312e81 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}
.sc-prof-id-card__main {
  flex: 1;
  min-width: min(100%, 220px);
}
.sc-prof-id-card__name {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}
.sc-prof-id-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sc-prof-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  max-width: 100%;
}
.sc-prof-chip--muted {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.sc-prof-chip__ico {
  flex-shrink: 0;
  opacity: 0.85;
}
.sc-prof-chip__txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.sc-prof-id-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}
.sc-prof-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sc-prof-pill--neutral {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.sc-prof-pill--ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.sc-prof-pill--warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.sc-prof-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.sc-prof-panel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 14px 40px -10px rgba(15, 23, 42, 0.1);
}
.sc-prof-panel--security {
  background: linear-gradient(155deg, #f8fafc 0%, #ffffff 55%, #f0fdf4 100%);
}
.sc-prof-panel--details {
  background: linear-gradient(155deg, #ffffff 0%, #f8fbff 50%, #fafafa 100%);
}
.sc-prof-panel--addresses {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 22px 22px 24px;
}
.sc-prof-panel__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}
.sc-prof-panel--details .sc-prof-panel__icon {
  color: #4338ca;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}
.sc-prof-panel__body {
  flex: 1;
  min-width: 0;
}
.sc-prof-panel__body--grow {
  flex: 1;
}
.sc-prof-panel__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.sc-prof-panel__title--flush {
  margin-bottom: 2px;
}
.sc-prof-panel__lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
.sc-prof-panel__action {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}
.sc-prof-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.sc-prof-mini-tile {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
}
.sc-prof-mini-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.sc-prof-mini-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.sc-prof-addresses-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.sc-prof-addresses-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.sc-prof-page .sc-prof-address-grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sc-prof-page .sc-prof-address-card {
  border: none;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  background: #ffffff;
  padding: 14px 16px 16px;
  border-radius: 14px;
}
.sc-prof-page .sc-prof-address-head {
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.sc-prof-page .sc-prof-addr-compact {
  margin: 0;
  padding: 0;
}
.sc-prof-page .sc-prof-addr-line {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 500;
}
.sc-prof-page .sc-prof-addr-line:last-of-type {
  margin-bottom: 0;
}
.sc-prof-page .sc-prof-addr-line--muted {
  color: #64748b;
  font-weight: 400;
  font-size: 12.5px;
}
.sc-prof-page .sc-prof-addr-empty {
  margin: 0;
  font-size: 13px;
}
.sc-prof-page .sc-prof-map-wrap {
  margin-top: 10px;
}
.sc-prof-page .sc-prof-map {
  min-height: 140px;
  border-radius: 10px;
}
.sc-prof-page .sc-prof-map-link {
  margin-top: 8px;
}
.sc-prof-page .sc-prof-address-head .sc-status {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.sc-prof-page .sc-prof-address-head strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.sc-prof-page .sc-btn-soft {
  border: none;
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.sc-prof-page .sc-btn-soft:hover {
  filter: brightness(1.06);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}
.sc-prof-page .sc-prof-panel .sc-btn-sm {
  border-radius: 10px;
}

/* One saved address: auto-fit collapses empty tracks (fixes a tiny card in a wide row).
   With a map, use a split layout on wider screens. */
/* One saved address: subtle card polish on all viewports */
.sc-prof-page .sc-prof-address-grid--single .sc-prof-address-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 40%, #fafafa 100%);
  border: 1px solid #e8eef5;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.075);
}

/* auto-fit collapses empty tracks; split layout when map exists (desktop) */
@media (min-width: 769px) {
  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, min(44vw, 420px));
    column-gap: 28px;
    row-gap: 12px;
    align-items: start;
    padding: 20px 22px 22px;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:has(.sc-prof-addr-compact) {
    grid-template-rows: auto auto auto;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:not(:has(.sc-prof-addr-compact)) {
    grid-template-rows: auto auto;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-head {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-addr-compact {
    grid-column: 1;
    grid-row: 2;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-addr-actions {
    grid-column: 1;
    margin-top: 0;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:has(.sc-prof-addr-compact) .sc-prof-addr-actions {
    grid-row: 3;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:not(:has(.sc-prof-addr-compact)) .sc-prof-addr-actions {
    grid-row: 2;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-map-wrap {
    grid-column: 2;
    margin-top: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:has(.sc-prof-addr-compact) .sc-prof-map-wrap {
    grid-row: 1 / -1;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-address-card:not(:has(.sc-prof-addr-compact)) .sc-prof-map-wrap {
    grid-row: 1 / span 2;
  }

  .sc-prof-page .sc-prof-address-grid--single.sc-prof-address-grid--has-map .sc-prof-map {
    min-height: 220px;
    flex: 1;
  }
}

.sc-prof-addr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.sc-prof-addr-del-form {
  margin: 0;
  display: inline;
}
.sc-prof-addr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.sc-prof-addr-btn--edit {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.sc-prof-addr-btn--edit:hover {
  background: #dbeafe;
  color: #1e3a8a;
  text-decoration: none;
}
.sc-prof-addr-btn--del {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.sc-prof-addr-btn--del:hover {
  background: #ffe4e6;
}
.sc-prof-addr-inuse {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.sc-prof-page--narrow {
  max-width: 720px;
}
.sc-prof-backlink {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}
.sc-prof-backlink:hover {
  text-decoration: underline;
}
.sc-prof-edit-wrap {
  padding: 20px 22px 22px;
}
.sc-prof-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.sc-prof-edit-form label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 5px;
}
.sc-prof-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.sc-prof-edit-map-row {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  isolation: isolate;
}
.sc-prof-edit-map-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 5px;
}
.sc-prof-edit-map-hint {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}
.sc-prof-addr-map {
  position: relative;
  z-index: 1;
  min-height: 260px;
  height: min(320px, 55vh);
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #e8eef5;
}
.sc-prof-addr-map .leaflet-container {
  font-family: inherit;
  height: 100%;
  width: 100%;
  border-radius: 10px;
}
.sc-prof-map-fail {
  margin: 0;
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}

.sc-settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.sc-settings-panel { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border-color: #dbe7ff; }
.sc-settings-tips { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); }
.sc-tip-list { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 8px; color: #334155; }
.sc-tip-list li { line-height: 1.45; }
.sc-btn-soft { background: #e2e8f0; color: #0f172a; }
.sc-btn-soft:hover { background: #cbd5e1; }

.sc-footer { border-top: 1px solid #e2e8f0; background: #fff; padding: 12px 16px; color: #64748b; font-size: 11px; }

@media (max-width: 992px) {
  .sc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-conn-card-grid { grid-template-columns: 1fr; }
  .sc-support-layout { grid-template-columns: 1fr; }
  .sc-ticket-info-grid { grid-template-columns: 1fr; }
  .sc-ticket-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sc-topbar { padding: 10px 12px; }
  .sc-topbar-title { font-size: 16px; }
  .sc-topbar-sub { display: none; }
  .sc-grid-2, .sc-grid-4 { grid-template-columns: 1fr; }
  form.sc-form .row { grid-template-columns: 1fr; }
  .sc-live-grid { grid-template-columns: 1fr; }
  .sc-live-head, .sc-live-meta, .sc-live-card-meta { flex-direction: column; align-items: flex-start; }
  .sc-live-loader { width: 100%; }
  .sc-live-value { font-size: 26px; }
  .sc-conn-item-foot { flex-direction: column; align-items: flex-start; }
  .sc-support-actions { flex-direction: column; align-items: flex-start; }
  .sc-ticket-top { flex-direction: column; align-items: flex-start; }
  .sc-ticket-summary-grid { grid-template-columns: 1fr; }
  .sc-tl-item { grid-template-columns: 1fr; gap: 8px; }
  .sc-tl-time { text-align: left; }
  .sc-tl-track { display: none; }
  .sc-inv-page-hero { align-items: stretch; }
  .sc-conn-hero { flex-direction: column; align-items: flex-start; }
  .sc-conn-view-hero__top {
    flex-direction: column;
    align-items: flex-start;
  }
  .sc-conn-view-addr {
    margin-left: 0;
    margin-right: 0;
  }
  .sc-conn-live__meters {
    grid-template-columns: 1fr;
  }
  .sc-conn-live__time {
    margin-left: 0;
  }
  .sc-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .sc-security-head { flex-direction: column; align-items: flex-start; }
  .sc-settings-grid { grid-template-columns: 1fr; }
  .sc-prof-panels { grid-template-columns: 1fr; }
  .sc-prof-id-card__body { align-items: center; }
  .sc-prof-id-card__aside {
    margin-left: 0;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .sc-prof-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .sc-prof-panel__action {
    align-self: flex-start;
  }
  .sc-prof-mini-grid { grid-template-columns: 1fr; }
  .sc-prof-chip__txt {
    white-space: normal;
    word-break: break-word;
  }
  .sc-prof-edit-grid { grid-template-columns: 1fr; }
  .sc-prof-grid, .sc-prof-list, .sc-prof-address-grid { grid-template-columns: 1fr; }
}

/* ----- Guest login / recovery (mobile-first) ----- */
body.sc-guest .sc-login-top {
  background: transparent;
  border-bottom: 0;
  padding: 0;
}

body.sc-guest {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f1f5f9;
  background-image:
    radial-gradient(ellipse 100% 80% at 100% -10%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 60% at -10% 110%, rgba(99, 102, 241, 0.14), transparent 50%),
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.12) 1px, transparent 0);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  background-attachment: fixed;
  color: #0f172a;
}

.sc-login-header {
  background: transparent;
  border-bottom: 0;
  padding: clamp(14px, 4vw, 26px) 16px 4px;
}
.sc-login-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
@media (min-width: 640px) {
  .sc-login-header-inner { justify-content: flex-start; }
}

.sc-login-brand {
  border-radius: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}
.sc-login-brand img { max-height: 34px; }

.sc-login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  padding: clamp(12px, 3vw, 28px) clamp(14px, 4vw, 24px) clamp(28px, 6vw, 48px);
}

.sc-login-card {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 40px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 4px 6px -1px rgba(15, 23, 42, 0.05),
    0 22px 50px -12px rgba(30, 64, 175, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sc-login-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
}
.sc-login-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}
.sc-login-lead {
  margin: 0 0 clamp(18px, 4vw, 26px);
  font-size: 15px;
  line-height: 1.55;
  color: #64748b;
}

.sc-login-alert { margin-bottom: 16px; font-size: 14px; line-height: 1.45; }

.sc-login-form.sc-form { gap: clamp(14px, 3vw, 20px); }
.sc-login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.sc-login-card input:not([type="hidden"]),
.sc-login-card select,
.sc-login-card textarea {
  min-height: 48px;
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sc-login-card input::placeholder { color: #94a3b8; }
.sc-login-card input:hover:not(:focus) { border-color: #cbd5e1; }
.sc-login-card input:focus,
.sc-login-card select:focus,
.sc-login-card textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.sc-login-btn-primary.sc-btn {
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border: 0;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.sc-login-btn-primary.sc-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
  text-decoration: none;
  transform: translateY(-1px);
}
.sc-login-btn-primary.sc-btn:active {
  transform: translateY(0);
}
.sc-login-btn-primary.sc-btn:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 3px;
}

.sc-login-btn-secondary.sc-btn {
  flex: 1 1 auto;
  min-height: 46px;
  min-width: 0;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  text-align: center;
  justify-content: center;
}
.sc-login-btn-secondary.sc-btn-ghost {
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
}
.sc-login-btn-secondary.sc-btn-ghost:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  text-decoration: none;
}

.sc-login-otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.sc-login-otp-form {
  flex: 1 1 calc(50% - 5px);
  min-width: min(100%, 160px);
  margin: 0;
}
.sc-login-otp-form .sc-btn { width: 100%; }
.sc-login-otp-actions > a.sc-btn {
  flex: 1 1 calc(50% - 5px);
  min-width: min(100%, 160px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 380px) {
  .sc-login-otp-form,
  .sc-login-otp-actions > a.sc-btn {
    flex: 1 1 100%;
  }
}

.sc-login-row-2.row {
  gap: 14px;
}

.sc-login-extra {
  margin-top: clamp(18px, 4vw, 24px);
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.sc-login-extra a {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
}
.sc-login-extra a:hover { color: #1d4ed8; }

.sc-login-footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(8px);
  padding: 14px 16px;
  color: #64748b;
  font-size: 11px;
}
.sc-login-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
@media (min-width: 640px) {
  .sc-login-footer-inner { text-align: left; }
}

