/* ===================================================================
   Linkit Partner Portal — theme extracted from letslinkit.com
   Font:   Plus Jakarta Sans
   Colors: ink #181c1c / navy #1c2434 · blue #2f6fed · teal #348180
           green #2ECC71 · red #d63636 · bg #f8f8f8
           tinted cards #F5F8FF · borders #D6E2F0 / #DBEAFE
   =================================================================== */

:root {
  --ink: #181c1c;
  --navy: #1c2434;
  --blue: #2f6fed;
  --teal: #348180;
  --green: #2ecc71;
  --red: #d63636;
  --muted: #636c6c;
  --muted-2: #6b7a90;
  --bg: #f4f7fc;
  --card-tint: #f8faff;
  --border: rgba(214, 226, 240, 0.7);
  --border-soft: rgba(219, 234, 254, 0.8);
  --teal-tint: #f0f6f6;
  --radius: 20px;
  --shadow: 0 2px 20px rgba(47, 111, 237, 0.04);
  --shadow-lg: 0 8px 32px rgba(47, 111, 237, 0.07);
  --page-pad-x: 14px;
  --page-pad-y: 36px;
  --section-gap: 36px;
}

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

html { -webkit-font-smoothing: antialiased; }

html { overflow-x: hidden; }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: #f7f9fd;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% -5%, rgba(219, 234, 254, 0.75), transparent 55%),
    radial-gradient(ellipse 60% 50% at 95% 10%, rgba(235, 242, 242, 0.6), transparent 50%),
    radial-gradient(ellipse 55% 45% at 50% 100%, rgba(219, 234, 254, 0.35), transparent 55%),
    linear-gradient(180deg, #fcfdff 0%, #f3f6fc 50%, #eef2f9 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232f6fed' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* =========================== SIDEBAR =========================== */

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(214, 226, 240, 0.5);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
}

.sidebar-logo { padding: 0 10px 50px; }
.sidebar-logo img { width: 150px; display: block; }
.wordmark { display: block; color: var(--ink, #102a2a); font-size: 1.35rem; letter-spacing: -0.04em; }

.portal-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--card-tint);
  border: 1px solid var(--border-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}

.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }

.nav-item:hover { background: rgba(245, 248, 255, 0.9); color: var(--ink); }

.nav-item.active {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(28, 36, 52, 0.12);
}

.nav-count {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--card-tint);
  color: var(--blue);
  border: 1px solid var(--border-soft);
  padding: 2px 9px;
  border-radius: 999px;
}

.nav-item.active .nav-count {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: transparent;
}

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }

.partner-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--card-tint);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 11px 13px;
}

.partner-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.partner-meta { display: flex; flex-direction: column; line-height: 1.3; }
.partner-meta strong { font-size: 13.5px; }
.partner-meta span { font-size: 11.5px; color: var(--muted-2); }

.terms-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 0 6px;
}
.terms-link:hover { text-decoration: underline; }

.logout-link {
  display: block;
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

/* =========================== MAIN =========================== */

.main {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: var(--page-pad-y) var(--page-pad-x) 52px;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  animation: fadeUp 0.35s ease;
  width: 100%;
}
.tab-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: var(--section-gap);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--card-tint);
  border: 1px solid var(--border-soft);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.page-header h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.accent { color: var(--blue); }

.sub { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 820px; line-height: 1.7; }

/* buttons */

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-dark { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-dark:hover { background: #0f1622; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-dark:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: #fff; }
.btn-lg { padding: 14px 32px; font-size: 15px; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(247, 249, 253, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
}
.loading-overlay.active { display: flex; }

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(47, 111, 237, 0.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.activity-empty {
  padding: 20px 4px !important;
  color: var(--muted-2);
  font-size: 13.5px;
  border-bottom: none !important;
}

.segmented button:disabled { opacity: 0.5; cursor: not-allowed; }

.link-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* =========================== CARDS / STATS =========================== */

.card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 34px 36px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-head h3 { font-size: 16.5px; font-weight: 700; }
.muted-small { font-size: 12px; color: var(--muted-2); font-weight: 500; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: var(--section-gap);
}

.stat-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  padding: 30px 32px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.stat-card:hover { background: rgba(255, 255, 255, 0.88); box-shadow: var(--shadow-lg); }

.stat-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.stat-foot { font-size: 13px; color: var(--muted-2); font-weight: 500; }

.stat-green .stat-value { color: #1da75b; }
.stat-red .stat-value { color: var(--red); }
.stat-blue .stat-value { color: var(--blue); }

.overview-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}

/* funnel */

.funnel { display: flex; flex-direction: column; gap: 20px; }

.funnel-row { display: grid; grid-template-columns: 100px 1fr 40px; align-items: center; gap: 16px; }
.funnel-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.funnel-track { height: 12px; background: var(--teal-tint); border-radius: 999px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.funnel-num { font-size: 13.5px; font-weight: 700; text-align: right; }

/* activity */

.activity-list { list-style: none; display: flex; flex-direction: column; }

.activity-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--teal-tint);
}
.activity-list li:last-child { border-bottom: none; }

.activity-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.activity-text { font-size: 13.5px; line-height: 1.45; }
.activity-text strong { font-weight: 700; }
.activity-when { margin-left: auto; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }

/* =========================== FORM =========================== */

.submit-split {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.form-card { padding: 40px 44px; display: flex; flex-direction: column; gap: 32px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.field { display: flex; flex-direction: column; gap: 10px; }

.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field label em { color: var(--red); font-style: normal; }

.field input,
.field select {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input::placeholder { color: #9ea3a3; }

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.field input.invalid,
.field select.invalid { border-color: var(--red); }

.field select:disabled,
.field input:disabled { opacity: 0.5; cursor: not-allowed; }

.segmented {
  display: inline-flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
}

.segmented button {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button.selected { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.segmented.invalid { border-color: var(--red); }

.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.form-note { font-size: 12.5px; color: var(--muted-2); line-height: 1.5; max-width: 320px; }
.form-note.hint-warn { color: #b07c1f; }

/* side info */

.side-info { display: flex; flex-direction: column; gap: 22px; }

.info-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 16px; }

.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 15px; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card-tint);
  border: 1px solid var(--border-soft);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps li strong { font-size: 13.5px; font-weight: 700; }
.steps li span { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

.quote-card { background: var(--teal-tint); border-color: transparent; }
.quote-card p { font-size: 14px; line-height: 1.65; color: var(--ink); font-weight: 500; }
.quote-card span { display: block; margin-top: 12px; font-size: 12.5px; color: var(--teal); font-weight: 700; }

/* =========================== TABLES =========================== */

.table-card { padding: 0; overflow: hidden; }
.table-card .card-head { padding: 28px 28px 0; margin-bottom: 18px; }

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--teal-tint);
  flex-wrap: wrap;
}

.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover { color: var(--ink); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.search-input {
  font-family: inherit;
  font-size: 13.5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12); background: #fff; }

.table-wrap {
  overflow-x: hidden;
  width: 100%;
  padding: 10px 20px 24px;
}

.leads-table th:first-child,
.leads-table td:first-child { padding-left: 28px; }
.leads-table th:last-child,
.leads-table td:last-child { padding-right: 28px; }

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.leads-table th {
  text-align: centre;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 20px 14px;
  border-bottom: 1px solid rgba(214, 226, 240, 0.5);
}

.leads-table td {
  padding: 19px 14px;
  border-bottom: 1px solid rgba(214, 226, 240, 0.35);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* leads table column widths */
#tab-leads .leads-table th:nth-child(1),
#tab-leads .leads-table td:nth-child(1) { width: 11%; }
#tab-leads .leads-table th:nth-child(2),
#tab-leads .leads-table td:nth-child(2) { width: 15%; }
#tab-leads .leads-table th:nth-child(3),
#tab-leads .leads-table td:nth-child(3) { width: 12%; }
#tab-leads .leads-table th:nth-child(4),
#tab-leads .leads-table td:nth-child(4) { width: 7%; }
#tab-leads .leads-table th:nth-child(5),
#tab-leads .leads-table td:nth-child(5) { width: 12%; }
#tab-leads .leads-table th:nth-child(6),
#tab-leads .leads-table td:nth-child(6) { width: 11%; }
#tab-leads .leads-table th:nth-child(7),
#tab-leads .leads-table td:nth-child(7) { width: 14%; }
#tab-leads .leads-table th:nth-child(8),
#tab-leads .leads-table td:nth-child(8) { width: 11%; }

/* commissions table column widths */
#tab-commissions .leads-table th:nth-child(1),
#tab-commissions .leads-table td:nth-child(1) { width: 16%; }
#tab-commissions .leads-table th:nth-child(2),
#tab-commissions .leads-table td:nth-child(2) { width: 22%; }
#tab-commissions .leads-table th:nth-child(3),
#tab-commissions .leads-table td:nth-child(3) { width: 16%; }
#tab-commissions .leads-table th:nth-child(4),
#tab-commissions .leads-table td:nth-child(4) { width: 16%; }
#tab-commissions .leads-table th:nth-child(5),
#tab-commissions .leads-table td:nth-child(5) { width: 16%; }

.leads-table tbody tr:last-child td { border-bottom: none; }
.leads-table tbody tr { transition: background 0.12s ease; }
.leads-table tbody tr:hover { background: var(--card-tint); }

.leads-table .num { text-align: centre; }
.leads-table td.num { font-weight: 700; }

.lead-name { font-weight: 700; }
.cell-muted { color: var(--muted-2); }

/* status badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
  max-width: 100%;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.badge-new       { background: var(--teal-tint); color: var(--teal); }
.badge-review    { background: #fdf3e3; color: #b07c1f; }
.badge-approved  { background: #e7f9ef; color: #1da75b; }
.badge-rejected  { background: #fdecec; color: var(--red); }
.badge-disbursed { background: var(--card-tint); color: var(--blue); }

.badge-paid   { background: #e7f9ef; color: #1da75b; }
.badge-unpaid { background: #fdf3e3; color: #b07c1f; }

.empty-state { padding: 36px 20px; text-align: center; font-size: 13.5px; color: var(--muted-2); }

/* =========================== COMMISSIONS =========================== */

.comm-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: var(--section-gap);
}

.comm-hero {
  background: linear-gradient(135deg, #1c2434 0%, #243044 100%);
  border-color: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 34px 36px !important;
}

.comm-hero .stat-label { color: rgba(255, 255, 255, 0.55); }

.comm-big { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }

.comm-bar { height: 12px; background: rgba(255, 255, 255, 0.14); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.comm-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #6ee7a8);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.comm-legend { display: flex; gap: 22px; font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.comm-legend strong { color: #fff; margin-left: 5px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }

.comm-mini { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: 32px !important; }
.comm-mid { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }

/* =========================== TOAST =========================== */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #1da75b; }
.toast.error { background: var(--red); }

/* =========================== AUTH =========================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.auth-page::before,
.auth-page::after {
  display: none;
}

.boot-error {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: 90vw;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--red);
  border-radius: 10px;
}

.auth-wrap {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 3;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 32px;
  position: relative;
  z-index: 3;
}

.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand img { width: 116px; display: block; margin: 0 auto; }
.auth-brand .portal-tag { margin-top: 12px; }

.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-head p { font-size: 14px; color: var(--muted); line-height: 1.55; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .field label em { color: var(--red); font-style: normal; }
.auth-form input {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
  background: #fff;
}
.auth-form input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214, 54, 54, 0.1);
}

.auth-error { font-size: 13px; font-weight: 600; color: var(--red); margin: -6px 0 0; }
.auth-submit { width: 100%; justify-content: center; }
.forgot-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.auth-foot { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--muted-2); }

/* =========================== RESPONSIVE =========================== */

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-split, .submit-split { grid-template-columns: 1fr; }
  .comm-grid { grid-template-columns: 1fr 1fr; }
  .comm-hero { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: column; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .main { padding: 28px 12px 40px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .stat-grid, .comm-grid { grid-template-columns: 1fr; }
}
