/* SignalPoint portal — brand design language (SP Brand Guide v1, Apr 2026).
   Poppins type, primary blue #375B95 + gray #737478, cool #F0F2F4 neutrals,
   secondary green/orange/gold/sky accents, soft radii, subtle shadows,
   fill-defined (borderless) cards. */

:root {
  --color-text: #1b1c1e;

  /* Brand primary blue (#375B95) — active states, links, buttons, brand dot.
     Legacy --color-blue* names kept so existing rules pick up the brand hue. */
  --color-blue: #375b95;
  --color-blue-400: #2a97cf;   /* brand sky — lighter states */
  --color-blue-300: #2c4a78;   /* deep — pressed */
  --color-blue-hover: #2c4a78; /* darker blue on hover */

  /* Brand secondary set (charts, metric cards, accents). */
  --color-purple: #2a97cf;   /* sky blue */
  --color-pink: #e3a527;     /* gold */
  --color-green: #0b6a4a;    /* brand green */
  --color-orange: #e38b27;   /* brand orange */
  --color-yellow: #e3a527;   /* brand gold */
  --color-red: #c0392b;

  --gray-800: #1b1c1e;
  --gray-700: #3a3d42;
  --gray-300: #c4c7cc;
  --gray-mid: #737478;       /* brand secondary gray */
  --border: rgba(17, 24, 39, 0.10);
  --border-hover: rgba(17, 24, 39, 0.24);

  --bg-page: #f0f2f4;        /* brand off-white page */
  --canvas: #ffffff;         /* clean white card */
  --surface: #e7ebf1;        /* cool gray — headers, stripes, hover */

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;

  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: "Inconsolata", "SF Mono", ui-monospace, monospace;

  /* Brand gradient (#375B95 → #2A97CF) for accent surfaces. */
  --brand-gradient: linear-gradient(135deg, #375b95, #2a97cf);

  /* Subtle, not the old 5-layer cascade. */
  --shadow-card:
    rgba(0, 0, 0, 0.03) 0px 1px 2px,
    rgba(0, 0, 0, 0.05) 0px 10px 28px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--color-text);
  background: var(--bg-page);
  line-height: 1.6;
  letter-spacing: -0.16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Layout ---- */
.topbar {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}
.signin-logo {
  height: 52px;
  width: auto;
  display: block;
  margin-bottom: 28px;
}
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
/* Wide layout for data-table pages (report viewer, admin, client portal).
   On laptops (where 80vw < 1500px) it stays full-width like the reading column;
   on large monitors it grows to fill ~80% of the screen instead of being boxed. */
.wrap.wide {
  max-width: max(1500px, 80vw);
}

/* ---- Typography ---- */
.eyebrow {
  text-transform: uppercase;
  font-size: 12.8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--color-blue);
  margin: 0 0 12px;
}
h1 {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.8px;
  margin: 0 0 16px;
}
.lead { font-size: 20px; color: var(--gray-700); margin: 0 0 40px; max-width: 56ch; }
h2 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 0 0 4px; }
.label {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gray-mid);
  display: block;
  margin-bottom: 8px;
}

/* ---- Card ---- */
.card {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--canvas);
  padding: 32px;
  margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }

/* ---- Data table (shared: admin oversight, client detail, client portal) ---- */
.tablewrap { overflow-x: auto; }
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.mtable th, .mtable td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.mtable th { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-mid); }
.mtable td.num, .mtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mtable tbody tr:hover { background: var(--surface); }
.mtable tbody tr.rowlink[data-href] { cursor: pointer; }
.carrier-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.carrier-tag.verizon_vz { background: #fdece7; color: #b4492e; }
.carrier-tag.att { background: #e7eef7; color: #1f4470; }

/* ---- Form ---- */
.field { margin-bottom: 24px; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; }

input[type="text"],
input[type="email"],
input[type="file"],
select {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(55, 91, 149, 0.18);
}

/* Native selects render inconsistently; strip the OS chrome and draw our own
   chevron so they match the text inputs. */
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23736e66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select:hover { border-color: var(--border-hover); }
input[type="file"] { padding: 9px 14px; cursor: pointer; }
input[type="file"]::file-selector-button {
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  margin-right: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
input[type="file"]::file-selector-button:hover { border-color: var(--border-hover); }
.hint { font-size: 14px; color: var(--gray-300); margin-top: 6px; }

/* ---- Button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 550;
  border-radius: 999px;
  padding: 12px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--gray-800); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--border-hover); }
.btn-ghost:hover { border-color: var(--color-text); background: rgba(34, 34, 34, 0.03); }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  background: rgba(34, 34, 34, 0.06);
  color: var(--gray-mid);
  font-size: 12.8px;
  font-weight: 550;
  border-radius: var(--radius);
  padding: 3px 9px;
}
.badge-zero { background: rgba(90, 90, 90, 0.1); color: var(--gray-mid); }

/* ---- Summary table ---- */
.stat-row { display: flex; gap: 16px; margin: 8px 0 32px; }
.stat {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat .num { font-size: 32px; font-weight: 600; line-height: 1; }
.stat .label { margin-top: 10px; margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th {
  text-align: left;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gray-mid);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Alert ---- */
.alert {
  border: 1px solid var(--color-red);
  background: rgba(238, 29, 54, 0.06);
  color: var(--color-red);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 16px;
}
.alert code { font-family: var(--font-mono); font-size: 14px; }

.actions { display: flex; gap: 12px; margin-top: 32px; }

@media (max-width: 768px) {
  h1 { font-size: 40px; }
  .row, .stat-row { flex-direction: column; }
}

/* Top navigation (portal/admin) */
.topbar { display:flex; align-items:center; justify-content:space-between; }
.topnav { display:flex; gap:18px; }
.topnav a { color:var(--gray-mid); text-decoration:none; font-size:14px; font-weight:500; }
.topnav a:hover { color:var(--color-blue); }
