:root {
  --brand:       #1a6b8a;
  --brand-dark:  #124e66;
  --brand-light: #e8f4f8;
  --success-bg:  #d1fae5;
  --warning-bg:  #fef3c7;
  --danger-bg:   #fee2e2;
}

/* ── base ── */
body { background: #f5f7fa; font-size: 0.92rem; }

/* ── navbar ── */
.navbar { background: var(--brand-dark) !important; }
.navbar-brand { font-weight: 700; letter-spacing: .03em; color: #fff !important; }
.navbar .nav-link { color: rgba(255,255,255,.82) !important; }
.navbar .nav-link:hover,
.navbar .nav-link.active { color: #fff !important; }

/* ── cards ── */
.card { border: none; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.card-header { border-radius: 12px 12px 0 0 !important; background: var(--brand-light); border-bottom: 1px solid #cde4ee; }

/* ── stat tiles ── */
.stat-tile { border-radius: 12px; padding: 1.2rem 1.4rem; }
.stat-tile .stat-value { font-size: 2.4rem; font-weight: 700; line-height: 1; }
.stat-tile .stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-top: .2rem; }
.tile-total    { background: var(--brand); color: #fff; }
.tile-success  { background: var(--success-bg); color: #065f46; }
.tile-compl    { background: var(--danger-bg);  color: #991b1b; }
.tile-teaching { background: var(--warning-bg); color: #92400e; }

/* ── badges ── */
.badge-none    { background: #d1fae5; color: #065f46; }
.badge-minor   { background: #fef3c7; color: #92400e; }
.badge-major   { background: #fee2e2; color: #991b1b; }
.badge-success { background: #dbeafe; color: #1e3a8a; }
.badge-partial { background: #fef3c7; color: #92400e; }
.badge-abandoned { background: #f3e8ff; color: #6b21a8; }
.badge-independent { background: #dcfce7; color: #14532d; }
.badge-supervised  { background: #e0f2fe; color: #0c4a6e; }
.badge-teaching    { background: #fef9c3; color: #713f12; }

.badge-compl { font-size: .78rem; padding: .3em .65em; border-radius: 6px; font-weight: 600; }

/* ── table ── */
.table-procedures th { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table-procedures td { vertical-align: middle; }
.table-procedures tbody tr:hover { background: #f0f8fc; }

/* ── filter bar ── */
.filter-bar { background: #fff; border-radius: 12px; padding: 1rem 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* ── form ── */
.form-label { font-weight: 500; color: #374151; font-size: .85rem; }
.form-control, .form-select {
  border-radius: 8px;
  border-color: #d1d5db;
  font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,107,138,.15);
}

/* ── buttons ── */
.btn-brand { background: var(--brand); color: #fff; border: none; border-radius: 8px; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

/* ── chart container ── */
.chart-wrap { position: relative; height: 220px; }

/* ── view detail ── */
.detail-row { display: flex; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid #f0f0f0; }
.detail-label { width: 170px; min-width: 170px; font-weight: 600; color: #6b7280; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.detail-value { color: #111827; }

/* ── empty state ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: #9ca3af; }
.empty-state i { font-size: 3rem; margin-bottom: .75rem; display: block; }

/* ── mobile tweaks ── */
@media (max-width: 576px) {
  .stat-tile .stat-value { font-size: 1.8rem; }
  .hide-mobile { display: none !important; }
  .table-procedures td, .table-procedures th { font-size: .78rem; padding: .4rem .5rem; }
}

/* ── specialty pills ── */
.specialty-btn { border-radius: 20px !important; font-size: .82rem; padding: .3rem .9rem; transition: all .15s; }

/* ── print / PDF ── */
@media print {
  body { background: #fff; font-size: 10pt; }
  .navbar, .btn, .filter-bar, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd !important; }
  .table-procedures { font-size: 9pt; }
}
