/* =============================================
   FIA & Associates - Premium Design System
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg-primary: #07090f;
  --bg-secondary: #0d1117;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-sidebar: #080b12;
  --accent: #00c896;
  --accent-dark: #009e78;
  --accent-light: rgba(0,200,150,0.12);
  --accent-glow: rgba(0,200,150,0.25);
  --gold: #f5a623;
  --gold-light: rgba(245,166,35,0.12);
  --red: #ff4d6d;
  --red-light: rgba(255,77,109,0.12);
  --blue: #4d94ff;
  --blue-light: rgba(77,148,255,0.12);
  --purple: #9b59b6;
  --text-primary: #e8f0fe;
  --text-secondary: #8899aa;
  --text-muted: #4a5568;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(0,200,150,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: 'Inter', sans-serif; cursor: pointer; }
input, select, textarea { font-family: 'Inter', sans-serif; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 20% 50%, rgba(0,200,150,0.05) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(77,148,255,0.05) 0%, transparent 60%),
              var(--bg-primary);
}
.login-card {
  width: 420px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: fadeIn 0.5s ease;
}
.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px; justify-content: center;
}
.login-logo img { width: 60px; height: 60px; border-radius: 12px; object-fit: contain; background: white; padding: 4px; }
.login-logo-text h1 { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.login-logo-text span { font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.login-title { text-align: center; margin-bottom: 32px; }
.login-title h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.login-title p { color: var(--text-secondary); font-size: 0.9rem; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); background: rgba(0,200,150,0.05); box-shadow: 0 0 0 3px var(--accent-glow); }
.btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--accent), #00a87f);
  border: none; border-radius: var(--radius-sm);
  color: #000; font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.5px; margin-top: 8px;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(0,200,150,0.3);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,200,150,0.4); }
.btn-login:active { transform: translateY(0); }
.login-error { color: var(--red); font-size: 0.85rem; text-align: center; margin-top: 12px; display: none; }
.login-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.8rem; }

/* ===== MAIN LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100; overflow-y: auto;
}
.sidebar-brand {
  padding: 24px 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; }
.sidebar-brand-text h2 { font-size: 0.95rem; font-weight: 700; line-height: 1.2; }
.sidebar-brand-text span { font-size: 0.68rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.sidebar-nav { flex: 1; padding: 20px 12px; }
.nav-section { margin-bottom: 8px; }
.nav-section-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; padding: 0 8px; margin: 16px 0 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s; cursor: pointer; margin-bottom: 2px;
}
.nav-link i { width: 18px; text-align: center; font-size: 0.9rem; }
.nav-link:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-link.active { background: var(--accent-light); color: var(--accent); border: 1px solid var(--border-accent); }
.nav-link .badge { margin-left: auto; background: var(--accent); color: #000; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-card); border-radius: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #009e78); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #000; flex-shrink: 0; }
.user-info-text { flex: 1; overflow: hidden; }
.user-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.btn-logout { background: none; border: none; color: var(--text-muted); font-size: 1rem; padding: 4px; cursor: pointer; transition: color 0.2s; }
.btn-logout:hover { color: var(--red); }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; }
.content-header {
  padding: 24px 32px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
}
.page-title { font-size: 1.4rem; font-weight: 700; }
.page-subtitle { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }
.content-body { padding: 28px 32px; }

/* ===== TABS ===== */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
  transition: all 0.25s;
}
.stat-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.02)); }
.stat-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 14px; }
.stat-icon.green { background: var(--accent-light); color: var(--accent); }
.stat-icon.gold { background: var(--gold-light); color: var(--gold); }
.stat-icon.red { background: var(--red-light); color: var(--red); }
.stat-icon.blue { background: var(--blue-light); color: var(--blue); }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== GLASS CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent); }
.card-body { padding: 22px; }

/* ===== DATA TABLES ===== */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .actions { display: flex; gap: 6px; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; border: none; transition: all 0.2s; cursor: pointer; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #00a87f); color: #000; box-shadow: 0 2px 12px rgba(0,200,150,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,200,150,0.35); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-danger { background: var(--red-light); border: 1px solid rgba(255,77,109,0.3); color: var(--red); }
.btn-danger:hover { background: rgba(255,77,109,0.2); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 8px; }
.btn-gold { background: var(--gold-light); border: 1px solid rgba(245,166,35,0.3); color: var(--gold); }
.btn-gold:hover { background: rgba(245,166,35,0.2); }

/* ===== MODAL-CARD (compact modal variant used by team/staff dialogs) ===== */
.modal-card { background: #0f1622; border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease; }
.form-control {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.form-control:focus { outline: none; border-color: var(--accent); background: rgba(0,200,150,0.05); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
.btn-xs { padding: 4px 10px; font-size: 0.72rem; }

/* ===== TEAM MEMBER MODAL — STAFF ACCESS CARD DESIGN ===== */
.team-modal { max-width: 760px; }
.team-modal-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
@media (max-width: 720px) { .team-modal-grid { grid-template-columns: 1fr; } }

.pw-field-wrap { position: relative; }
.pw-field-wrap .form-control { padding-right: 44px; font-family: 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.5px; }
.pw-toggle-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.95rem; padding: 4px; }
.pw-toggle-eye:hover { color: var(--accent); }
.pw-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pw-strength-track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.pw-strength-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.25s ease, background 0.25s ease; }
.pw-strength-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); white-space: nowrap; }

.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  cursor: pointer; transition: all 0.18s;
}
.role-option:hover { border-color: var(--role-color, var(--accent)); background: rgba(255,255,255,0.05); }
.role-option.active { border-color: var(--role-color, var(--accent)); background: var(--role-bg, var(--accent-light)); box-shadow: 0 0 0 1px var(--role-color, var(--accent)) inset; }
.role-option-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--role-bg, var(--accent-light)); color: var(--role-color, var(--accent)); font-size: 0.85rem; }
.role-option-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.role-option-desc { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; line-height: 1.3; }

.access-card-shell { position: sticky; top: 0; }
.access-card-eyebrow { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.access-card-eyebrow i { color: var(--role-color, var(--accent)); }
.access-card {
  position: relative;
  background: linear-gradient(155deg, #131c2c 0%, #0c121d 100%);
  border: 1px solid var(--role-color, var(--border-accent));
  border-radius: 16px;
  padding: 20px 20px 16px;
  overflow: hidden;
  transition: border-color 0.25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.access-card::before {
  content: ''; position: absolute; top: -40%; right: -30%; width: 220px; height: 220px;
  background: radial-gradient(circle, var(--role-color, var(--accent)) 0%, transparent 70%);
  opacity: 0.10; pointer-events: none;
}
.access-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.access-card-brand { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 0.82rem; color: var(--text-secondary); letter-spacing: 0.4px; }
.access-card-brand span { display: block; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.58rem; letter-spacing: 1.5px; color: var(--text-muted); margin-top: 2px; }
.access-card-seal { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--role-color, var(--accent)); color: var(--role-color, var(--accent)); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.access-card-id { display: flex; align-items: center; gap: 14px; }
.access-card-avatar {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  background: var(--role-bg, var(--accent-light)); color: var(--role-color, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.3rem;
  border: 1px solid var(--role-color, var(--border-accent));
}
.access-card-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.15rem; color: var(--text-primary); line-height: 1.25; }
.access-card-role-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--role-color, var(--accent)); }
.access-card-perf { border-top: 1px dashed rgba(255,255,255,0.15); margin: 16px -20px 12px; position: relative; }
.access-card-perf::before, .access-card-perf::after { content: ''; position: absolute; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-primary); }
.access-card-perf::before { left: -7px; }
.access-card-perf::after { right: -7px; }
.access-card-cred-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; margin-bottom: 4px; }
.access-card-cred-row .k { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-size: 0.62rem; font-weight: 700; }
.access-card-cred-row .v { font-family: monospace; color: var(--text-primary); font-weight: 700; letter-spacing: 0.4px; }


/* ===== BADGES / STATUS ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-active { background: var(--accent-light); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-closed { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.badge-pending { background: var(--gold-light); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }
.badge-paid { background: var(--accent-light); color: var(--accent); }
.badge-partial { background: var(--blue-light); color: var(--blue); }

/* ===== FORMS ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.9rem;
  transition: all 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); background: rgba(0,200,150,0.04); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-field select option { background: #1a2234; }
.form-field textarea { resize: vertical; min-height: 80px; }

/* ===== SEARCH BOX ===== */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input { width: 100%; padding: 10px 14px 10px 38px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem; }
.search-input:focus { outline: none; border-color: var(--accent); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
.modal { background: #0f1622; border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease; }
.modal-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { background: var(--red-light); color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== CREDENTIAL BOX ===== */
.credential-box { background: rgba(0,200,150,0.07); border: 1px solid var(--border-accent); border-radius: 12px; padding: 18px; margin-top: 12px; }
.credential-box h4 { color: var(--accent); margin-bottom: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.credential-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0,200,150,0.1); font-size: 0.88rem; }
.credential-row:last-child { border: none; }
.credential-label { color: var(--text-secondary); }
.credential-value { font-weight: 700; font-family: monospace; font-size: 1rem; color: var(--accent); letter-spacing: 1px; }
.copy-note { font-size: 0.76rem; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== HEARING LIST ===== */
.hearing-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.hearing-item:last-child { border: none; }
.hearing-date-box { width: 52px; height: 52px; background: var(--accent-light); border: 1px solid var(--border-accent); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.hearing-day { font-size: 1.2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.hearing-month { font-size: 0.6rem; color: var(--accent); text-transform: uppercase; font-weight: 600; }
.hearing-info h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.hearing-info p { font-size: 0.78rem; color: var(--text-secondary); }

/* ===== FILE SIZE ===== */
.file-size { font-size: 0.75rem; color: var(--text-muted); }

/* ===== AUDIT SEARCH SPECIFIC ===== */
.audit-search-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.audit-result-count { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 12px; }

/* ===== DASHBOARD GRID ===== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-grid.three { grid-template-columns: 1fr 1fr 1fr; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TOAST NOTIFICATION ===== */
.toast { position: fixed; bottom: 28px; right: 28px; background: #1a2234; border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; z-index: 9999; transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); max-width: 360px; }
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--border-accent); }
.toast.success i { color: var(--accent); }
.toast.error { border-color: rgba(255,77,109,0.4); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--blue); }

/* ===== CLIENT PORTAL SPECIFIC ===== */
.client-hero { background: linear-gradient(135deg, rgba(0,200,150,0.08), rgba(77,148,255,0.05)); border: 1px solid var(--border-accent); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; display: flex; align-items: center; gap: 20px; }
.client-avatar-lg { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #009e78); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; color: #000; flex-shrink: 0; }
.client-hero-info h2 { font-size: 1.4rem; font-weight: 700; }
.client-hero-info p { color: var(--text-secondary); font-size: 0.88rem; margin-top: 4px; }
.client-id-tag { display: inline-block; background: var(--accent-light); border: 1px solid var(--border-accent); color: var(--accent); font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin-top: 8px; letter-spacing: 1px; font-family: monospace; }

/* ===== INFO GRID ===== */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { padding: 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; }
.info-item-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.info-item-value { font-size: 0.92rem; font-weight: 600; }

/* ===== UPLOAD AREA ===== */
.upload-area { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 28px; text-align: center; transition: all 0.2s; cursor: pointer; }
.upload-area:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-area i { font-size: 2rem; color: var(--text-muted); margin-bottom: 8px; display: block; }
.upload-area p { color: var(--text-secondary); font-size: 0.88rem; }

/* ===== KANBAN COMPLIANCE PIPELINE ===== */
.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-col {
  flex: 1;
  min-width: 280px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kanban-col-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.kanban-col-count {
  background: var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  color: var(--text-secondary);
}
.kanban-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: all 0.2s;
}
.kanban-card:hover {
  border-color: var(--accent);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.kanban-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.kanban-card-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* ===== VISUAL CALENDAR ===== */
.calendar-container {
  display: flex;
  flex-direction: column;
}
.calendar-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.calendar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-day-label {
  background: var(--bg-sidebar);
  color: var(--text-muted);
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.calendar-cell {
  background: #0d1117;
  min-height: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calendar-cell.other-month {
  opacity: 0.3;
}
.calendar-cell.today {
  background: rgba(0,200,150,0.03);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}
.calendar-date-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.calendar-cell.today .calendar-date-num {
  color: var(--accent);
}
.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calendar-event {
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.calendar-event.hearing {
  background: var(--accent-light);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}
.calendar-event.appointment {
  background: var(--blue-light);
  color: var(--blue);
  border-left: 3px solid var(--blue);
}

/* ===== NOTES SECTION ===== */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}
.note-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.note-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.78rem;
}
.note-author {
  font-weight: 600;
  color: var(--text-primary);
}
.note-role-badge {
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-left: 6px;
  letter-spacing: 0.5px;
}
.note-date {
  color: var(--text-muted);
}
.note-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.note-input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.note-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: none;
  height: 42px;
}

/* ===== AUDIT WARNING ===== */
.audit-warning-banner {
  background: var(--red-light);
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.audit-badge {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(255,77,109,0.3);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { :root { --sidebar-w: 220px; } }
@media (max-width: 700px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .audit-search-form { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ===================================================
   INVOICE PRINT STYLES (Screen preview + Print)
   =================================================== */

.invoice-container {
  background: #ffffff;
  color: #1a1a2e;
  padding: 40px 48px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 800px;
  position: relative;
}

/* --- Header --- */
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.invoice-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.invoice-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: #f5f5f5;
  padding: 4px;
}
.invoice-brand-info h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0c1b33;
  margin: 0;
}
.invoice-brand-info span {
  font-size: 0.72rem;
  color: #00a87f;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}
.invoice-meta-top {
  text-align: right;
}
.invoice-meta-top h3 {
  font-size: 2rem;
  font-weight: 900;
  color: #0c1b33;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.invoice-meta-top p {
  font-size: 0.85rem;
  color: #444;
  margin: 2px 0;
}

/* --- Divider --- */
.invoice-divider {
  border: none;
  border-top: 3px solid #0c1b33;
  margin: 0 0 28px 0;
}

/* --- Bill From / Bill To --- */
.invoice-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.invoice-bill-from h4,
.invoice-bill-to h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: #00a87f;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.invoice-bill-from strong,
.invoice-bill-to strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #0c1b33;
  margin-bottom: 4px;
}
.invoice-bill-from p,
.invoice-bill-to p {
  font-size: 0.83rem;
  color: #555;
  margin: 2px 0;
}

/* --- Service Table --- */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.invoice-table thead tr {
  background: #0c1b33;
  color: #ffffff;
}
.invoice-table thead th {
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
}
.invoice-table tbody tr {
  border-bottom: 1px solid #e8e8e8;
}
.invoice-table tbody tr:last-child { border-bottom: none; }
.invoice-table tbody td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: #333;
}

/* --- Summary Block --- */
.invoice-summary-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 40px;
}
.invoice-summary-table {
  width: 280px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.balance-row {
  background: #0c1b33;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
}

/* --- Footer: Seal + Signature --- */
.invoice-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 20px;
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}
.invoice-status-seal {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 3px;
  border: 3px solid currentColor;
  transform: rotate(-10deg);
  opacity: 0.85;
}
.seal-paid    { color: #009e78; border-color: #009e78; }
.seal-partial { color: #e67e22; border-color: #e67e22; }
.seal-pending { color: #cc2a4a; border-color: #cc2a4a; }

.invoice-signature-block {
  text-align: center;
  min-width: 200px;
}
.sig-line {
  width: 180px;
  height: 1px;
  background: #0c1b33;
  margin: 0 auto 8px;
}
.invoice-signature-block strong {
  display: block;
  font-size: 0.85rem;
  color: #0c1b33;
  font-weight: 700;
}
.invoice-signature-block p {
  font-size: 0.78rem;
  color: #777;
  margin-top: 2px;
}

/* ===================================================
   @MEDIA PRINT — Print only the invoice
   =================================================== */
@media print {
  html, body { background: #ffffff !important; }
  /* Force color printing */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Hide everything on the page */
  body > * { display: none !important; }

  /* Show only the invoice or cause list modal overlay and its content */
  #invoice-print-modal,
  #causelist-print-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
  }
  #invoice-print-modal .modal,
  #causelist-print-modal .modal,
  #causelist-print-modal .modal-card {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }
  #invoice-print-modal .modal-body,
  #causelist-print-modal .modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: white !important;
  }
  #invoice-print-modal .invoice-container { padding: 20mm 22mm !important; border-radius: 0 !important; min-height: auto !important; }
  #invoice-print-modal .invoice-logo { display: inline-block !important; width: 64px !important; height: 64px !important; object-fit: contain !important; border-radius: 8px !important; visibility: visible !important; }
  #invoice-print-modal .invoice-brand { display: flex !important; align-items: center !important; gap: 14px !important; }
  .causelist-print-sheet {
    padding: 12mm 15mm !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9pt !important;
    display: block !important;
  }

  /* Hide the modal header and footer buttons */
  .no-print,
  .modal-header,
  .modal-footer { display: none !important; }

  /* Remove page margins */
  @page {
    margin: 0;
    size: A4 portrait;
  }
}

.search-result-item:hover {
  background: rgba(0, 200, 150, 0.1);
}

.invoice-auto-note {
  font-size: 0.68rem;
  font-style: italic;
  color: #999;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* ===== SKELETON LOADERS ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.skeleton-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
}
.skeleton-line.w-20 { width: 20%; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }

.skeleton-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.skeleton-stat-icon { width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px; }
.skeleton-stat-value { height: 28px; width: 60%; margin-bottom: 8px; }
.skeleton-stat-label { height: 10px; width: 80%; }

/* ===== MOBILE HAMBURGER ===== */
.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
@media (max-width: 700px) { .hamburger-btn { display: flex; } }

/* ===== MOBILE SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ===== CUSTOM CONFIRM MODAL ===== */
.confirm-modal {
  background: #0f1622;
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  animation: slideUp 0.25s ease;
  overflow: hidden;
}
.confirm-modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}
.confirm-modal-icon.danger { background: var(--red-light); color: var(--red); }
.confirm-modal-icon.warning { background: var(--gold-light); color: var(--gold); }
.confirm-modal-body {
  padding: 32px 28px 24px;
  text-align: center;
}
.confirm-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.confirm-modal-msg {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.confirm-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== ENHANCED TAB TRANSITIONS ===== */
.tab-content.active {
  animation: tabEnter 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes tabEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 404 / ERROR PAGE ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  text-align: center;
}
.error-page-code {
  font-size: 6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #4d94ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}
.error-page-msg {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== KEYBOARD SHORTCUT BADGE ===== */
.kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted);
}

/* ===== RATE LIMIT WARNING ===== */
.rate-limit-msg {
  background: var(--red-light);
  border: 1px solid rgba(255,77,109,0.4);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

/* ===== AUTO-REFRESH INDICATOR ===== */
.auto-refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.auto-refresh-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.badge-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(255,77,109,0.3); }
.badge-primary { background: var(--blue-light); color: var(--blue); border: 1px solid rgba(77,148,255,0.3); }
.badge-warning { background: var(--gold-light); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }
.badge-info { background: rgba(155,89,182,0.12); color: var(--purple); border: 1px solid rgba(155,89,182,0.3); }
.badge-secondary { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* ===================================================
   DAILY CAUSE LIST & CASE DIARY STYLES
   =================================================== */
.court-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.court-badge-sc {
  background: rgba(212, 175, 55, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.court-badge-tax {
  background: rgba(0, 200, 150, 0.12);
  color: #10b981;
  border: 1px solid rgba(0, 200, 150, 0.35);
}
.court-badge-judge {
  background: rgba(77, 148, 255, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(77, 148, 255, 0.35);
}
.court-badge-other {
  background: rgba(155, 89, 182, 0.12);
  color: #a855f7;
  border: 1px solid rgba(155, 89, 182, 0.35);
}

.cl-filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cl-filter-pill:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.cl-filter-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

/* Case Diary Timeline */
.diary-timeline {
  position: relative;
  padding-left: 24px;
}
.diary-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.diary-timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.diary-timeline-dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent);
}
.diary-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.diary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.diary-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.diary-order-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.diary-order-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}
.diary-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

