:root {
  --navy: #102a43;
  --navy-dark: #071b2f;
  --navy-mid: #1d4e73;
  --gold: #c7a24a;
  --gold-light: #f0d98a;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172b3d;
  --text-muted: #6b7c8f;
  --border: #e4ebf1;
  --success: #2a8a68;
  --danger: #c35d5d;
  --shadow-sm: 0 4px 16px rgba(16, 42, 67, .06);
  --shadow-md: 0 14px 36px rgba(16, 42, 67, .10);
}

* {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 86% -10%, rgba(199, 162, 74, .10), transparent 26rem),
    var(--bg);
  color: var(--ink);
  margin: 0;
}

a {
  color: var(--navy-mid);
}

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

/* ===== Sidebar ===== */
.sidebar {
  width: 264px;
  background:
    radial-gradient(circle at 18% 4%, rgba(240, 217, 138, .13), transparent 13rem),
    linear-gradient(180deg, #123653 0%, var(--navy-dark) 100%);
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 8px 0 28px rgba(7, 27, 47, .12);
  scrollbar-color: rgba(240, 217, 138, .35) transparent;
}

.sidebar-brand {
  min-height: 76px;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.1px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-light);
}

.sidebar-brand i {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 217, 138, .36);
  border-radius: 11px;
  background: rgba(240, 217, 138, .10);
  font-size: 1.05rem;
}

.sidebar-nav {
  padding: 15px 12px 24px;
}

.sidebar-nav .nav-link {
  color: rgba(255,255,255,.72);
  padding: 11px 14px;
  margin: 3px 0;
  font-size: .88rem;
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-nav .nav-link i {
  width: 20px;
  color: rgba(240, 217, 138, .78);
  font-size: .98rem;
  text-align: center;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.09);
  color: #fff;
  transform: translateX(-2px);
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(199,162,74,.24), rgba(199,162,74,.07));
  border-color: rgba(240,217,138,.23);
  color: #fff;
  box-shadow: inset -3px 0 0 var(--gold);
}

.sidebar-nav .nav-link.active i {
  color: var(--gold-light);
}

.sidebar-nav .support-nav-item {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.sidebar-nav .support-nav-item[hidden] {
  display: none !important;
}

.sidebar-nav .support-nav-link {
  color: #c7ebd0;
}

.sidebar-nav .support-nav-link i {
  color: #86d6a0;
}

.sidebar-nav .support-nav-link:hover {
  color: #fff;
  border-color: rgba(134,214,160,.28);
  background: rgba(33,115,70,.18);
}

/* ===== Main content ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  min-height: 76px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(228,235,241,.85);
  padding: 14px 30px;
  box-shadow: 0 4px 18px rgba(16,42,67,.04);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h5 {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -.2px;
}

.topbar .dropdown-toggle {
  border-color: var(--border);
  color: var(--navy);
  background: rgba(255,255,255,.72);
  border-radius: 10px;
  padding-inline: 12px;
}

.topbar .dropdown-toggle:hover,
.topbar .dropdown-toggle:focus {
  border-color: rgba(199,162,74,.65);
  background: #fff;
}

.page-content {
  width: 100%;
  max-width: 1680px;
  padding: 30px;
  flex: 1;
}

.page-footer {
  padding: 18px 30px;
  background: rgba(255,255,255,.78);
  border-top: 1px solid var(--border);
}

/* ===== Cards / KPIs ===== */
.card {
  border: 1px solid rgba(228,235,241,.9);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  font-weight: 700;
  color: var(--navy);
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

.kpi-card {
  min-height: 128px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  color: #fff;
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}

.kpi-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  left: -54px;
  bottom: -88px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  z-index: -1;
}

a:hover .kpi-card,
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(16,42,67,.16);
}

.kpi-card.navy { background: linear-gradient(135deg, #153b5c, #0b2545); }
.kpi-card.gold { background: linear-gradient(135deg, #d1ae55, #a67e25); }
.kpi-card.green { background: linear-gradient(135deg, #339a74, #1c6e53); }
.kpi-card.red { background: linear-gradient(135deg, #cf6e6e, #a33f4c); }
.kpi-card .kpi-value {
  margin: 7px 0 3px;
  font-size: 1.72rem;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -.5px;
}
.kpi-card .kpi-label {
  opacity: .88;
  font-size: .82rem;
}

/* ===== Controls ===== */
.btn {
  border-radius: 9px;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 5px 12px rgba(16,42,67,.14);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  box-shadow: 0 8px 18px rgba(16,42,67,.20);
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 5px 12px rgba(166,126,37,.16);
}

.btn-gold:hover,
.btn-gold:focus {
  background: #a67e25;
  border-color: #a67e25;
  color: #fff;
}

.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger {
  border-color: var(--border);
  color: var(--text-muted);
  background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover {
  border-color: currentColor;
}

.pwa-install-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pwa-install-button[hidden] {
  display: none !important;
}

.form-control,
.form-select {
  border-color: #d9e3eb;
  border-radius: 9px;
  color: var(--ink);
  min-height: 40px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(199,162,74,.9);
  box-shadow: 0 0 0 .22rem rgba(199,162,74,.15);
}

.form-label {
  color: #3c5265;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.permission-option {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e9ef;
  border-radius: 9px;
  background: #fff;
  color: #3c5265;
  cursor: pointer;
  font-size: .82rem;
}

.permission-option:has(input:checked) {
  border-color: rgba(199,162,74,.65);
  background: #fffaf0;
  color: var(--navy);
}

.permission-option.is-disabled {
  opacity: .48;
  cursor: not-allowed;
  background: #f2f5f7;
}

.permission-option i {
  color: var(--gold);
}

.quick-client-panel {
  padding: 17px;
  border: 1px solid #ead79d;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffdf7, #fbf7e9);
}

/* ===== Tables / states ===== */
.table-responsive {
  border-radius: inherit;
}

table {
  color: var(--ink);
}

table thead {
  background: linear-gradient(90deg, #173f60, #0f2d49);
  color: #fff;
}

table thead th {
  border: none;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1px;
  padding: 13px 14px;
  white-space: nowrap;
}

table tbody td {
  border-color: #edf1f4;
  padding: 13px 14px;
  font-size: .87rem;
}

.table-hover > tbody > tr:hover {
  --bs-table-hover-bg: #fbf8ef;
}

.badge {
  border-radius: 999px;
  font-weight: 600;
  padding: .42em .72em;
}

.alert {
  border: 1px solid transparent;
  border-radius: 11px;
}

.modal-content {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(7,27,47,.22);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  border-bottom-color: var(--border);
}

.modal-footer {
  background: var(--surface-soft);
  border-top-color: var(--border);
}

/* ===== Login / first-run setup ===== */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  overflow-x: clip;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(240,217,138,.14), transparent 18rem),
    radial-gradient(circle at 88% 84%, rgba(75,145,174,.22), transparent 24rem),
    linear-gradient(135deg, #081c31 0%, #123c5e 54%, #0c2b47 100%);
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(240,217,138,.18);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page::before {
  width: 520px;
  height: 520px;
  top: -250px;
  right: -170px;
}

.auth-page::after {
  width: 380px;
  height: 380px;
  bottom: -220px;
  left: -120px;
}

.auth-shell {
  width: min(100%, 430px);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 70px rgba(3,15,28,.30);
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.auth-shell .card-body {
  padding: 34px 34px 28px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 26px;
}

.auth-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  color: #a67e25;
  background: linear-gradient(135deg, #fff9e9, #f7edc7);
  border: 1px solid #ead79d;
  font-size: 1.8rem;
  box-shadow: 0 8px 18px rgba(166,126,37,.12);
}

.auth-title {
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 750;
  margin: 15px 0 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: .82rem;
  margin: 0;
}

.auth-form .btn {
  min-height: 44px;
  margin-top: 5px;
}

.auth-hint {
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.7;
}

.notification-count { position:absolute; top:-5px; right:-5px; font-size:.62rem; }
.task-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.calendar-weekday { font-size:.72rem; color:var(--text-muted); text-align:center; padding:6px 0; }
.calendar-day { min-height:78px; border:1px solid var(--border); border-radius:8px; padding:5px; background:#fff; font-size:.78rem; overflow:hidden; }
.calendar-day strong { color:var(--navy); display:block; margin-bottom:4px; }
.calendar-task { display:block; background:#eef3f7; border-right:3px solid var(--gold); border-radius:3px; padding:2px 3px; margin:2px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.68rem; }
.priority-urgent { background:#f5d4d4; color:#8a2f2f; }.priority-high { background:#f7e5bf;color:#765315; }.priority-medium { background:#dceaf3;color:#24516e; }.priority-low { background:#e3eee8;color:#28634f; }
.portal-page { background:radial-gradient(circle at 90% 0,rgba(199,162,74,.16),transparent 25rem),var(--bg); min-height:100vh; }
.portal-shell { width:min(1180px,calc(100% - 32px)); margin:auto; padding:34px 0 60px; }
.portal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; }
.portal-kicker { color:#a67e25; font-size:.78rem; font-weight:700; letter-spacing:.08em; }.portal-header h1{color:var(--navy);font-weight:750;margin:.35rem 0}
.portal-mark { color:var(--gold); font-size:2.6rem; border:1px solid #ead79d; padding:16px; border-radius:18px; background:#fffaf0; }
.portal-stat-row { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }.portal-stat{background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px;box-shadow:var(--shadow-sm)}.portal-stat span,.portal-stat strong{display:block}.portal-stat span{font-size:.78rem;color:var(--text-muted)}.portal-stat strong{font-size:1.6rem;color:var(--navy);margin-top:5px}
.portal-list-item { display:flex; flex-direction:column; gap:4px; border-bottom:1px solid var(--border); padding:12px 0; }.portal-list-item:last-child{border-bottom:0}.signature-canvas{width:100%;height:160px;border:1px dashed #b9c7d2;border-radius:9px;background:#fff;touch-action:none}
.portal-engineering-record{padding:14px 0;border-bottom:1px solid var(--border)}.portal-engineering-record:last-child{border-bottom:0;padding-bottom:0}.portal-engineering-heading{display:flex;flex-direction:column;gap:3px;margin-bottom:12px}.portal-engineering-heading strong{color:var(--navy)}.portal-engineering-group+.portal-engineering-group{margin-top:14px}.portal-engineering-group-title{font-size:.9rem;font-weight:700;color:var(--text-muted);margin:0 0 8px}.portal-engineering-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:10px}.portal-engineering-gallery img{display:block;width:100%;height:220px;object-fit:cover;border:1px solid var(--border);border-radius:10px;background:#f4f6f8}
@media(max-width:575px){.portal-shell{width:calc(100% - 22px);padding-top:22px}.portal-header{align-items:flex-start}.portal-mark{font-size:1.5rem;padding:10px}.portal-stat-row{gap:7px}.portal-stat{padding:11px}.portal-stat strong{font-size:1.2rem}.calendar-day{min-height:58px}}

@media (max-width: 991.98px) {
  html,
  body {
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    right: -264px;
    z-index: 1050;
    transition: right .25s ease;
  }

  .sidebar.show {
    right: 0;
  }

  .topbar {
    padding-inline: 18px;
  }

  .page-content {
    padding: 20px 16px;
  }

  .page-footer {
    padding-inline: 16px;
  }

  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .pwa-install-button span {
    display: none;
  }

  .topbar {
    min-height: 68px;
  }

  .topbar h5 {
    font-size: .96rem;
  }

  .kpi-card {
    min-height: 112px;
    padding: 15px;
  }

  .kpi-card .kpi-value {
    font-size: 1.35rem;
  }

  .card-header,
  .card-body {
    padding: 15px;
  }

  .auth-page {
    padding: 15px;
  }

  .auth-shell .card-body {
    padding: 28px 22px 23px;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Dashboard overview ===== */
.dashboard-page {
  background: #f4f6f9;
}

.dashboard-content {
  max-width: 1680px;
  margin-inline: auto;
}

.dashboard-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 3px 0 26px;
}

.dashboard-intro h1 {
  margin: 5px 0 6px;
  color: var(--navy);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -.035em;
}

.dashboard-intro p,
.dashboard-section-heading p,
.dashboard-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #638092;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .015em;
}

.dashboard-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 13px;
}

.dashboard-section-heading h2,
.dashboard-panel-heading h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.06rem;
  font-weight: 800;
}

.dashboard-section-heading p {
  font-size: .82rem;
}

.dashboard-summary-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.dashboard-primary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 154px;
  height: 100%;
  padding: 19px 20px 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 17px;
  box-shadow: 0 5px 18px rgba(26, 47, 68, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-primary-card::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  content: "";
  background: var(--metric-accent, #1f74ad);
}

.dashboard-primary-card:hover,
.dashboard-summary-link:hover .dashboard-summary-card,
.dashboard-claim-metric:hover {
  transform: translateY(-2px);
  border-color: #d6dfe8;
  box-shadow: 0 12px 25px rgba(26, 47, 68, .085);
}

.dashboard-summary-link:focus-visible,
.dashboard-claim-metric:focus-visible {
  outline: 3px solid rgba(31, 116, 173, .28);
  outline-offset: 3px;
  border-radius: 18px;
}

.tone-navy { --metric-accent: #173b5a; }
.tone-green { --metric-accent: #25825e; }
.tone-amber { --metric-accent: #ba8b26; }
.tone-blue { --metric-accent: #267da4; }

.dashboard-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-metric-label,
.dashboard-summary-label {
  color: #68798a;
  font-size: .83rem;
  font-weight: 650;
}

.dashboard-metric-icon,
.dashboard-summary-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: var(--metric-accent, #1f74ad);
  background: color-mix(in srgb, var(--metric-accent, #1f74ad) 10%, white);
  font-size: 1.05rem;
}

.dashboard-primary-value {
  margin: 11px 0 10px;
  color: #172d42;
  direction: ltr;
  text-align: right;
  font-size: clamp(1.55rem, 2.25vw, 2rem);
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -.035em;
}

.dashboard-metric-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: #8794a2;
  font-size: .72rem;
}

.dashboard-metric-footer span:first-child {
  color: var(--metric-accent, #1f74ad);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-metric-footer span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-charts {
  align-items: stretch;
}

.dashboard-panel {
  border: 1px solid #e6ebf0;
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(26, 47, 68, .045);
}

.dashboard-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 19px 21px 15px;
  border-bottom: 1px solid #edf0f3;
}

.dashboard-panel-heading h2 {
  margin-top: 4px;
}

.dashboard-panel-heading p {
  font-size: .8rem;
}

.dashboard-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e8edf2;
  border-radius: 999px;
  color: #647587;
  background: #f8fafb;
  font-size: .72rem;
  white-space: nowrap;
}

.dashboard-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #28749a;
  font-size: .77rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-inline-link:hover {
  color: #174d6d;
  text-decoration: underline;
}

.dashboard-chart-wrap {
  position: relative;
  height: 250px;
  margin: 3px 16px 14px;
}

.dashboard-status-chart-wrap {
  position: relative;
  height: 305px;
  margin: 5px 15px 13px;
}

.dashboard-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #8a98a6;
  text-align: center;
}

.dashboard-chart-empty[hidden] {
  display: none !important;
}

.dashboard-summary-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: center;
  column-gap: 12px;
  min-height: 116px;
  height: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(26, 47, 68, .035);
  transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-summary-icon {
  grid-row: 1 / span 3;
}

.tone-icon-blue { --metric-accent: #267da4; }
.tone-icon-red { --metric-accent: #b65a55; }
.tone-icon-green { --metric-accent: #25825e; }
.tone-icon-amber { --metric-accent: #ba8b26; }

.dashboard-summary-card strong {
  margin-top: 3px;
  color: #1c344a;
  direction: ltr;
  text-align: right;
  font-size: 1.38rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dashboard-summary-card .dashboard-summary-money {
  font-size: 1.12rem;
}

.dashboard-summary-card small {
  color: #8a97a3;
  font-size: .7rem;
}

.dashboard-claims-panel {
  overflow: hidden;
}

.dashboard-claims-grid {
  padding: 4px 6px;
}

.dashboard-claim-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 92px;
  padding: 17px 20px;
  color: inherit;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}

.dashboard-claim-metric + .dashboard-claim-metric {
  border-inline-start: 1px solid #edf0f3;
}

.dashboard-claim-metric:hover {
  color: inherit;
  background: #f8fafb;
}

.dashboard-claim-metric span {
  color: #7d8b98;
  font-size: .77rem;
}

.dashboard-claim-metric strong {
  color: #20374b;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-claim-metric small {
  color: #8b98a4;
  font-size: .66rem;
}

.dashboard-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 59px;
  padding: 14px 20px;
  border-bottom: 1px solid #edf0f3;
  color: var(--navy);
  font-weight: 800;
}

.dashboard-list-heading > small {
  color: #8996a2;
  font-size: .72rem;
  font-weight: 500;
}

.dashboard-page .list-group-item {
  padding: 13px 19px;
  border-color: #eff2f5;
  font-size: .85rem;
}

.dashboard-page #stageDistribution > div > div {
  min-width: 132px !important;
  padding: 14px 12px !important;
  background: #f8fafb;
  border-color: #e9eef2 !important;
  border-radius: 13px !important;
}

.dashboard-page #recentProjectsBody td,
.dashboard-page .table thead th {
  padding: 13px 16px;
  white-space: nowrap;
}

.dashboard-page .table thead th {
  color: #697b8c;
  background: #f8fafb;
  font-size: .78rem;
  font-weight: 750;
}

@media (max-width: 767.98px) {
  .dashboard-intro {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 21px;
  }

  .dashboard-primary-card {
    min-height: 145px;
    padding: 16px;
  }

  .dashboard-panel-heading {
    padding: 16px;
  }

  .dashboard-claim-metric {
    padding: 14px;
  }

  .dashboard-claim-metric:nth-child(3) {
    border-inline-start: 0;
  }

  .dashboard-claim-metric:nth-child(n + 3) {
    border-top: 1px solid #edf0f3;
  }
}

@media (max-width: 575.98px) {
  .dashboard-primary-card {
    min-height: 139px;
    padding: 14px 13px;
  }

  .dashboard-metric-label,
  .dashboard-summary-label {
    font-size: .75rem;
  }

  .dashboard-metric-icon,
  .dashboard-summary-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .dashboard-primary-value {
    font-size: 1.42rem;
  }

  .dashboard-metric-footer {
    font-size: .65rem;
  }

  .dashboard-summary-card {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    min-height: 111px;
    padding: 12px 10px;
  }

  .dashboard-summary-card strong {
    font-size: 1.18rem;
  }

  .dashboard-summary-card .dashboard-summary-money {
    font-size: .92rem;
  }

  .dashboard-chart-wrap {
    height: 220px;
    margin-inline: 8px;
  }

  .dashboard-status-chart-wrap {
    height: 285px;
    margin-inline: 6px;
  }

  .dashboard-panel-heading p,
  .dashboard-list-heading > small {
    display: none;
  }

  .dashboard-claims-grid {
    row-gap: 0;
  }

  .dashboard-claim-metric {
    min-height: 84px;
    padding: 12px 10px;
  }

  .dashboard-claim-metric strong {
    font-size: .95rem;
  }
}

.signature-methods{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0 12px;padding:4px;background:#f3f6f9;border-radius:10px}.signature-method{display:flex;justify-content:center;align-items:center;gap:6px;padding:9px 6px;border-radius:7px;font-size:.8rem;color:var(--text-muted);cursor:pointer}.signature-method:has(input:checked){background:#fff;color:var(--navy);box-shadow:var(--shadow-sm);font-weight:700}.signature-method input{accent-color:var(--gold)}.signature-typed-preview{min-height:72px;padding:12px 16px;border:1px solid #ead79d;border-radius:10px;background:#fffaf0;color:var(--navy);font-family:"Brush Script MT","Segoe Script",cursive;font-size:2rem}.signature-image-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.signature-image-preview img{max-width:100%;height:100px;object-fit:contain;border:1px solid var(--border);border-radius:8px;background:#fff;padding:5px}
.contract-signing-steps{font-size:.75rem;color:var(--text-muted);background:#f8fafc;border:1px solid var(--border);border-radius:9px;padding:9px 10px;margin-bottom:12px;text-align:center}.signature-required-title{font-weight:750;color:var(--navy);margin:8px 0}.modal-footer .btn-primary:disabled{opacity:.45;cursor:not-allowed;transform:none}.btn-primary.is-ready{box-shadow:0 7px 18px rgba(16,42,67,.22)}
