:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #fbfcff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5eaf3;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --danger: #dc2626;
  --warn: #f59e0b;
  --success: #16a34a;

  --radius: 12px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

small {
  color: var(--muted);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.12);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--primary);
}

.brandTitle {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brandTitle strong {
  font-size: 14px;
}

.brandTitle span {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}

.nav a:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.nav a.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--primary-600);
  font-weight: 700;
}

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

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.alert-success {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.alert-danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
}

.alert-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.alert-info {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#topbar-clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.user-handle {
  font-size: 13px;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-inline a {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
}
.nav-inline a:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.nav-inline a.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--primary-600);
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  display: grid;
  place-items: center;
  font-weight: 800;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }
  .topbar-center {
    width: 100%;
    justify-content: flex-start;
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}

.container {
  max-width: 1180px;
  width: 100%;
  margin: 18px auto;
  padding: 0 18px 44px;
}

.hrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hrow h1 {
  margin: 0;
  font-size: 20px;
}

.hrow p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cardHead {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cardHead h2 {
  margin: 0;
  font-size: 14px;
}

.cardHead p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.cardBody {
  padding: 14px 16px;
}

.grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
}

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

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.05s ease, background 0.15s ease, border 0.15s ease;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.06);
}

.btn.primary:hover {
  background: var(--primary-600);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.18);
  color: var(--danger);
}

.btn.warn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
  color: #92400e;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 11px;
  outline: none;
  font-size: 13px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row > * {
  flex: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.ok {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.18);
  color: var(--success);
}

.pill.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #92400e;
}

.pill.bad {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.18);
  color: var(--danger);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.table tr:hover td {
  background: var(--surface-2);
}

.mono {
  font-family: var(--mono);
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
}

.modal {
  width: min(760px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modalHead {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modalHead h3 {
  margin: 0;
  font-size: 14px;
}

.modalHead p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.modalBody {
  padding: 14px 16px;
}

.modalFoot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  display: none;
  z-index: 1100;
  font-size: 13px;
  font-weight: 700;
}
/* --------------------------------------------
   Utilities (Bootstrap replacements)
-------------------------------------------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.wrap { flex-wrap: wrap; }

.gap-1 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-0 { margin-bottom: 0; }
.my-3 { margin: 12px 0; }

.hidden { display: none !important; }
.text-left { text-align: left; }
.small { font-size: 12px; }
.text-muted { color: var(--muted); }

/* --------------------------------------------
   Buttons: small size (used across templates)
-------------------------------------------- */
.btn.sm {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

/* --------------------------------------------
   Forms: grid system (replaces row/col-md-*)
-------------------------------------------- */
.formGrid {
  display: grid;
  gap: 12px;
}

.formGrid-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 980px) {
  .formGrid-2 { grid-template-columns: 1fr; }
}

.span-2 { grid-column: span 2; }

@media (max-width: 980px) {
  .span-2 { grid-column: auto; }
}

.formHelp {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* --------------------------------------------
   Table wrapper (replaces table-responsive)
-------------------------------------------- */
.tableWrap {
  width: 100%;
  overflow-x: auto;
}

/* Optional: header background like "table-light" */
.table thead th {
  background: rgba(15, 23, 42, 0.03);
}

/* -----------------------------
   Layout helpers (Bootstrap-free)
------------------------------ */
.section {
  padding: 22px 0;
}

.section.alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* simple flex utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.wrap { flex-wrap: wrap; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 14px; }

/* grid helpers for "cards" sections */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* hero */
.hero {
  background: radial-gradient(80% 80% at 10% 10%, rgba(37, 99, 235, .10) 0%, rgba(255,255,255,0) 60%),
              linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 60%);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.heroTitle {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: 0.2px;
}
@media (max-width: 620px) {
  .heroTitle { font-size: 22px; }
}

/* "feature box" in hero */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}

/* icon bubble */
.icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.10);
  display: grid;
  place-items: center;
  font-size: 18px;
}

/* tags/badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.03);
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

/* consultant card bits */
.consultantRow {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}
.consultantImg {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.04);
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
  border: 0;
}

/* buttons: outline variant */
.btn.outline {
  background: transparent;
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary-600);
}
.btn.outline:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
}

/* buttons: size variants */
.btn.lg { padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.btn.sm { padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }

/* forms: reuse your inputs; make a nice two-column contact layout */
.formGrid {
  display: grid;
  gap: 12px;
}
.formGrid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 980px) {
  .formGrid-2 { grid-template-columns: 1fr; }
}
.span-2 { grid-column: span 2; }
@media (max-width: 980px) { .span-2 { grid-column: auto; } }

/* footer links */
.footerLinks {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .footerLinks { justify-content: flex-start; }
}
