
:root {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface2: #F0EDE6;
  --border: #E2DDD5;
  --border2: #CCC8BF;
  --text: #1A1714;
  --text2: #6B6560;
  --text3: #9C978F;
  --accent: #01321D;
  --accent-light: #E0EDE7;
  --accent-dark: #002415;
  --green: #2A7A4B;
  --green-light: #E0F0E8;
  --blue: #1A5A8A;
  --blue-light: #DEEBf5;
  --amber: #B87A10;
  --amber-light: #FFF3D6;
  --red: #C03030;
  --red-light: #FCE8E8;
  --purple: #6040A0;
  --purple-light: #EDE8F8;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(26,23,20,0.08);
  --shadow-lg: 0 8px 32px rgba(26,23,20,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* LAYOUT */
.shell { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #01321D;
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.sidebar-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.2s;
}

.sidebar-logo img:hover { opacity: 1; }

.logo-mark {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
}

.sidebar-section {
  padding: 8px 12px;
  margin-top: 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 8px 6px;
  font-family: 'DM Mono', monospace;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.72);
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.95); }
.nav-item.active { background: rgba(255,255,255,0.14); color: #ffffff; font-weight: 600; }

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.20);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  font-family: 'DM Mono', monospace;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.20);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.90); }
.user-role { font-size: 11px; color: rgba(255,255,255,0.45); }

/* MAIN */
.main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* CONTENT */
.content { padding: 28px; flex: 1; }

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.page-subtitle { font-size: 13px; color: var(--text2); margin-top: 3px; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border2); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
}

.card-body { padding: 18px 20px; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.stat-card.green::before { background: var(--green); }
.stat-card.blue::before { background: var(--blue); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.red::before { background: var(--red); }
.stat-card.purple::before { background: var(--purple); }

.stat-label { font-size: 11px; color: var(--text3); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-family: 'DM Mono', monospace; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -1px; }
.stat-sub { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* TABLES */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead tr {
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gray { background: var(--surface2); color: var(--text2); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-red { background: var(--red-light); color: var(--red); }
.stat-card.red::before { background: var(--red); }

/* GRADE BADGES */
.grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
}

.grade-S { background: #1A1714; color: #F5C842; }
.grade-A { background: var(--green-light); color: var(--green); }
.grade-B { background: var(--blue-light); color: var(--blue); }
.grade-C { background: var(--amber-light); color: var(--amber); }
.grade-D { background: var(--red-light); color: var(--red); }
.grade-E { background: var(--surface2); color: var(--text2); }

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: 'Sora', sans-serif;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(1,50,29,0.10);
}

.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* TABS */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Sora', sans-serif;
}

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

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,23,20,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.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: 17px; font-weight: 700; }
.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* VENDOR AVATAR */
.vendor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}

/* STARS */
.stars { display: flex; gap: 2px; }
.star { color: var(--amber); font-size: 13px; }
.star.empty { color: var(--border2); }

/* PROGRESS BAR */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s;
}

/* SEARCH */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  color: var(--text3);
  pointer-events: none;
}

.search-input {
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Sora', sans-serif;
  background: var(--surface);
  color: var(--text);
  outline: none;
  width: 240px;
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--accent); }

/* STATUS DOT */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-gray { background: var(--text3); }

/* CHECKLIST */
.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.checklist li:last-child { border-bottom: none; }

.check-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border2);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.check-box.checked { background: var(--green); border-color: var(--green); color: white; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}

.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty-text { font-size: 13px; }

/* ALERT */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-warning { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(184,122,16,0.2); }
.alert-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,48,48,0.2); }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid rgba(42,122,75,0.2); }
.alert-info { background: var(--blue-light); color: var(--blue); border: 1px solid rgba(26,90,138,0.2); }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* VENDOR CARD */
.vendor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
}

.vendor-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(1,50,29,0.08);
}

/* RATING WIDGET */
.rating-stars { display: flex; gap: 4px; cursor: pointer; }
.rating-star { font-size: 22px; color: var(--border2); transition: color 0.1s; }
.rating-star.active, .rating-star:hover { color: var(--amber); }

/* CHECKIN SCANNER */
.scanner-area {
  background: var(--text);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.scanner-pulse {
  width: 160px;
  height: 160px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(1,50,29,0.40); }
  50% { box-shadow: 0 0 0 16px rgba(1,50,29,0); }
}

.scanner-line {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 1.8s ease-in-out infinite;
}

@keyframes scan {
  0% { top: 20px; }
  50% { top: 130px; }
  100% { top: 20px; }
}

/* DASHBOARD CHECK-IN TABLE */
.checkin-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background 0.1s;
}

.checkin-row:hover { background: var(--bg); }
.checkin-row:last-child { border-bottom: none; }

.checkin-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  flex-shrink: 0;
}

.status-arrived { background: var(--green-light); }
.status-pending { background: var(--amber-light); }
.status-late { background: var(--red-light); }
.status-cleared { background: var(--surface2); }

/* PROGRESS STEPS */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
  font-family: 'DM Mono', monospace;
}

.step.active .step-dot { background: var(--accent); color: white; }
.step.done .step-dot { background: var(--green); color: white; }

.step-label { font-size: 11px; color: var(--text3); margin-top: 5px; text-align: center; }
.step.active .step-label { color: var(--accent); font-weight: 600; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-bottom: 18px;
}

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

/* UTILITY */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text2); }
.text-small { font-size: 12px; }
.text-mono { font-family: 'DM Mono', monospace; }
.fw-600 { font-weight: 600; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* PAGE VIEWS */
.page-view { display: none; }
.page-view.active { display: block; }

/* NOTIFICATION DOT */
.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
}

/* EVENT CARD */
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}

.event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.event-card-banner {
  height: 6px;
  background: var(--accent);
}

.event-card-banner.upcoming { background: var(--blue); }
.event-card-banner.live { background: var(--green); }
.event-card-banner.past { background: var(--border2); }

.event-card-body { padding: 18px; }

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

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

.page-view.active { animation: fadeIn 0.2s ease; }

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease;
  max-width: 320px;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warning { background: var(--amber); }

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

/* LIVE INDICATOR */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-light);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  font-family: 'DM Mono', monospace;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  transition: all 0.15s;
}

.filter-chip:hover { background: var(--bg); color: var(--text); }
.filter-chip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* VENDOR DETAIL */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: 'DM Mono', monospace;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 13.5px;
}

.info-label { color: var(--text2); width: 140px; flex-shrink: 0; font-size: 13px; }
.info-value { color: var(--text); flex: 1; font-weight: 400; }

/* TIMELINE */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.timeline-time { font-size: 11px; color: var(--text3); font-family: 'DM Mono', monospace; margin-bottom: 2px; }
.timeline-text { font-size: 13px; }


/* ── Additional styles for PHP version ── */
.notif-panel{position:absolute;right:0;top:44px;width:340px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);z-index:200;max-height:400px;overflow-y:auto}
.notif-panel-header{padding:14px 16px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;font-size:14px}
.notif-item{display:flex;align-items:flex-start;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer;transition:background 0.1s;font-size:13px}
.notif-item:hover{background:var(--bg)}
.notif-item.unread{background:var(--accent-light)}
.notif-icon{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:5px}
.notif-icon.info{background:var(--blue)}.notif-icon.warning{background:var(--amber)}.notif-icon.danger{background:var(--red)}.notif-icon.success{background:var(--green)}
.notif-wrap{position:relative}
.stat-card.red::before{background:var(--red)}
.stat-card.purple::before{background:var(--purple)}
.badge-red{background:var(--red-light);color:var(--red)}
.alert-danger{background:var(--red-light);color:var(--red);border:1px solid rgba(192,48,48,0.2)}
.hidden{display:none!important}
[data-tab-content]{transition:none}
.form-check{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;padding:5px 0}
.form-check input{accent-color:var(--accent);width:15px;height:15px}
.modal-lg{max-width:800px}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:768px){.detail-grid,.grid-2,.grid-3,.form-row,.form-row-3{grid-template-columns:1fr}.sidebar{transform:translateX(-100%);transition:transform 0.2s}.sidebar.open{transform:translateX(0)}.main{margin-left:0}}
