@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #F4F6F9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f0f4f8;
  --sidebar-w: 210px;
  --accent: #0B5FA5;
  --accent-dark: #17344A;
  --accent2: #F28C00;
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #27ae60;
  --text-primary: #333333;
  --text-secondary: #777777;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 8px 25px rgba(0,0,0,0.06);
  --transition: 0.25s ease;
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── LAYOUT ─────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 52, 74, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 90;
}
.sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.sidebar-open {
  overflow: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.nav-section-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 12px 20px 4px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav-item.active {
  background: rgba(79,142,247,0.12);
  color: var(--accent);
  border-left-color: var(--accent);
}
.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.nav-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.nav-title {
  color: inherit;
  font-weight: 600;
  word-break: break-word;
}
.nav-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  word-break: break-word;
}
.nav-item.active .nav-subtitle {
  color: var(--accent);
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 4px;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--bg-hover); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.user-info .user-name { font-size: 13px; font-weight: 600; }
.user-info .user-role {
  font-size: 11px; color: var(--text-secondary);
  text-transform: capitalize;
}
.sidebar-logout {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: rgba(240,95,95,0.1);
  border: 1px solid rgba(240,95,95,0.25);
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition);
}
.sidebar-logout:hover { background: rgba(240,95,95,0.2); text-decoration: none; }

/* ─── CHANGE PASSWORD MODAL ───────────────────────────── */
.cp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23,52,74,0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.cp-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.cp-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  margin: 16px;
}
.cp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.cp-modal-header h3 { font-size: 16px; font-weight: 600; }
.cp-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0 4px;
}
.cp-modal-close:hover { color: var(--text-primary); }
.cp-modal-body { padding: 20px; }
.cp-modal-body .form-group { margin-bottom: 14px; }
.cp-modal-body .form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.cp-hint { font-weight: 400; color: var(--text-secondary); font-size: 12px; }
.cp-modal-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}
.cp-modal-alert.is-error { background: rgba(231,76,60,0.1); color: var(--danger); border: 1px solid rgba(231,76,60,0.25); }
.cp-modal-alert.is-success { background: rgba(39,174,96,0.1); color: var(--success); border: 1px solid rgba(39,174,96,0.25); }
.cp-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ─── MAIN CONTENT ────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── TOP BAR ─────────────────────────────────────────── */
.topbar {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
}
.notif-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.notif-btn:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ─── PAGE BODY ───────────────────────────────────────── */
.page-body {
  padding: 28px;
  flex: 1;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header .subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ─── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.stat-card-btn { cursor: pointer; }
.stat-card-btn.stat-card-active { outline: 2px solid var(--primary, #4f46e5); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(79,142,247,0.15); }
.stat-icon.green  { background: rgba(0,200,150,0.15); }
.stat-icon.orange { background: rgba(245,166,35,0.15); }
.stat-icon.red    { background: rgba(240,95,95,0.15); }
.stat-icon.purple { background: rgba(160,100,240,0.15); }
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ─── TABLE ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.table-wrap table { min-width: 720px; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ─── BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-new       { background: rgba(142,68,173,0.15); color: #8e44ad; }
.badge-assigned  { background: rgba(11,95,165,0.15);  color: var(--accent); }
.badge-wo_created { background: rgba(242,140,0,0.15); color: var(--accent2); }
.badge-surveyor_appointed { background: rgba(9,132,227,0.15); color: #0984e3; }
.badge-vcvr_drafted { background: rgba(225,112,85,0.15); color: #e17055; }
.badge-vcvr_review { background: rgba(253,203,110,0.2); color: #e67e22; }
.badge-vcvr_final { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-wo_closed { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-draft     { background: rgba(119,119,119,0.15); color: var(--text-secondary); }
.badge-under_review { background: rgba(242,140,0,0.15); color: var(--accent2); }
.badge-revision  { background: rgba(231,76,60,0.15); color: var(--danger); }
.badge-final     { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-open      { background: rgba(11,95,165,0.15); color: var(--accent); }
.badge-sent      { background: rgba(242,140,0,0.15); color: var(--accent2); }
.badge-paid      { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-outstanding { background: rgba(214,158,46,0.18); color: #b7791f; }
.badge-cancelled { background: rgba(231,76,60,0.15); color: var(--danger); }
.badge-success   { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-inactive  { background: rgba(119,119,119,0.15); color: var(--text-secondary); }

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { filter: brightness(0.9); text-decoration: none; color: #fff; }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { filter: brightness(0.9); text-decoration: none; color: #fff; }
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover { filter: brightness(0.9); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* ─── FORMS ───────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=number],
input[type=tel], select, textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.1);
}
select option { background: var(--bg-card); }
textarea { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  grid-column: 1 / -1;
}

/* ─── ALERTS ──────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-error   { background: rgba(240,95,95,0.1);   border: 1px solid rgba(240,95,95,0.25);   color: #f8a0a0; }
.alert-success { background: rgba(46,199,107,0.1);  border: 1px solid rgba(46,199,107,0.25);  color: #7ee5a2; }
.alert-info    { background: rgba(79,142,247,0.1);  border: 1px solid rgba(79,142,247,0.25);  color: #9cc4f9; }
.alert-warning { background: rgba(245,166,35,0.1);  border: 1px solid rgba(245,166,35,0.25);  color: #f9ce7a; }

/* ─── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── TIMELINE ────────────────────────────────────────── */
.timeline { list-style: none; position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute;
  left: -20px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
}
.timeline-content { font-size: 13px; }
.timeline-time { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ─── PHOTO GRID ──────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.photo-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-primary);
}
.photo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.photo-label {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ─── LOGIN PAGE ──────────────────────────────────────── */
.login-layout {
  display: flex;
  min-height: 100vh;
}
.login-hero {
  flex: 1;
  background:
    linear-gradient(120deg, rgba(23,52,74,.92), rgba(11,95,165,.88)),
    url("../images/hero.jpg") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: white;
  padding: 60px;
}
.login-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  background: url("../images/logo.png") no-repeat center;
  background-size: contain;
  opacity: 0.06;
  pointer-events: none;
}
.login-hero .hero-content {
  max-width: 600px;
  z-index: 1;
}
.login-hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.login-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}
.btn-warning-hero {
  background: var(--accent2);
  color: white;
  border: none;
  font-weight: 600;
  padding: 14px 35px;
  border-radius: 50px;
  display: inline-block;
  margin-top: 30px;
  text-decoration: none;
  transition: opacity var(--transition);
}
.btn-warning-hero:hover {
  opacity: 0.9;
  color: white;
  text-decoration: none;
}
.login-form-container {
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 20px;
}
@media(max-width: 900px){
  .login-hero { display: none; }
  .login-form-container { width: 100%; }
}
.login-box {
  width: 100%;
  max-width: 400px;
  padding: 48px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .brand {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo .tagline { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.login-box h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-box .sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
.btn-login {
  width: 100%;
  padding: 11px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--transition);
  margin-top: 4px;
}
.btn-login:hover { opacity: 0.9; }

/* ─── PAGINATION ──────────────────────────────────────── */
.pagination { display: flex; gap: 6px; margin-top: 20px; align-items: center; }
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background var(--transition);
}
.pagination a:hover { background: var(--bg-hover); text-decoration: none; color: var(--text-primary); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── PUBLIC VCVR PAGE ────────────────────────────────── */
.public-page {
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 40px 20px;
}
.public-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.public-header {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 1024px) {
  :root {
    --sidebar-w: 195px;
  }
  .page-body {
    padding: 20px;
  }
  .card {
    padding: 20px;
  }
  .form-grid,
  .form-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: min(86vw, 320px);
    max-width: 320px;
    transform: translateX(-100%);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .topbar {
    height: auto;
    min-height: 60px;
    padding: 10px 16px;
  }
  .topbar-title {
    font-size: 16px;
    line-height: 1.3;
    word-break: break-word;
  }
  .page-body {
    padding: 16px;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header h1 {
    font-size: 20px;
  }
  .page-header .flex,
  .page-header > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }
  .card {
    padding: 16px;
    border-radius: 10px;
  }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 16px; }
  .btn {
    white-space: normal;
    justify-content: center;
    text-align: center;
  }
  .btn-sm {
    width: 100%;
  }
  .action-btns {
    width: 100%;
  }
  .action-btns .btn {
    width: 100%;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .timeline {
    padding-left: 20px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr 1fr 1fr 0.5fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="width:100%; max-width:500px;"] {
    max-width: 100% !important;
  }
  [style*="margin-left:8px"],
  [style*="margin-left:6px"] {
    margin-left: 0 !important;
  }
  .nav-item {
    padding: 12px 18px;
    gap: 12px;
  }
  .nav-title {
    font-size: 13px;
  }
  .nav-subtitle {
    font-size: 10.5px;
  }
  .table-wrap {
    margin-inline: -16px;
    padding-inline: 16px;
  }
}

@media (max-width: 480px) {
  .page-body {
    padding: 12px;
  }
  .topbar {
    padding: 10px 12px;
  }
  .card {
    padding: 14px;
  }
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .notif-btn,
  .mobile-menu-btn {
    width: 36px;
    height: 36px;
  }
  .table-wrap {
    margin-inline: -12px;
    padding-inline: 12px;
  }
}

/* ─── UTILITIES ───────────────────────────────────────── */
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
