:root {
  --brand: #0f766e;
  --brand-dark: #0b544e;
  --brand-light: #14b8a6;
  --sidebar-bg: #0f2027;
  --sidebar-bg2: #16333a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #14b8a6;
  --bg-soft: #f4f7f8;
  --card-radius: 0.9rem;
}

body {
  background-color: var(--bg-soft);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--brand) 100%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

/* ---------- App shell ---------- */
.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 250px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  z-index: 1030;
  overflow-y: auto;
  transition: transform .2s ease;
}
.app-sidebar .brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.1rem 1.2rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.app-sidebar .brand .badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.app-sidebar .nav-link {
  color: var(--sidebar-text);
  padding: .65rem 1.2rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .93rem;
  border-left: 3px solid transparent;
}
.app-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.app-sidebar .nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.app-sidebar .nav-link.active {
  background: rgba(20,184,166,.15);
  color: #fff;
  border-left-color: var(--sidebar-active);
}
.app-sidebar .nav-section-title {
  color: #64798a;
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .08em;
  padding: 1rem 1.2rem .35rem;
}

.app-main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid #e5eaee;
  padding: .7rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.app-content { padding: 1.4rem; flex: 1; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
}

/* ---------- Cards / widgets ---------- */
.card { border: none; border-radius: var(--card-radius); box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); }
.stat-card { border-radius: var(--card-radius); padding: 1.1rem 1.3rem; color: #fff; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-card.bg-a { background: linear-gradient(135deg,#0f766e,#14b8a6); }
.stat-card.bg-b { background: linear-gradient(135deg,#1e3a8a,#3b82f6); }
.stat-card.bg-c { background: linear-gradient(135deg,#92400e,#f59e0b); }
.stat-card.bg-d { background: linear-gradient(135deg,#7f1d1d,#ef4444); }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.section-title { font-weight: 600; color: #0f2027; }
.table thead th { text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; color: #64798a; border-bottom-width: 1px; }
.badge-status-FIT { background: #d1fae5; color: #065f46; }
.badge-status-UNFIT { background: #fee2e2; color: #991b1b; }
.badge-status-TEMP_UNFIT { background: #fef3c7; color: #92400e; }
.badge-status-PENDING { background: #e5e7eb; color: #374151; }

.form-section-card { border-radius: var(--card-radius); }
.form-section-header { background: #f0faf9; border-bottom: 1px solid #e2f1ef; font-weight: 600; color: var(--brand-dark); padding: .6rem 1rem; border-radius: var(--card-radius) var(--card-radius) 0 0; }

.photo-drop {
  width: 140px; height: 168px;
  border: 2px dashed #c9d4d8;
  border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #fafcfc;
  cursor: pointer;
  position: relative;
}
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop .placeholder { text-align: center; color: #97a5ab; font-size: .8rem; }

.sig-preview { max-height: 60px; max-width: 160px; object-fit: contain; }
