/* ============================================================
   GROWTHIC ONE — Reusable Components
   ============================================================ */

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Primary */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 71, 153, 0.38);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary */
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border-light); }

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }

/* Sizes */
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 11px 22px; font-size: 14px; }
.btn-full { width: 100%; }

/* Icon-only button variant */
.btn-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-icon-sm:hover { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-icon-sm svg { width: 13px; height: 13px; }

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 80px;
}

.form-select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 71, 153, 0.12);
}

/* Stronger focus ring on auth pages (dark background makes it pop) */
.auth-card .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 71, 153, 0.18);
  outline: none;
}

/* Suppress browser autofill purple/yellow tint — keep design-system blue */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset, 0 0 0 3px rgba(15, 71, 153, 0.12);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

/* Wizard inputs — explicitly use design-system blue, not indigo fallback */
.profile-wizard-overlay .form-input:focus,
.profile-wizard-overlay .form-select:focus,
.profile-wizard-overlay .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 71, 153, 0.12);
  outline: none;
}

/* DOB 3-dropdown row */
.pw-dob-selects {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1.2fr;
  gap: 8px;
}
.pw-dob-selects .form-input { height: 38px; }

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

/* Input with suffix (e.g. show/hide password) */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .form-input { padding-right: 40px; }

.input-suffix {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 36px;
  background: none;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s;
}
.input-suffix:hover { color: var(--text); }
.input-suffix svg { width: 14px; height: 14px; }

/* ── Badges / Pills ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge--primary  { background: var(--primary-light);  color: var(--primary); }
.badge--blue     { background: var(--secondary-light); color: #0284c7; }
.badge--success  { background: var(--success-light);   color: var(--success); }
.badge--warning  { background: var(--warning-light);   color: #b45309; }
.badge--danger   { background: var(--danger-light);    color: #b91c1c; }
.badge--muted    { background: var(--surface);         color: var(--text-muted); }
.badge--outline  { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }

/* ── Status dots ─────────────────────────────────────────────── */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}
.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--success::before { background: var(--success); }
.status-dot--warning::before { background: var(--warning); }
.status-dot--danger::before  { background: var(--danger); }
.status-dot--muted::before   { background: var(--text-muted); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

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

/* KPI stat card */
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-value--positive { color: var(--success); }

.stat-delta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-danger  { background: var(--danger-light);  color: #b91c1c; border-color: #fecaca; }
.alert-success { background: var(--success-light); color: #065f46; border-color: #a7f3d0; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fde68a; }
.alert-info    { background: var(--primary-light); color: var(--primary); border-color: #c7d7f5; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--surface);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

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

.table--clickable tbody tr { cursor: pointer; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal--lg {
  max-width: 720px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body { padding: 0 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--text-muted);
}
.empty-state-icon svg { width: 22px; height: 22px; }

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 16px;
}

/* ── Search Input ───────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.search-wrap .search-icon svg { width: 14px; height: 14px; }

.search-wrap .form-input {
  padding-left: 32px;
  width: 240px;
}

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Grid layouts ───────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: var(--text); }

.tab-btn--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ── Right Drawer ───────────────────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(15, 23, 42, 0.25);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 801;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.drawer-body { padding: 20px 24px; flex: 1; }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-bar-wrap {
  height: 6px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.4s ease;
}

.progress-bar-fill--success { background: var(--success); }
.progress-bar-fill--warning { background: var(--warning); }
.progress-bar-fill--danger  { background: var(--danger); }

/* ============================================================
   EXTENDED COMPONENTS — Phase 2+ additions
   ============================================================ */

/* ── BEM button variants (--) ───────────────────────────────── */
.btn--primary   { background: var(--primary);  color: #fff; border: 1px solid var(--primary); }
.btn--primary:hover:not(:disabled)   { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--secondary { background: var(--surface);  color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover:not(:disabled) { background: var(--border-light); }
.btn--danger    { background: var(--danger);   color: #fff; border: 1px solid var(--danger); }
.btn--danger:hover:not(:disabled)    { background: #dc2626; }
.btn--success   { background: var(--success);  color: #fff; border: 1px solid var(--success); }
.btn--success:hover:not(:disabled)   { background: #15835f; }
.btn--ghost     { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn--ghost:hover:not(:disabled)     { background: var(--surface); color: var(--text); }
.btn--info      { background: var(--secondary-light); color: #0284c7; border: 1px solid var(--secondary-light); }
.btn--xs  { padding: 4px 10px; font-size: 12px; }
.btn--sm  { padding: 6px 12px; font-size: 12px; }

/* ── Section cards ──────────────────────────────────────────── */
.section-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.section-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.1px;
}

.section-card-body { padding: 16px 20px; }

/* ── Data table ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--surface);
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface); }
.data-table tbody tr.clickable { cursor: pointer; }

/* ── Page toolbar ───────────────────────────────────────────── */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ── Form row ───────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Utility classes ────────────────────────────────────────── */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.ml-1 { margin-left: 4px; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 12px; }
.text-xs    { font-size: 11px; }
.fw-600     { font-weight: 600; }

.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.link:hover { text-decoration: underline; }

.required { color: var(--danger); margin-left: 2px; }

.loading-text {
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px 0;
  text-align: center;
}

.empty-state-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  gap: 8px;
}

.empty-state-full p { margin: 0; }

/* ── Info grid ──────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.info-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 20px;
}
@media (max-width: 900px) { .info-grid-4 { grid-template-columns: repeat(2, 1fr); } }

.info-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.info-value {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.info-value code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Progress bar (inline) ──────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.5s ease;
}
.progress-fill--success { background: var(--success); }
.progress-fill--warning { background: var(--warning); }

/* ── Alert variants (--) ────────────────────────────────────── */
.alert--danger  { background: var(--danger-light);  color: #b91c1c; border: 1px solid #fecaca; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.alert--success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }

/* ── Custom searchable dropdown ─────────────────────────────── */
.custom-select-wrap { position: relative; min-width: 200px; }

.custom-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
}
.custom-select-btn:hover { border-color: var(--text-muted); }
.custom-select-btn:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(15,71,153,0.1); }

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 500;
  overflow: hidden;
}

.custom-select-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text);
  outline: none;
  background: var(--surface);
}

.custom-select-list {
  max-height: 240px;
  overflow-y: auto;
}

.custom-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  gap: 8px;
  transition: background 0.1s;
}
.custom-select-item:hover { background: var(--surface); }
.custom-select-item--selected { color: var(--primary); font-weight: 600; }

.custom-select-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Toggle switch ──────────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ── Notification preference UI ─────────────────────────────── */
.notif-module { margin-bottom: 4px; }
.notif-module-header { padding: 4px 0 8px; }
.notif-module-header strong { font-size: 13px; color: var(--text); }
.notif-module-events { display: flex; flex-direction: column; gap: 1px; }
.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  gap: 12px;
}
.notif-toggle-row:last-child { border-bottom: none; }
.notif-toggle-label { font-size: 13px; color: var(--text-secondary); }
.notif-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Settings page ──────────────────────────────────────────── */
.settings-inner { max-width: 680px; }
.settings-profile-row { display: flex; align-items: center; gap: 16px; }
.settings-avatar {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.settings-name { font-size: 16px; font-weight: 600; color: var(--text); }
.settings-role { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.settings-pw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-pw-label { font-size: 13px; font-weight: 600; color: var(--text); }
.settings-pw-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Status check rows (Client Dashboard) ───────────────────── */
.status-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.status-check--ok svg { color: var(--success); }
.status-check--pending svg { color: var(--warning); }
.status-check-title { font-size: 13px; font-weight: 600; color: var(--text); }
.status-check-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Metrics empty state (Client Dashboard) ─────────────────── */
.metrics-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.metrics-empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.metrics-empty-sub   { font-size: 13px; color: var(--text-muted); max-width: 400px; line-height: 1.6; }

/* ── Dashboard grid ─────────────────────────────────────────── */
.dashboard-grid { display: flex; flex-direction: column; gap: 20px; }
.dashboard-card--wide { grid-column: 1 / -1; }

/* ── Client Repository folder cards ────────────────────────── */
.folder-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .folder-cards-grid { grid-template-columns: 1fr; } }

.folder-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.folder-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,71,153,0.06);
}

.folder-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.folder-card-icon {
  width: 36px; height: 36px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.folder-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.folder-card-count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.folder-card-body  { padding: 12px 20px; min-height: 80px; }
.folder-empty      { font-size: 13px; color: var(--text-muted); padding: 16px 0; }

/* ── File rows (inside folder card body) ────────────────────── */
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.file-row:last-child { border-bottom: none; }
.file-row-icon { font-size: 16px; line-height: 1; flex-shrink: 0; width: 20px; text-align: center; }
.file-row-info { flex: 1; min-width: 0; }
.file-row-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.file-row-name:hover { text-decoration: underline; }
.file-row-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Level 2 file table view ────────────────────────────────── */
.folder-view-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 16px;
  background: none;
  border: none;
  transition: color 0.15s;
}
.folder-view-back:hover { color: var(--primary); }
.folder-view-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Drag and drop upload zone ──────────────────────────────── */
.drag-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.drag-drop-zone:hover,
.drag-drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.drag-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drag-drop-icon { font-size: 28px; margin-bottom: 8px; }
.drag-drop-label { font-size: 13px; color: var(--text-secondary); }
.drag-drop-label span { color: var(--primary); font-weight: 600; }
.drag-drop-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.drag-drop-file-name { font-size: 13px; font-weight: 600; color: var(--success); margin-top: 8px; }

/* ── Repo toolbar ───────────────────────────────────────────── */
.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.repo-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Dashboard filter bar ───────────────────────────────────── */
.db-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.db-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.db-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.db-filter-select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  font-family: var(--font);
  width: 100%;
}
.db-filter-select:focus { border-color: var(--primary); }
.db-filter-readonly {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  display: flex;
  align-items: center;
  font-family: var(--font);
  min-width: 100px;
  letter-spacing: 0.5px;
}
.db-filter-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 1px;
}
.db-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

/* ── KPI cards ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: box-shadow 0.15s;
}
.kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.kpi-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
}
.kpi-delta--up   { color: var(--success); }
.kpi-delta--down { color: var(--danger); }

/* ── Client status card ─────────────────────────────────────── */
.client-status-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
}
.client-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status--on-track  { background: var(--success-light); color: var(--success); }
.status--on-track::before  { background: var(--success); }
.status--at-risk   { background: var(--warning-light); color: #b45309; }
.status--at-risk::before   { background: var(--warning); }
.status--off-track { background: var(--danger-light);  color: #b91c1c; }
.status--off-track::before { background: var(--danger); }
.client-status-meta { font-size: 11px; color: var(--text-muted); }
.client-status-select {
  font-size: 12px;
  padding: 4px 24px 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 6px center;
  appearance: none;
  color: var(--text);
  cursor: pointer;
  outline: none;
  font-family: var(--font);
  width: fit-content;
}

/* ── Sample data banner ─────────────────────────────────────── */
/* ── Context bar (replaces old data banner + status card) ─── */
.db-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.db-context-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.db-context-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.ctx-chip--platform {
  background: var(--primary-light);
  border-color: transparent;
  color: var(--primary);
  font-weight: 600;
}

/* ── Utility ─────────────────────────────────────────────────── */
.mb-4 { margin-bottom: 16px; }

/* ── Chart containers ───────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.chart-canvas-wrap { position: relative; height: 220px; }
.chart-multi-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chart-metric-pill {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
}
.chart-metric-pill.active {
  border-color: currentColor;
  color: var(--primary);
  background: var(--primary-light);
}

/* ── SOW progress rows ──────────────────────────────────────── */
.sow-section { display: flex; flex-direction: column; gap: 14px; }
.sow-row-item { }
.sow-row-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 5px;
}
.sow-row-name { font-size: 13px; font-weight: 500; color: var(--text); }
.sow-row-fraction { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sow-row-pct { font-size: 13px; font-weight: 700; color: var(--text); min-width: 36px; text-align: right; }
.sow-row-pct--danger { color: var(--danger); }

/* ── Top content table ──────────────────────────────────────── */
.top-content-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-content-thumb {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.top-content-text {
  font-size: 13px;
  color: var(--text);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.platform-pill--linkedin  { background: #EFF6FF; color: #1d4ed8; }
.platform-pill--instagram { background: #FDF4FF; color: #7e22ce; }

/* ── Reimbursements — Phase 5 UI ─────────────────────────── */

/* Modal section label (divides form sections) */
.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.modal-section-label:first-child { margin-top: 0; }

/* Pre-Approval selectable cards */
.pa-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  margin-bottom: 10px;
  user-select: none;
}
.pa-card:last-child { margin-bottom: 0; }
.pa-card:hover {
  border-color: var(--primary);
  background: #f4f7fd;
  box-shadow: 0 0 0 3px rgba(15,71,153,0.07);
}
.pa-card--selected {
  border-color: var(--primary);
  background: #eef3fc;
  box-shadow: 0 0 0 3px rgba(15,71,153,0.12);
}
.pa-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pa-card-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pa-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.pa-card-meta span::before {
  content: '';
}

/* Linked PA chip shown at top of claim step 2 */
.pa-selected-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #eef3fc;
  border: 1.5px solid #c8d9f5;
  border-radius: 8px;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 4px;
}
.pa-selected-chip strong { font-weight: 600; }

/* Skip pre-approval link */
.skip-preapproval {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.skip-preapproval:hover { color: var(--text); }

/* Receipt preview after upload */
.receipt-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f4f7fd;
  border: 1.5px solid #c8d9f5;
  border-radius: 8px;
}
.receipt-preview-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Readonly project code field */
.form-input[readonly] {
  background: #f5f6f8;
  color: var(--text-muted);
  cursor: default;
}

/* ── Timesheet — day-row layout ─────────────────────────────── */
.ts-day {
  border-bottom: 1px solid var(--border-light);
  padding: 0;
}
.ts-day:last-child { border-bottom: none; }

.ts-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--surface);
}

.ts-day-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-day-label--today { color: var(--primary); }

.ts-today-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(var(--primary-rgb, 67, 97, 238), 0.08);
  padding: 2px 7px;
  border-radius: 20px;
}

.ts-day-hours {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.ts-day-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 20px 10px;
}

.ts-day .data-table th { display: none; } /* headers not needed in day rows */
.ts-day .data-table td { border-top: none; }
.ts-day .data-table tbody tr:first-child td { border-top: 1px solid var(--border-light); }

/* ══════════════════════════════════════════════════════════════
   TIMESHEET v2 — Calendar week view
   ══════════════════════════════════════════════════════════════ */

/* Layout: day-grid + sidebar */
.ts-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

/* 6 day columns */
.ts-day-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: start;
}

/* Single day column */
.ts-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}
.ts-col--today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 71, 153, 0.08);
}

.ts-col-header {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}
.ts-col--today .ts-col-header { background: rgba(15, 71, 153, 0.03); }

.ts-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ts-col-weekday {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .06em;
}
.ts-col-status-icon { display: flex; align-items: center; }

.ts-col-date {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  display: block;
}
.ts-col-date--today { color: var(--primary); }

.ts-col-hours {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 1px 7px;
  border-radius: 10px;
}

.ts-col-body {
  flex: 1;
  padding: 10px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-col-footer {
  padding: 8px 10px 10px;
}

/* Day action buttons / pills */
.ts-day-action {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 0;
  border-radius: 8px;
  border: none;
  cursor: default;
  display: block;
}
.ts-day-action--submit {
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
}
.ts-day-action--submit:hover { opacity: .88; }
.ts-day-action--review    { background: #FEF3C7; color: #92400E; }
.ts-day-action--approved  { background: #D1FAE5; color: #065F46; }
.ts-day-action--rejected  { background: #FEE2E2; color: #991B1B; }
.ts-day-action--locked    { background: var(--surface); color: var(--text-muted); font-size: 11px; letter-spacing: .04em; }

/* Locked day column */
.ts-col--locked { opacity: .55; pointer-events: none; }
.ts-col--locked .ts-col-body { background: repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(0,0,0,.025) 6px, rgba(0,0,0,.025) 7px); }

/* Work-type toggle in entry modal */
.ts-work-type-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.ts-wt-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ts-wt-btn + .ts-wt-btn { border-left: 1px solid var(--border); }
.ts-wt-btn--active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.ts-wt-btn:not(.ts-wt-btn--active):hover { background: var(--surface); }

/* Work-type badges on cards and team view */
.ts-card-type-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.ts-card-type-badge--internal { background: #EDE9FE; color: #5B21B6; }
.ts-card-type-badge--client   { background: #DBEAFE; color: #1E40AF; }

/* Half-day client-visit read-only context banner */
.ts-cv-context {
  background: #E0F2FE;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.ts-cv-context-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0369A1;
  margin-bottom: 4px;
}
.ts-cv-context-client { font-size: 12px; font-weight: 600; color: #0C4A6E; }
.ts-cv-context-reason { font-size: 11px; color: #075985; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }

/* Add entry button */
.ts-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 7px 0;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  margin-top: auto;
}
.ts-add-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Entry cards */
.ts-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  position: relative;
}
.ts-card--draft     { border-left-color: #94A3B8; }
.ts-card--submitted { border-left-color: #F59E0B; }
.ts-card--approved  { border-left-color: #1D9E75; }
.ts-card--rejected  { border-left-color: #EF4444; }

.ts-card-client {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.ts-card-client-name {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}
.ts-card-code {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.ts-card-entity {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.ts-card-activity {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 3px;
}
.ts-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 5px;
}
.ts-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}
.ts-card-hours {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.ts-card-rejection {
  font-size: 11px;
  color: #DC2626;
  background: #FEF2F2;
  padding: 4px 7px;
  border-radius: 5px;
  margin-top: 5px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.4;
}
.ts-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
}
.ts-card-actions button {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ts-edit-entry:hover   { color: var(--primary); border-color: var(--primary); }
.ts-delete-entry:hover { color: var(--danger);  border-color: var(--danger);  }

/* Sidebar */
.ts-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 20px;
}
.ts-sb-section { }
.ts-sb-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.ts-sb-total {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

/* Day bars */
.ts-sb-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 72px;
  margin-top: 10px;
}
.ts-sb-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
}
.ts-sb-bar-val {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  min-height: 12px;
}
.ts-sb-bar-track {
  flex: 1;
  width: 100%;
  background: var(--border-light);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ts-sb-bar-fill {
  width: 100%;
  border-radius: 4px;
  min-height: 3px;
  transition: height .3s;
}
.ts-sb-bar-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Distribution */
.ts-sb-donut-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
}
.ts-sb-legend { }
.ts-sb-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  font-size: 12px;
}
.ts-sb-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ts-sb-legend-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.ts-sb-legend-val {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

/* Pending */
.ts-sb-pending-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
}
.ts-sb-pending-row:last-child { border-bottom: none; }

/* Responsive: collapse sidebar on narrow screens */
@media (max-width: 1100px) {
  .ts-layout { grid-template-columns: 1fr; }
  .ts-sidebar { position: static; }
}
@media (max-width: 800px) {
  .ts-day-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .ts-day-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   PERMISSIONS CONTROL PANEL
   ══════════════════════════════════════════════════════════════ */

/* Outer two-column grid */
.perms-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 130px);
  gap: 0;
  margin: -24px;            /* bleed to page-content edges */
}

/* ── Left sidebar ─────────────────────────────────────────── */
.perms-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.perms-sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.perms-sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.perms-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.perms-super-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(67, 97, 238, 0.1);
  border: 1px solid rgba(67, 97, 238, 0.2);
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.perms-sidebar-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.perms-dept-section {
  padding: 16px 0 0;
  flex: 1;
}

.perms-dept-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 0 20px 8px;
  text-transform: uppercase;
}

.perms-dept-list {
  display: flex;
  flex-direction: column;
}

.perms-dept-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.perms-dept-item:hover {
  background: var(--surface);
  color: var(--text);
}

.perms-dept-item--active {
  background: rgba(67, 97, 238, 0.07);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ── Right panel ──────────────────────────────────────────── */
.perms-right {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow-y: auto;
}

.perms-right-body {
  flex: 1;
  padding: 32px 40px;
}

.perms-right-header {
  margin-bottom: 24px;
}

.perms-dept-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.4px;
}

.perms-dept-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Permissions table ────────────────────────────────────── */
.perms-table {
  width: 100%;
  border-collapse: collapse;
}

.perms-table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.perms-table thead th:not(:first-child) {
  text-align: center;
  width: 90px;
}

.perms-module-row {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}
.perms-module-row:last-child { border-bottom: none; }
.perms-module-row:hover { background: rgba(0,0,0,0.015); }

.perms-module-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.perms-mod-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.perms-toggle-cell {
  text-align: center;
  padding: 14px 0;
  vertical-align: middle;
}


/* ── Footer ───────────────────────────────────────────────── */
.perms-right-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.perms-footer-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  max-width: 480px;
  line-height: 1.5;
}

/* Responsive — collapse sidebar on narrow screens */
@media (max-width: 900px) {
  .perms-layout {
    grid-template-columns: 1fr;
  }
  .perms-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .perms-right-body {
    padding: 20px;
  }
  .perms-right-footer {
    padding: 14px 20px;
  }
}

/* ============================================================
   ACCESS CONTROL PANEL
   ============================================================ */

/* ── Outer layout ────────────────────────────────────────── */
.access-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - var(--header-height));
  margin: -24px;
  overflow: hidden;
}

/* ── Left sidebar ─────────────────────────────────────────── */
.access-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.access-sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-light);
}

.access-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

.access-sidebar-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.access-super-badge {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 12px 0;
  padding: 7px 9px;
  background: var(--primary-light);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.4;
}

.access-dept-section {
  padding: 12px 0 0;
  flex: 1;
}

.access-dept-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 0 16px 6px;
}

.access-dept-list { display: flex; flex-direction: column; }

.access-dept-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  cursor: pointer;
}

.access-dept-row { position: relative; display: flex; align-items: stretch; }
.access-dept-row .access-dept-item { flex: 1; padding-right: 38px; }

.access-dept-edit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s, color 0.1s;
}
.access-dept-row:hover .access-dept-edit { opacity: 1; }
.access-dept-edit:hover { background: var(--surface); color: var(--primary); }

.access-dept-add {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.access-dept-add:hover { background: var(--surface); }

.dept-slug-preview {
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.access-dept-name { display: block; }
.access-dept-slug {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.access-dept-item--active .access-dept-slug { color: var(--primary); opacity: 0.7; }

.access-dept-item:hover { background: var(--surface); color: var(--text); }

.access-dept-item--active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ── Right panel ─────────────────────────────────────────── */
.access-right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.access-right-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

/* ── Header row (title + legend inline) ─────────────────── */
.access-right-header { margin-bottom: 16px; }

.access-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.access-dept-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 1px;
}

.access-dept-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.access-level-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.access-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.access-level-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Module cards ─────────────────────────────────────────── */
.access-modules {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-mod-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.access-mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  gap: 10px;
}

.access-mod-header:hover { background: var(--surface); }

.access-mod-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.access-mod-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  transition: transform 0.18s;
}

.access-mod-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.access-mod-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.access-mod-summary {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 99px;
  padding: 2px 9px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.access-mod-summary--active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: transparent;
}

/* ── Feature rows ─────────────────────────────────────────── */
.access-mod-features {
  border-top: 1px solid var(--border-light);
}

.access-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px 7px 36px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.access-feature-row:last-child { border-bottom: none; }
.access-feature-row:hover { background: var(--surface); }

.access-feature-name {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}

/* ── Level pill group ────────────────────────────────────── */
.access-level-pills {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.alp {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--alp-bg, transparent);
  border-color: var(--alp-border, var(--border));
  color: var(--alp-color, var(--text-muted));
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  white-space: nowrap;
  line-height: 1.4;
}

.alp:hover:not(.alp--active) {
  background: var(--surface);
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.alp--active {
  background: var(--alp-bg);
  border-color: var(--alp-border);
  color: var(--alp-color);
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────── */
.access-right-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
}

.access-footer-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  min-width: 160px;
}

@media (max-width: 900px) {
  .access-layout { grid-template-columns: 1fr; }
  .access-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .access-right-body { padding: 16px; }
  .access-right-footer { padding: 12px 16px; }
  .access-header-row { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   CLIENT DIRECTORY — Cards, Drawer, Form
   ============================================================ */

/* ── Card Grid ──────────────────────────────────────────────── */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  padding: 0;
}

.client-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.client-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(15, 71, 153, 0.09);
  transform: translateY(-1px);
}

.client-card-header  { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }

.client-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.client-card-code {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--primary);
  background: rgba(15, 71, 153, 0.07);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ── Platform Tags ──────────────────────────────────────────── */
.client-card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.client-platform-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  white-space: nowrap;
}

.client-platform-more {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
}

.client-card-overview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.client-card-no-platform {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Card Footer ────────────────────────────────────────────── */
.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.client-card-am {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
}
.client-card-am > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-am-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Drawer body sections ───────────────────────────────────── */
.cd-drawer-section   { padding: 16px 0; }
.cd-drawer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cd-info-item  { display: flex; flex-direction: column; gap: 4px; }
.cd-info-label { font-size: 11px; color: var(--text-muted); }
.cd-info-value { font-size: 13px; color: var(--text); font-weight: 500; }

/* ── Document links ─────────────────────────────────────────── */
.cd-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  width: fit-content;
}
.cd-doc-link:hover { background: var(--primary-ghost, rgba(15,71,153,.06)); border-color: var(--primary); }

/* ── Entity list (drawer) ───────────────────────────────────── */
.cd-entity-list      { display: flex; flex-direction: column; gap: 2px; }

.cd-entity-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg);
}

.cd-entity-toggle    { display: flex; align-items: center; }
.cd-entity-name      { font-size: 13px; font-weight: 600; color: var(--text); }
.cd-entity-sub-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

/* ── Form modal sections ────────────────────────────────────── */
.cd-form-section {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.cd-form-section:last-child { border-bottom: none; }

.cd-form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-bde-tag {
  font-size: 10px;
  background: var(--warning, #F59E0B);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: none;
}

/* ── Pill multi-select ──────────────────────────────────────── */
.pill-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-opt {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
  line-height: 1.4;
}
.pill-opt:hover         { border-color: var(--primary); color: var(--primary); }
.pill-opt--active       { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill-opt--active:hover { background: var(--primary); }

/* ── Entity form cards ──────────────────────────────────────── */
.cd-entity-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
}

.cd-entity-form-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

/* ── File upload field ──────────────────────────────────────── */
.cd-file-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.cd-file-pick-label:hover { background: var(--border-light); border-color: var(--text-muted); }

.cd-file-chosen {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
  max-width: 100%;
}

.cd-file-icon { display: flex; align-items: center; flex-shrink: 0; color: var(--primary); }

.cd-file-name {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.cd-file-name--existing { color: var(--text-muted); font-style: italic; }

.cd-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}
.cd-file-remove:hover { background: var(--danger-ghost, rgba(220,38,38,.1)); color: var(--danger); }

.cd-file-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.1s;
}
.cd-file-action:hover { opacity: 0.7; }

.cd-file-sep { color: var(--border); font-size: 11px; }

/* ── Button: link style ─────────────────────────────────────── */
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: opacity 0.1s;
}
.btn-link:hover { opacity: 0.75; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .client-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .client-grid { grid-template-columns: 1fr; }
  .cd-info-grid { grid-template-columns: 1fr; }
  .modal--lg    { max-width: 100%; }
}


/* ============================================================
   PHASE 7 — People, Leave Tracker, Announcements, Policies
   ============================================================ */

/* ── People Module ─────────────────────────────────────────── */

.people-profile-modal {
  max-width: 680px;
  width: 100%;
}

.people-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.people-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.people-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.people-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.people-profile-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.people-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.people-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.people-field .people-field-value {
  font-size: 13px;
  color: var(--text);
}

.people-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 20px 0 12px;
}

/* Org Chart */

.org-tree {
  padding: 8px 0;
}

.org-tree-dept-filter {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-level {
  position: relative;
}

.org-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px 0;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 220px;
  max-width: 320px;
}

.org-node:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.org-node-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.org-node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-node-info {
  flex: 1;
  min-width: 0;
}

.org-node-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-designation {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-children {
  margin-left: 40px;
  padding-left: 20px;
  border-left: 2px solid var(--border);
}

.org-node-children > .org-level > .org-node::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 50%;
  width: 22px;
  height: 2px;
  background: var(--border);
}

.dept-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}

/* ── Leave Tracker ─────────────────────────────────────────── */

.lt-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.lt-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.lt-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.lt-stat-value--warning {
  color: var(--warning);
}

.lt-stat-value--danger {
  color: var(--danger);
}

.lt-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Category KPI cards ─────────────────────────────────── */
.lt-summary-cards--cat {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.lt-stat-card--category {
  padding: 14px 18px;
}

.lt-stat-cat-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lt-stat-cat-body {
  display: flex;
  align-items: center;
}

.lt-stat-cat-col {
  flex: 1;
  text-align: center;
}

.lt-stat-cat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 10px;
}

.lt-stat-card--pending {
  border-left: 3px solid var(--warning);
}

/* Leave type exists but no credits assigned to this employee yet */
.lt-stat-card--uncredited {
  opacity: 0.65;
  border-style: dashed;
}

.lt-stat-cat-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ── Visibility table ────────────────────────────────────── */
.lt-vis-table {
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0;
}

.lt-vis-th-emp  { min-width: 200px; }
.lt-vis-th-dept { min-width: 130px; }
.lt-vis-th-type {
  text-align: center !important;
  min-width: 150px;
  background: var(--bg, #f5f6fa);
  border-bottom: 1px solid var(--border);
}

.lt-vis-subrow th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg, #f5f6fa);
  padding: 6px 12px;
}

.lt-vis-sub {
  text-align: center !important;
  min-width: 75px;
}

.lt-vis-cell {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
}

.lt-vis-cell--na {
  color: var(--text-muted);
  font-size: 12px;
}

.lt-vis-pos  { color: #16a34a; font-weight: 600; }
.lt-vis-zero { color: var(--text-muted); }
.lt-vis-neg  { color: var(--danger); font-weight: 600; }

.lt-vis-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light, #e8f0fe);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.lt-vis-th-sticky,
.lt-vis-td-sticky {
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
  box-shadow: 2px 0 4px rgba(0,0,0,0.04);
}

.lt-vis-th-sticky {
  background: var(--bg, #f5f6fa);
}

.lt-content-row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

/* Calendar */
.lt-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lt-cal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.lt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.lt-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
}

.lt-cal-day {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: default;
  font-size: 12px;
  position: relative;
  transition: background 0.1s;
}

.lt-cal-day--today {
  border-color: var(--primary);
  font-weight: 700;
}

.lt-cal-day--today .lt-cal-day-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.lt-cal-day--weekend {
  background: var(--bg-alt, #f8fafc);
}

.lt-cal-day--other-month {
  opacity: 0.35;
}

.lt-cal-day-num {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  line-height: 20px;
}

.lt-cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 2px;
}

.lt-cal-dot {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.lt-cal-dot--leave       { background: #fee2e2; color: var(--danger); }
.lt-cal-dot--pending     { background: #fef3c7; color: #92400e; }
.lt-cal-dot--wfh         { background: var(--primary-light); color: var(--primary); }
.lt-cal-dot--holiday     { background: #d1fae5; color: #065f46; }
.lt-cal-dot--event       { background: #ede9fe; color: #5b21b6; }
.lt-cal-dot--birthday    { background: transparent; font-size: 11px; padding: 0 1px; }
.lt-cal-dot--anniversary { background: transparent; font-size: 11px; padding: 0 1px; }

/* HR clickable calendar day hover */
[data-hr-add]:hover { background: var(--hover, rgba(99,102,241,0.06)); border-radius: 6px; }

/* Upcoming panel */
.lt-upcoming {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.lt-upcoming-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lt-upcoming-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.lt-upcoming-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lt-upcoming-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Approval cards */
.lt-approval-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.lt-approval-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lt-approval-emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.lt-approval-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.lt-balance-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  background: #d1fae5;
  color: #065f46;
}

.lt-balance-pill--warning {
  background: #fef3c7;
  color: #92400e;
}

.lt-balance-pill--danger {
  background: #fee2e2;
  color: var(--danger);
}

/* Settings sections */
.lt-settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.lt-settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

.lt-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.lt-type-row:last-child {
  border-bottom: none;
}

/* Day counter badge */
.lt-day-count {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  margin-left: 6px;
}

/* ── Announcements — Social Feed ───────────────────────────── */

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

/* Feed page header */
.ann-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.ann-feed-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

/* Feed wrapper — full width */
.ann-feed-wrap {
  width: 100%;
}

/* HR compose bar */
.ann-compose-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.ann-compose-bar::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 4px 0 0 4px;
}

.ann-compose-prompt {
  flex: 1;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ann-compose-prompt:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.ann-compose-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 100px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.ann-compose-post-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Post cards */
.announcements-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ann-post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.22s, transform 0.18s, border-color 0.2s;
  animation: annPostIn 0.32s ease both;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ann-post:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.ann-post--draft {
  border-style: dashed;
  opacity: 0.82;
}

/* Post header */
.ann-post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 10px;
}

.ann-post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.ann-post-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.ann-dept-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.ann-draft-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400E;
  background: var(--warning-light);
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid var(--warning);
}

.ann-post-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Icon action buttons (edit/delete) */
.ann-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.ann-action-btn:hover               { background: var(--surface); color: var(--text); }
.ann-action-btn--danger:hover       { background: var(--danger-light); color: var(--danger); }

/* Post body */
.ann-post-body {
  padding: 2px 20px 16px;
}

.ann-post-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.ann-post-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

.ann-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.ann-attachment:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.ann-attachment a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

/* Reactions footer */
.ann-post-footer {
  border-top: 1px solid var(--border-light);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  background: var(--surface);
}

.ann-react-summary {
  width: 100%;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ann-react-summary span { font-weight: 500; }

/* Emoji reaction pills */
.ann-react-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, transform 0.14s;
  user-select: none;
}
.ann-react-emoji { font-size: 15px; line-height: 1; }
.ann-react-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.08);
}
.ann-react-pill--active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.ann-react-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
}
.ann-react-pill--active .ann-react-count { color: var(--primary); }

@keyframes annPillBounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35); }
  65%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.ann-react-pill--bounce { animation: annPillBounce 0.32s ease; }

/* Empty state */
.ann-empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

/* Image picker grid (modal) */
.ann-img-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ann-img-slot {
  width: 90px;
  height: 90px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.ann-img-slot--filled {
  border: 1px solid var(--border);
}
.ann-img-slot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ann-img-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.ann-img-slot-remove:hover { background: rgba(0,0,0,0.8); }
.ann-img-slot--add {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}
.ann-img-slot--add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Image grid in post body */
.ann-image-grid {
  display: grid;
  gap: 3px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
  max-width: 40%;
  max-height: 200px;
}
.ann-image-grid--1 { grid-template-columns: 1fr; }
.ann-image-grid--2 { grid-template-columns: 1fr 1fr; }
.ann-image-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.ann-image-grid--4 { grid-template-columns: 1fr 1fr; }
.ann-image-grid--4 .ann-image-thumb { aspect-ratio: 1; }
.ann-image-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--bg-alt);
  transition: opacity 0.18s, transform 0.2s;
  cursor: zoom-in;
  min-height: 0;
}
.ann-image-grid--1 { max-height: 200px; max-width: 40%; }
.ann-image-thumb:hover { opacity: 0.9; transform: scale(1.01); }

/* Lightbox */
.ann-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.ann-lightbox--in  { opacity: 1; }
.ann-lightbox--out { opacity: 0; }
.ann-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
}
.ann-lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ann-lightbox-img {
  max-width: min(80vw, 1000px);
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  display: block;
}
.ann-lightbox-counter {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  min-height: 18px;
}
.ann-lightbox-nav {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.ann-lightbox-nav:hover { background: rgba(255,255,255,0.28); transform: scale(1.08); }
.ann-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.ann-lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* Home announcement thumbnail */
.home-ann-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 4px;
  border: 1px solid var(--border);
}
.home-ann-body-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 220px;
  display: block;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

/* ── Asset Request Stage Indicator ────────────────────────── */
.ast-req-stage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.ast-req-stage--rejected { color: var(--danger); }
.ast-req-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.ast-req-stage-dot--active { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-light); }
.ast-req-stage-dot--done   { background: var(--success); }
.ast-req-stage-dot--danger { background: var(--danger);  }

/* ── Asset Settings Tab ─────────────────────────────────────── */

.ast-settings-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ast-settings-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .ast-settings-summary { grid-template-columns: repeat(3, 1fr); }
}

.ast-settings-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}

.ast-settings-stat-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.ast-settings-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.ast-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

.ast-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.ast-setting-row:last-child { border-bottom: none; }

.ast-setting-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ast-setting-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ast-setting-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ast-setting-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ast-setting-btn:hover { background: var(--bg); color: var(--text); }
.ast-setting-del:hover  { color: var(--danger) !important; border-color: var(--danger); }

/* Legacy aliases kept for any stray references */
.ann-card         { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; }
.ann-card--draft  { border-style: dashed; opacity: 0.85; }
.ann-empty        { text-align: center; padding: 60px 24px; color: var(--text-muted); }

/* ── Policies & Documents ──────────────────────────────────── */

.policies-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.policies-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 16px;
}

.policies-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 14px 16px 8px;
}

.pol-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}

.pol-cat-item:hover {
  background: var(--primary-light);
}

.pol-cat-item--active {
  background: var(--primary-light);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.pol-cat-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--border);
  padding: 1px 7px;
  border-radius: 10px;
}

.pol-cat-item--active .pol-cat-count {
  background: var(--primary);
  color: #fff;
}

.pol-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  transition: box-shadow 0.15s;
}

.pol-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.pol-card--draft {
  border-style: dashed;
  opacity: 0.8;
}

.pol-card-info {
  flex: 1;
  min-width: 0;
}

.pol-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.pol-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pol-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pol-draft-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 4px;
}

.pol-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

/* ── Responsive adjustments ────────────────────────────────── */
@media (max-width: 900px) {
  .lt-summary-cards  { grid-template-columns: 1fr 1fr; }
  .lt-content-row    { grid-template-columns: 1fr; }
  .policies-layout   { grid-template-columns: 1fr; }
  .policies-sidebar  { position: static; }
  .people-field-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .lt-summary-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   PHASE 8 — Home Dashboard
   ============================================================ */

/* Entry animation */
@keyframes homeCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.home-fade-in { animation: homeCardIn 0.32s ease both; }

/* ── Hero ──────────────────────────────────────────────────── */

.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, #1a6fbf 60%, #0e8a8a 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 14px;
}

.home-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.home-stat-pill:hover {
  background: rgba(255,255,255,0.24);
  transform: translateY(-1px);
  color: #fff;
}

/* ── Timesheet nudge ───────────────────────────────────────── */

.home-ts-nudge {
  margin-bottom: 0;
  transition: box-shadow 0.2s;
}
.home-ts-nudge:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }

/* ── Hover lift cards ──────────────────────────────────────── */

.home-hover-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: default;
}
.home-hover-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* ── Person row (birthdays, anniversaries) ─────────────────── */

.home-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}
.home-person-row:last-child { border-bottom: none; }

/* ── Who's Out chip grid ───────────────────────────────────── */

.home-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-person-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: default;
}
.home-person-chip:hover {
  border-color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Holidays ──────────────────────────────────────────────── */

.home-holiday-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  border-top: 1px solid var(--border-light);
  transition: background 0.12s;
}
.home-holiday-row:hover { background: var(--surface); }

/* ── Announcements ─────────────────────────────────────────── */

.home-ann-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  outline: none;
}
.home-ann-item:last-child { border-bottom: none; }
.home-ann-item:hover { background: var(--surface); }
.home-ann-item:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }

.home-ann-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.home-ann-chevron {
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
  font-style: normal;
  flex-shrink: 0;
  margin-top: 1px;
}

.home-ann-body {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  animation: homeCardIn 0.2s ease both;
}

/* ── Layout ────────────────────────────────────────────────── */

.home-content-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .home-content-row { flex-direction: column; }
  .home-hero { padding: 22px 20px; }
}

@media (max-width: 600px) {
  .home-stat-pill { font-size: 11px; padding: 5px 10px; }
}

/* ============================================================
   PHASE 8 — Top-Down Org Chart
   ============================================================ */

.org-chart-wrap {
  overflow-x: auto;
  padding: 20px 0 8px;
}

/* Centering shim: inline-block sizes to content width so the scroll
   container's scrollWidth starts at 0 — fixes left-clip when tree is
   wider than the viewport (flex justify-content:center overflow bug). */
.org-tree-center {
  display: inline-block;
  min-width: 100%;
}

.org-tree-level {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
  padding-top: 28px;
}

/* Horizontal connector line across siblings */
.org-tree-level::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--border);
  pointer-events: none;
}

/* Single-child or root: no sibling line */
.org-tree-level--root { padding-top: 0; }
.org-tree-level--root::before { display: none; }

.org-tree-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Vertical drop from parent card to sibling connector */
.org-tree-item::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: var(--border);
  pointer-events: none;
}

.org-tree-level--root > .org-tree-item::before { display: none; }

/* Connector from card down to children line */
.org-tree-item:has(> .org-tree-level)::after {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 28px;
  background: var(--border);
  pointer-events: none;
}

/* Children list spacing */
.org-tree-item > .org-tree-level {
  margin-top: 28px;
}

/* The card itself */
.org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 120px;
  max-width: 160px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-align: center;
}

.org-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.org-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary-light, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
}

.org-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.org-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  line-height: 1.3;
}

.org-card-designation {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ============================================================
   PHASE 8 — Profile Completion Wizard Overlay
   ============================================================ */

.profile-wizard-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg, #f5f6fa);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 32px 16px 48px;
  z-index: 1000;
}

.profile-wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.profile-wizard-header {
  text-align: center;
  margin-bottom: 28px;
}

.profile-wizard-logo {
  margin-bottom: 16px;
}

.profile-wizard-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.profile-wizard-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Onboarding Welcome — matches login page blue gradient ── */

.pw-overlay--welcome {
  background: linear-gradient(135deg, #0a3a87 0%, #0F4799 50%, #1a72c7 100%);
  align-items: center;
  overflow: hidden;
}

/* Animated blob layer — mirrors .auth-mesh blobs on login page */
.pw-overlay--welcome::before,
.pw-overlay--welcome::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
/* Top-right cyan blob */
.pw-overlay--welcome::before {
  width: 560px;
  height: 560px;
  background: #45BBF0;
  top: -180px;
  right: -160px;
  opacity: 0.38;
  animation: blob1 14s ease-in-out infinite;
}
/* Bottom-left cyan blob */
.pw-overlay--welcome::after {
  width: 420px;
  height: 420px;
  background: #45BBF0;
  bottom: -140px;
  left: -100px;
  opacity: 0.28;
  animation: blob2 17s ease-in-out infinite;
}

.pw-welcome-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  width: 100%;
  background: var(--surface);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.32);
}

.pw-welcome-emoji {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 16px;
}

.pw-welcome-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.2;
}

.pw-welcome-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.pw-welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.pw-welcome-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.pw-welcome-cta {
  font-size: 15px;
  padding: 12px 36px;
  border-radius: 10px;
}

/* ── Two-column layout ──────────────────────────── */

.pw-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 1060px;
}

.pw-layout .profile-wizard-card {
  flex: 1;
  max-width: none;
}

.pw-preview-panel {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 32px;
}

@media (max-width: 920px) {
  .pw-preview-panel { display: none; }
  .pw-layout { max-width: 680px; }
}

.pw-preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pw-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}

.pw-prev-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary-light, #eef2ff);
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.pw-prev-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.pw-prev-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.pw-prev-dept {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--primary-light, #eef2ff);
  color: var(--primary);
}

.pw-prev-fields {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.pw-prev-field {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
}

.pw-prev-pct {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.pw-prev-pct-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pw-prev-pct-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

/* ── Progress bar ───────────────────────────────── */

.pw-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px 0 22px;
  overflow: hidden;
}

#pw-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ── Tip callout ────────────────────────────────── */

.pw-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* ── Step slide transitions ─────────────────────── */

.pw-slide-right { animation: pw-from-right 0.28s ease forwards; }
.pw-slide-left  { animation: pw-from-left  0.28s ease forwards; }

@keyframes pw-from-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pw-from-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── KYC document grid ──────────────────────────── */

.pw-kyc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.pw-kyc-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 20px 14px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.pw-kyc-slot:hover { border-color: var(--primary); background: var(--bg); }

.pw-kyc-slot--done {
  border-style: solid;
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.04);
}

.pw-kyc-icon { font-size: 26px; line-height: 1; }

.pw-kyc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pw-kyc-opt  { color: var(--text-muted); font-weight: 400; }
.pw-kyc-hint { font-size: 11px; color: var(--text-muted); }

.pw-kyc-check {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  word-break: break-all;
  max-width: 140px;
}

/* ── PEP / Compliance ───────────────────────────── */

.pw-pep-wrap { display: flex; flex-direction: column; gap: 16px; }

.pw-pep-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.pw-pep-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
}

.pw-pep-options { display: flex; flex-direction: column; gap: 8px; }

.pw-pep-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.pw-pep-option input { accent-color: var(--primary); flex-shrink: 0; }
.pw-pep-option--sel  { border-color: var(--primary); background: var(--primary-light, #eef2ff); }

.pw-declaration {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pw-declaration input { accent-color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ── Skip button ────────────────────────────────── */

.pw-skip-btn {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.pw-skip-btn:hover { color: var(--text); }

/* ── Confetti ───────────────────────────────────── */

.pw-confetti {
  position: fixed;
  top: -12px;
  pointer-events: none;
  z-index: 9999;
  animation: pw-confetti-fall linear forwards;
}

@keyframes pw-confetti-fall {
  0%   { transform: translateY(0)    rotate(0deg);   opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* ── Done screen extras ─────────────────────────── */

.pw-done-bar-wrap {
  width: 200px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.pw-done-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ── Multi-step stepper ─────────────────────────── */

.pw-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 4px;
}

.pw-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pw-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pw-dot--active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(15, 71, 153, 0.15);
}

.pw-dot--done {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.pw-step-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 72px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 22px;
  transition: background 0.2s;
}

.pw-step-line--done { background: var(--success); }

/* ── Step body ──────────────────────────────────── */

.pw-step-body {
  min-height: 200px;
}

.pw-step-heading {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pw-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.pw-step-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Avatar (step 1) ────────────────────────────── */

.pw-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

.pw-avatar-lg {
  width: 100px !important;
  height: 100px !important;
  font-size: 32px !important;
}

/* ── Bottom nav ─────────────────────────────────── */

.pw-nav {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pw-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pw-step-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Done screen ────────────────────────────────── */

.pw-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 24px;
  text-align: center;
  gap: 12px;
}

.pw-done-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pw-done-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.pw-done-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Legacy section label (kept for any stray use) ─ */

.pw-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.pw-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.pw-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.pw-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.required-star {
  color: var(--danger);
}

.avatar-circle--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light, #e0e7ff);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .profile-wizard-card { padding: 24px 18px; }
  .home-content-row    { flex-direction: column; }
}

/* ============================================================
   PHASE 9 — Social Analytics Dashboard
   ============================================================ */

/* ── Data source banner ────────────────────────────────────── */
.analytics-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.analytics-banner strong { color: var(--text); }

/* ── KPI grid (6 cards) ────────────────────────────────────── */
.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1200px) { .kpi-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kpi-grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* ── KPI grid — personal profile (4 cards, wider + taller) ─── */
.kpi-grid--personal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) { .kpi-grid--personal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .kpi-grid--personal { grid-template-columns: 1fr; } }

.kpi-grid--personal .kpi-card {
  padding: 22px 24px;
}
.kpi-grid--personal .kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.kpi-grid--personal .kpi-value {
  font-size: 34px;
  letter-spacing: -1px;
}
.kpi-grid--personal .kpi-label {
  font-size: 11.5px;
  margin-bottom: 8px;
}
.kpi-grid--personal .kpi-delta {
  font-size: 12.5px;
  margin-top: 10px;
}

/* ── Personal profile badge in context bar ─────────────────── */
.ctx-chip--personal {
  background: #EEF2FF;
  color: #4F46E5;
  border-color: #C7D2FE;
  font-weight: 600;
  gap: 5px;
}

/* ── Upload modal phases ───────────────────────────────────── */
.upload-phase { display: none; }
.upload-phase--active { display: block; }

.upload-parse-preview {
  background: var(--bg, #f5f6fa);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 13px;
}

.upload-parse-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.upload-parse-preview-row:last-child { border-bottom: none; }

.upload-parse-preview-label { color: var(--text-muted); }
.upload-parse-preview-value { font-weight: 600; color: var(--text); }

.upload-overwrite-notice {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

.upload-progress-wrap {
  text-align: center;
  padding: 32px 0;
}

.upload-progress-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

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

.upload-success-wrap {
  text-align: center;
  padding: 32px 0;
}

.upload-success-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-success-stat {
  display: inline-block;
  margin: 4px 8px;
  padding: 4px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Top content table ─────────────────────────────────────── */
.post-preview-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 320px;
}

.post-preview-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-preview-link {
  font-size: 11px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.post-preview-link:hover { text-decoration: underline; }

.content-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #e0e7ff;
  color: #3730a3;
}

.content-type-badge--video   { background: #fce7f3; color: #9d174d; }
.content-type-badge--image   { background: #d1fae5; color: #065f46; }
.content-type-badge--carousel { background: #fef3c7; color: #92400e; }
.content-type-badge--text    { background: #f1f5f9; color: #475569; }

/* ── Empty state for analytics ─────────────────────────────── */
.analytics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 12px;
}

.analytics-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.analytics-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  max-width: 360px;
  line-height: 1.6;
}

/* ── Audience section ──────────────────────────────────────── */
.audience-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) { .audience-charts-row { grid-template-columns: 1fr; } }

/* ── Demographics tabs ─────────────────────────────────────── */
.demo-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}

.demo-tab {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.demo-tab:hover { color: var(--text); }
.demo-tab--active { color: var(--primary); border-bottom-color: var(--primary); }

.demo-tab-panel { display: none; }
.demo-tab-panel--active { display: block; }

/* ── Demographics dimension group ──────────────────────────── */
.demo-dimension {
  margin-bottom: 20px;
}

.demo-dimension-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.demo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}

.demo-row-rank {
  width: 18px;
  text-align: right;
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}

.demo-row-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.demo-row-bar-wrap {
  width: 100px;
  height: 6px;
  background: var(--border-light, #f1f5f9);
  border-radius: 3px;
  flex-shrink: 0;
}

.demo-row-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  min-width: 2px;
}

.demo-row-value {
  width: 60px;
  text-align: right;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  font-size: 12px;
}

/* ============================================================
   PHASE 10 — Asset Management v2
   ============================================================ */

.ast-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ast-stat {
  flex: 1;
  min-width: 80px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}

.ast-stat--alert {
  border-color: var(--danger);
}

.ast-stat-val {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.ast-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.ast-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ast-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ast-asset-card {
  padding: 16px;
}

.ast-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
}

.ast-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
}

.ast-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  font-weight: 500;
}

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

@media (max-width: 600px) {
  .ast-cards-grid  { grid-template-columns: 1fr; }
  .ast-stats-row   { grid-template-columns: repeat(3, 1fr); display: grid; }
  .ast-filter-bar  { flex-direction: column; align-items: stretch; }
}

/* ── Notification Bell Panel ─────────────────────────────── */
.notif-panel {
  position: fixed;
  width: 340px;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.notif-mark-all {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-panel-body {
  overflow-y: auto;
  flex: 1;
}

.notif-panel-loading {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle, var(--border));
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover, rgba(255,255,255,0.04)); }
.notif-item--unread { background: rgba(99,102,241,0.05); }
.notif-item--unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, #6366f1);
  border-radius: 0 2px 2px 0;
}

/* ── Emoji icon square ── */
.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  background: rgba(100,116,139,0.1);
}
.notif-item-icon--approval   { background: rgba(34,197,94,0.14); }
.notif-item-icon--rejection  { background: rgba(239,68,68,0.13); }
.notif-item-icon--badge      { background: rgba(245,158,11,0.15); }
.notif-item-icon--timesheet  { background: rgba(99,102,241,0.13); }
.notif-item-icon--leave      { background: rgba(16,185,129,0.14); }
.notif-item-icon--wfh        { background: rgba(20,184,166,0.13); }
.notif-item-icon--reimburse  { background: rgba(139,92,246,0.13); }
.notif-item-icon--asset      { background: rgba(249,115,22,0.14); }
.notif-item-icon--tools      { background: rgba(100,116,139,0.12); }
.notif-item-icon--people     { background: rgba(59,130,246,0.14); }
.notif-item-icon--default    { background: rgba(100,116,139,0.1); }

.notif-item-body {
  flex: 1;
  min-width: 0;
}

/* ── Tag + timestamp row ── */
.notif-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.notif-item-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(100,116,139,0.12);
  color: var(--text-muted);
}
.notif-item-tag--approval   { background: rgba(34,197,94,0.14);   color: #15803d; }
.notif-item-tag--rejection  { background: rgba(239,68,68,0.13);   color: #dc2626; }
.notif-item-tag--badge      { background: rgba(245,158,11,0.15);  color: #b45309; }
.notif-item-tag--timesheet  { background: rgba(99,102,241,0.13);  color: #4338ca; }
.notif-item-tag--leave      { background: rgba(16,185,129,0.14);  color: #047857; }
.notif-item-tag--wfh        { background: rgba(20,184,166,0.13);  color: #0f766e; }
.notif-item-tag--reimburse  { background: rgba(139,92,246,0.13);  color: #7c3aed; }
.notif-item-tag--asset      { background: rgba(249,115,22,0.14);  color: #c2410c; }
.notif-item-tag--tools      { background: rgba(100,116,139,0.12); color: #475569; }
.notif-item-tag--people     { background: rgba(59,130,246,0.14);  color: #1d4ed8; }

.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-item-msg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.notif-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #6366f1);
  flex-shrink: 0;
  margin-top: 6px;
}

/* .header-actions has position:relative so panel anchors to it */

@media (max-width: 480px) {
  .notif-panel { width: calc(100vw - 24px); right: -8px; }
}

/* ============================================================
   PROJECT CODES TAB
   ============================================================ */

/* Highlighted tab button */
.tab-btn--pc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 500;
}
.tab-btn--pc:hover,
.tab-btn--pc.tab-btn--active {
  background: var(--primary);
  color: #fff;
}

/* Section layout */
.pc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pc-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}
.pc-section-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Table */
.pc-table { min-width: 700px; }

/* Project code pill */
.pc-code {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light, #eff6ff);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Row states */
.pc-row-name { font-weight: 500; color: var(--text); font-size: 13px; }
.pc-row--inactive { opacity: 0.5; }
.pc-row--inactive .pc-row-name { text-decoration: line-through; }

/* Inactive section divider */
.pc-inactive-divider td {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
}

/* Description cell */
.pc-desc-cell { font-size: 12px; color: var(--text-secondary); max-width: 260px; }
.pc-desc-empty { color: var(--text-muted); font-style: italic; }

/* Empty state */
.pc-empty { text-align: center; color: var(--text-muted); padding: 24px; font-size: 13px; }

/* Internal category badge */
.badge--internal { background: #ede9fe; color: #6d28d9; }

/* ── Client Dashboard — Content type breakdown ("What's Working") ── */
.ct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.ct-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
}
.ct-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.ct-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ct-type-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.ct-best-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.ct-post-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: -4px;
}

.ct-eng-section { display: flex; flex-direction: column; gap: 4px; }

.ct-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ct-stat-label { font-size: 11px; color: var(--text-muted); }
.ct-stat-val   { font-size: 13px; font-weight: 700; }

.ct-eng-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.ct-eng-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.ct-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.ct-mini-item { display: flex; flex-direction: column; gap: 2px; }
.ct-mini-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.ct-mini-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.ct-top-post {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ct-top-post-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.ct-top-post-title {
  font-size: 11px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
a.ct-top-post-title:hover { color: var(--primary); text-decoration: underline; }

.ct-insight-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  line-height: 1.5;
}
.ct-insight-bar svg { flex-shrink: 0; }

@media (max-width: 900px) { .ct-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ct-grid { grid-template-columns: 1fr; } }

/* ── What's Working + Weekly Publishing — 2-column row ────── */
.db-pub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* What's Working panel — fills row height, no bottom margin
   (the row wrapper handles spacing) */
.db-ww-panel {
  margin-bottom: 0;
  height: 100%;
  box-sizing: border-box;
}

/* Pub chart panel — matches section-card visual weight */
.db-pub-chart-panel {
  height: 100%;
  box-sizing: border-box;
}

/* Switch to flex inside the What's Working panel so cards
   reliably fill the full available width regardless of count.
   flex: 1 1 160px  → each card grows to fill remaining space,
   base of 160 px, wraps when container is too narrow. */
.db-ww-panel .ct-grid {
  display: flex;
  flex-wrap: wrap;
}

.db-ww-panel .ct-card {
  flex: 1 1 160px;
  min-width: 0;
}

@media (max-width: 1024px) {
  .db-pub-row {
    grid-template-columns: 1fr;
  }
  .db-ww-panel,
  .db-pub-chart-panel {
    height: auto;
  }
}

/* ============================================================
   BADGE SYSTEM
   ============================================================ */

/* ── Badge Spotlight (home left column) ─────────────────────── */
.bs-list { display: flex; flex-direction: column; }

.bs-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.bs-row:last-child { border-bottom: none; }
.bs-row:hover {
  background: var(--surface);
  border-left-color: var(--bs-accent, var(--primary));
}

.bs-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bs-body { flex: 1; min-width: 0; }

.bs-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.bs-text {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 13px;
}
.bs-name  { font-weight: 700; color: var(--text); }
.bs-earned { color: var(--text-muted); }
.bs-badge-name { font-weight: 700; }

.bs-note {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 4px;
  padding-left: 4px;
  border-left: 2px solid var(--border);
}

.bs-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Your Badges mini-cards (home right column) ─────────────── */
.my-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.my-badge-card {
  position: relative;
  padding: 12px 10px 10px;
  border-radius: var(--radius);
  border: 1.5px solid color-mix(in srgb, var(--bc, #0F4799) 25%, transparent);
  background: color-mix(in srgb, var(--bc, #0F4799) 7%, white);
  text-align: center;
  transition: transform 0.12s, box-shadow 0.12s;
  cursor: default;
}
.my-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.my-badge-new {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.my-badge-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.my-badge-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--bc, var(--text));
  margin-bottom: 3px;
  line-height: 1.3;
}

.my-badge-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Directory badge row (HRMS table name cell) ─────────────── */
.dir-badge-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}
.dir-badge-icon {
  font-size: 13px;
  line-height: 1;
  cursor: default;
}
.dir-badge-more {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Individual badge chip — used in profile modal + home */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
}
.badge-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.12); }

.badge-chip-icon { font-size: 15px; line-height: 1; }
.badge-chip-name { letter-spacing: 0.01em; }

/* Tenure style — solid colour background */
.badge-chip--tenure {
  background: var(--badge-bg, #f0fdf4);
  color: var(--badge-text, #14532d);
  border-color: var(--badge-border, #bbf7d0);
}

/* Special (birthday) — pink gradient */
.badge-chip--special {
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  color: #9d174d;
  border-color: #fbcfe8;
}

/* Recognition — soft surface */
.badge-chip--recognition {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* Row of badge chips */
.badge-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Profile badge section */
.profile-badges-section {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.profile-badges-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.profile-badges-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Home "Your Badges" card */
.home-badges-card { }
.home-badges-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

/* Award badge modal — catalogue grid */
.badge-catalogue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.badge-catalogue-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  background: var(--bg);
}
.badge-catalogue-item:hover { border-color: var(--primary); background: var(--primary-light); }
.badge-catalogue-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(15,71,153,0.1);
}
.badge-catalogue-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.badge-catalogue-info { min-width: 0; }
.badge-catalogue-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.badge-catalogue-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   TIMESHEET — Team two-panel layout + Insights tab
   ============================================================ */

/* Team tab two-panel layout */
.ts-team-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}
.ts-team-sidebar {
  width: 230px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface, var(--bg));
  padding: 8px;
}
.ts-team-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-width: 0;
}

/* Employee card in sidebar */
.ts-emp-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  margin-bottom: 2px;
}
.ts-emp-card:hover { background: var(--primary-light, #EEF4FF); }
.ts-emp-card--active {
  background: var(--primary-light, #EEF4FF);
  font-weight: 600;
}
.ts-emp-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
}
.ts-emp-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ts-emp-card-info { min-width: 0; flex: 1; }
.ts-emp-card-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-emp-card-dept { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-emp-card-meta { text-align: right; flex-shrink: 0; }
.ts-emp-card-hours { font-size: 12px; font-weight: 700; color: var(--primary); display: block; }
.ts-emp-card-pending { font-size: 10px; color: #F59E0B; display: block; }

/* "All Submissions" item in sidebar */
.ts-sidebar-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: background 0.12s;
}
.ts-sidebar-all:hover { background: var(--primary-light, #EEF4FF); }
.ts-sidebar-all--active { background: var(--primary-light, #EEF4FF); }
.ts-sidebar-divider {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 12px 6px;
}

/* Person header in team main area */
.ts-person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Sub-tabs inside person view */
.ts-sub-tabs {
  display: flex;
  gap: 2px;
  background: var(--border);
  border-radius: 8px;
  padding: 3px;
}
.ts-sub-tab-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ts-sub-tab-btn:hover { color: var(--text); }
.ts-sub-tab-btn--active {
  background: var(--bg, #fff);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Person week-view read-only cards (approve/reject inline) */
.ts-card-approve-bar {
  display: flex;
  gap: 6px;
  padding: 6px 8px 2px;
}
.ts-card-approve-bar .btn { flex: 1; font-size: 11px; padding: 3px 0; }

/* History / Monthly table styles */
.ts-history-week-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ts-history-week-label { font-size: 13px; font-weight: 600; min-width: 160px; }
.ts-history-week-hours { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 50px; }
.ts-history-badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* Monthly summary card */
.ts-month-card {
  background: var(--surface, var(--bg));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.ts-month-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ts-month-name { font-size: 15px; font-weight: 700; }
.ts-month-total { font-size: 20px; font-weight: 800; color: var(--primary); }
.ts-month-approved { font-size: 12px; color: #1D9E75; }
.ts-month-breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ts-month-proj-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-light, #EEF4FF);
  color: var(--primary);
  font-weight: 500;
}

/* ── Insights Tab ─────────────────────────────────────────── */
.ts-insights-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ts-insights-section-title:first-child { margin-top: 0; }

.ts-chart-card {
  background: var(--surface, var(--bg));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.ts-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.ts-chart-wrap {
  position: relative;
  height: 200px;
}
.ts-chart-wrap--donut {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.ts-donut-legend { flex: 1; min-width: 0; }
.ts-donut-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.ts-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ts-donut-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-donut-val { font-weight: 600; }

/* ── Insights: delta table ───────────────────────────────── */
.ts-delta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ts-delta-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--border);
}
.ts-delta-table thead th:not(:first-child) { text-align: right; }
.ts-delta-table tbody tr { border-bottom: 1px solid var(--border-light, var(--border)); }
.ts-delta-table tbody tr:last-child { border-bottom: none; }
.ts-delta-table tbody td {
  padding: 10px 8px;
  vertical-align: middle;
}
.ts-delta-table tbody td:not(:first-child) { text-align: right; }
.ts-delta-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ts-delta-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.ts-delta-up   { background: rgba(29,158,117,0.12); color: #1D9E75; }
.ts-delta-down { background: rgba(239,68,68,0.12);  color: #EF4444; }
.ts-delta-flat { background: var(--border);          color: var(--text-muted); }
.ts-delta-new  { background: rgba(15,71,153,0.12);  color: #0F4799; }

/* ── Sidebar Accordion ───────────────────────────────────── */
.nav-accordion-children {
  display: none;
  padding-left: 8px;
}
.nav-accordion--open .nav-accordion-children { display: block; }
.nav-accordion-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: none; border: none; cursor: pointer;
  text-align: left;
}
.nav-accordion-chevron {
  margin-left: auto;
  transition: transform 0.2s;
}
.nav-accordion--open .nav-accordion-chevron { transform: rotate(180deg); }
.nav-item--child {
  font-size: 13px;
  padding-left: 24px;
}

/* ── Attendance Calendar ─────────────────────────────────── */
.att-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.att-cal-grid--header { margin-bottom: 4px; }
.att-cal-dow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}
.att-cal-cell {
  min-height: 64px;
  border-radius: 6px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  border: 1px solid transparent;
  background: var(--surface);
  position: relative;
}
.att-cal-cell--empty  { background: transparent; border: none; }
.att-cal-cell--today  { border-color: var(--primary); }
.att-cal-cell--weekend { background: var(--bg); opacity: 0.6; }
.att-cal-cell--holiday { background: #FEF3C7; border-color: #F59E0B; }
.att-cal-cell--leave   { background: #EEF2FF; border-color: #6366F1; }
.att-cal-cell--wfh     { background: #ECFDF5; border-color: #059669; }
.att-cal-cell--client-visit { background: #E0F2FE; border-color: #0EA5E9; }
.att-cal-cell--present { background: #D1FAE5; border-color: #1D9E75; }
.att-cal-cell--partial { background: #FEF3C7; border-color: #F59E0B; }
.att-cal-cell--absent  { background: #FEE2E2; border-color: #EF4444; }
.att-cal-cell--no-data { background: var(--surface); opacity: 0.5; }
.att-cal-cell--future  { background: var(--bg); opacity: 0.4; }
.att-cal-day {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}
.att-cal-label {
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.2;
}
.att-cal-time {
  font-size: 10px;
  font-weight: 600;
  color: #065F46;
  line-height: 1.3;
}
.att-cal-time--out { color: #1F2937; }
.att-cal-time--cv  { color: #0369A1; }
.att-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.att-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.att-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Attendance: clickable cells, event dot, day-detail modal ── */
.att-cal-cell--clickable { cursor: pointer; transition: filter 0.12s, box-shadow 0.12s; }
.att-cal-cell--clickable:hover { filter: brightness(0.97); box-shadow: 0 0 0 2px var(--primary) inset; }
.att-cal-event-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EC4899;
}
.att-day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.att-day-row:last-child { border-bottom: none; }
.att-day-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.att-day-tag--holiday { background: #FEF3C7; color: #B45309; }
.att-day-tag--leave   { background: #EEF2FF; color: #4F46E5; }
.att-day-tag--wfh     { background: #ECFDF5; color: #059669; }
.att-day-tag--client-visit { background: #E0F2FE; color: #0369A1; }
.att-day-tag--present { background: #D1FAE5; color: #065F46; }
.att-day-tag--absent  { background: #FEE2E2; color: #B91C1C; }
.att-day-tag--event   { background: #FCE7F3; color: #BE185D; }
