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

/* ============ CSS VARIABLES — NAVY BLUE THEME ============ */
:root {
  --navy: #0f2044;
  --navy-dark: #091530;
  --navy-mid: #1a3260;
  --navy-light: #e8edf5;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-light: #eff6ff;
  --red: #dc2626;
  --red-light: #fef2f2;
  --orange: #ea580c;
  --amber: #d97706;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --grey-900: #111827;
  --grey-800: #1f2937;
  --grey-700: #374151;
  --grey-600: #6b7280;
  --grey-500: #9ca3af;
  --grey-400: #d1d5db;
  --grey-300: #e5e7eb;
  --grey-200: #f3f4f6;
  --grey-100: #f9fafb;
  --grey-50: #fcfcfd;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --navbar-h: 64px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--grey-900); background: #eef1f7; font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; font-size: 14px; }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--navbar-h);
  background: var(--navy);
  border-bottom: 1px solid var(--navy-mid);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex; align-items: center;
  padding: 0 24px; gap: 24px;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: 2px; color: var(--white); }
.brand-sub { font-size: 10px; font-weight: 600; color: #7dd3fc; letter-spacing: 1px; text-transform: uppercase; }

.navbar-links { display: flex; gap: 2px; flex: 1; }
.nav-link { padding: 6px 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: 13px; color: #93c5fd; transition: all .15s; white-space: nowrap; }
.nav-link:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.nav-link.active { background: rgba(255,255,255,0.15); color: var(--white); font-weight: 600; }

.navbar-search { flex: 0 0 220px; }
.search-wrapper { position: relative; }
.navbar-search-input {
  width: 100%; padding: 8px 16px;
  border: none; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  background: #1a3a6e;
  color: #e2e8f0;
  transition: all .2s; outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.navbar-search-input::placeholder { color: #93c5fd; }
.navbar-search-input:focus {
  background: #1e4080;
  color: white;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 0 0 2px #7dd3fc;
}
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  border: 1px solid var(--grey-300); z-index: 500; max-height: 320px; overflow-y: auto;
}
.sd-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--grey-200); text-decoration: none; color: var(--grey-900); }
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--grey-100); }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sd-name { font-weight: 600; flex: 1; color: var(--grey-900); }
.sd-alias { font-size: 11px; color: var(--grey-500); }
.sd-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; flex-shrink: 0; }

.navbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1);
  color: #93c5fd; cursor: pointer; transition: background .15s;
}
.notif-bell:hover { background: rgba(255,255,255,0.2); color: white; }
.notif-count {
  position: absolute; top: 3px; right: 3px;
  background: var(--red); color: white;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: white;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13px; font-weight: 500; color: #bfdbfe; }
.btn-outline-sm {
  background: transparent; color: #93c5fd; border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 500; transition: all .15s; display: inline-flex; align-items: center; gap: 4px;
}
.btn-outline-sm:hover { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.4); }

/* ============ LAYOUT ============ */
.main-content { margin-top: var(--navbar-h); padding: 32px; max-width: 1440px; margin-left: auto; margin-right: auto; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px;
  border: 2px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; text-decoration: none;
}
.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(--navy); color: white; border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy-dark); }
.btn-alert { background: var(--orange); color: white; border-color: var(--orange); }
.btn-alert:hover { background: #c2410c; }
.btn-success { background: var(--green); color: white; border-color: var(--green); }
.btn-success:hover { background: #15803d; }
.btn-outline { background: transparent; color: var(--grey-700); border-color: var(--grey-400); }
.btn-outline:hover { background: var(--grey-200); }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-danger-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger-outline:hover { background: var(--red-light); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.badge-banned      { background: #fee2e2; color: #991b1b; }
.badge-ban-pending { background: #fee2e2; color: #991b1b; }
.badge-warrant     { background: #fef3c7; color: #92400e; }
.badge-missing     { background: #ffedd5; color: #9a3412; }
.badge-cleared     { background: var(--green-light); color: #15803d; }
.badge-lg { padding: 5px 14px; font-size: 12px; }
.pulse-badge { animation: pulseBadge 2s infinite; }
@keyframes pulseBadge { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ============ TAGS ============ */
.tag-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.tag-more { background: var(--grey-200); color: var(--grey-600); border-color: var(--grey-300); }

/* ============ PAGE HEADER ============ */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: 'Montserrat', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--grey-600); margin-top: 4px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: 13px; color: var(--grey-500); margin-bottom: 6px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }

/* ============ STATS GRID ============ */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); border-left: 4px solid transparent;
  transition: all .2s; cursor: pointer; text-decoration: none;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-banned { border-left-color: var(--red); }
.stat-warrant { border-left-color: var(--amber); }
.stat-missing { border-left-color: var(--orange); }
.stat-icon { font-size: 28px; }
.stat-number { font-family: 'Montserrat', sans-serif; font-size: 36px; font-weight: 800; line-height: 1; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--grey-600); font-weight: 500; margin-top: 2px; }

/* ============ SECTION HEADERS ============ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; color: var(--navy); }
.section-link { font-size: 13px; color: var(--accent); font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* ============ DASHBOARD GRID ============ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dash-left, .dash-right { display: flex; flex-direction: column; gap: 0; }
.dash-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }

/* ============ EXPIRY ALERT BAR ============ */
.expiry-alert-bar {
  background: #fffbeb; border-left: 4px solid var(--amber);
  padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.expiry-link { color: var(--accent); font-weight: 600; }
.expiry-link:hover { text-decoration: underline; }

/* ============ ACTIVITY FEED ============ */
.activity-feed { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grey-200); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: var(--grey-400); }
.act-create_person, .act-edit_person { background: var(--accent); }
.act-add_ban, .act-add_warrant { background: var(--red); }
.act-revoke_ban, .act-mark_found { background: var(--green); }
.act-add_missing { background: var(--orange); }
.act-delete_person, .act-remove_missing { background: var(--grey-500); }
.act-login { background: var(--accent); }
.act-export { background: #7c3aed; }
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-person { color: var(--accent); font-weight: 600; }
.activity-person:hover { text-decoration: underline; }
.activity-detail { font-size: 11px; color: var(--grey-500); margin-top: 1px; }
.activity-time { font-size: 11px; color: var(--grey-400); margin-top: 2px; }

/* ============ AUDIT MINI ============ */
.audit-mini { border-top: 1px solid var(--grey-200); padding-top: 12px; }
.audit-mini-item { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--grey-100); font-size: 12px; flex-wrap: wrap; }
.audit-mini-time { color: var(--grey-400); flex-shrink: 0; font-family: monospace; font-size: 11px; }
.audit-mini-user { font-weight: 600; color: var(--grey-700); flex-shrink: 0; }
.audit-mini-action { color: var(--grey-600); }
.audit-mini-detail { color: var(--grey-500); font-style: italic; }

/* ============ RECORD LIST ============ */
.record-list { display: flex; flex-direction: column; gap: 1px; }
.record-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-sm); transition: background .15s; cursor: pointer; border-left: 4px solid transparent; }
.record-item:hover { background: var(--grey-100); }
.record-item-banned { border-left-color: #dc2626 !important; }
.record-item-warrant { border-left-color: #d97706 !important; }
.record-item-missing { border-left-color: #ea580c !important; }
.record-missing-pulse { animation: missingPulse 3s infinite; }
@keyframes missingPulse { 0%,100%{background:transparent} 50%{background:#fff7ed} }
.record-photo { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.record-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { width: 44px; height: 44px; border-radius: 6px; background: var(--grey-200); color: var(--grey-600); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.placeholder-missing { background: #ffedd5; color: var(--orange); }
.placeholder-warrant { background: #fef3c7; color: var(--amber); }
.record-info { flex: 1; min-width: 0; }
.record-name { font-weight: 600; font-size: 14px; color: var(--grey-900); }
.record-meta { font-size: 12px; color: var(--grey-600); margin-top: 1px; }
.record-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* ============ FILTER BAR ============ */
.filter-bar { background: var(--white); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search-input { flex: 1; min-width: 200px; padding: 9px 14px; border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm); font-size: 14px; transition: border .15s; }
.search-input:focus { outline: none; border-color: var(--accent); }
.filter-select { padding: 9px 14px; border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm); background: white; font-size: 13px; cursor: pointer; }
.filter-select:focus { outline: none; border-color: var(--accent); }
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.status-tab { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--grey-600); background: var(--grey-200); transition: all .15s; display: flex; align-items: center; gap: 5px; }
.status-tab:hover { background: var(--grey-300); }
.status-tab.active { background: var(--navy); color: white; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-banned { background: var(--red); }
.dot-warrant { background: var(--amber); }
.dot-missing { background: var(--orange); }
.dot-cleared { background: var(--green); }

/* ============ PERSONS GRID ============ */
.persons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.person-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  cursor: pointer;
  display: block;
  border: 3px solid var(--grey-300);
}
.person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.person-card .card-photo { overflow: hidden; }
.card-banned      { border-color: #dc2626; }
.card-ban-pending { border-color: #dc2626; }
.card-warrant     { border-color: #d97706; }
.card-missing     { border-color: #ea580c; animation: cardPulse 3s infinite; }
@keyframes cardPulse { 0%,100%{border-color:#ea580c} 50%{border-color:#fed7aa} }
.card-photo { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--grey-200); border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder-lg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-size: 48px; font-weight: 800; color: var(--grey-400); background: var(--grey-100); }
.card-status-badge { position: absolute; top: 10px; right: 10px; }
.card-body { padding: 14px; }
.card-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.card-alias { font-size: 12px; color: var(--grey-600); margin-bottom: 2px; }
.card-meta { font-size: 12px; color: var(--grey-600); margin-bottom: 4px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

/* ============ DETAIL LAYOUT ============ */
.detail-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--navbar-h) + 24px); }
.profile-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.profile-photo-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.profile-photo { width: 140px; height: 140px; border-radius: 10px; object-fit: cover; border: 4px solid var(--white); box-shadow: var(--shadow-md); }
.profile-photo-placeholder { width: 140px; height: 140px; border-radius: 10px; background: var(--navy-light); display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-size: 48px; font-weight: 800; color: var(--navy); }
.profile-status-badge { margin-top: 10px; }
.profile-name { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 800; text-align: center; color: var(--navy); }
.profile-alias { text-align: center; font-size: 13px; color: var(--grey-600); margin-top: 2px; }
.profile-details { margin-top: 16px; border-top: 1px solid var(--grey-200); padding-top: 16px; }
.detail-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--grey-100); }
.detail-label { font-size: 12px; color: var(--grey-500); font-weight: 500; flex-shrink: 0; }
.detail-value { font-size: 13px; color: var(--grey-800); text-align: right; }
.profile-tags { margin-top: 14px; }
.tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.profile-description { margin-top: 14px; font-size: 13px; color: var(--grey-700); line-height: 1.6; }
.profile-description .detail-label { display: block; margin-bottom: 4px; }

.info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.info-card-missing { border-left: 4px solid var(--orange); }
.info-card-warrant { border-left: 4px solid var(--amber); }
.info-card-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--navy); }
.info-notes { font-size: 13px; color: var(--grey-700); margin-top: 10px; padding: 10px; background: var(--grey-100); border-radius: var(--radius-sm); line-height: 1.6; }

/* ============ BANNING NOTICES ============ */
.detail-main { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.notices-list { display: flex; flex-direction: column; gap: 16px; }
.notice-card { border-radius: var(--radius-sm); border: 1.5px solid var(--grey-300); padding: 20px; }
.notice-active { border-color: var(--accent); background: #f8faff; }
.notice-historical { opacity: .8; background: var(--grey-100); }
.notice-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.notice-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.notice-number { font-weight: 700; font-size: 13px; color: var(--navy); }
.notice-date { font-size: 12px; color: var(--grey-600); }
.expired-text { color: var(--red); }
.notice-status { display: flex; align-items: center; gap: 8px; }
.notice-location { font-size: 13px; color: var(--grey-700); margin-bottom: 8px; }
.notice-reason { font-size: 13px; color: var(--grey-800); line-height: 1.6; margin-bottom: 8px; }
.notice-evidence { font-size: 13px; color: var(--grey-700); line-height: 1.6; margin-bottom: 8px; padding: 10px; background: var(--grey-100); border-radius: var(--radius-sm); }
.notice-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grey-200); }
.notice-police, .notice-issuer { font-size: 12px; color: var(--grey-500); }
.notice-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.notice-attachments { margin-top: 8px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attachment-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: var(--radius-sm); background: var(--grey-100); border: 1px solid var(--grey-300); font-size: 12px; color: var(--grey-700); font-weight: 500; transition: all .15s; }
.attachment-chip:hover { background: var(--grey-200); }

/* ============ FORMS ============ */
.form-page { max-width: 900px; }
.form-page-narrow { max-width: 480px; margin: 0 auto; }
.record-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 32px; }
.form-sections { display: flex; flex-direction: column; gap: 28px; }
.form-section { padding-bottom: 24px; border-bottom: 1px solid var(--grey-200); }
.form-section:last-child { border-bottom: none; }
.form-section-title { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); border-left: 3px solid var(--accent); padding-left: 10px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--grey-700); }
.form-hint-inline { font-weight: 400; color: var(--grey-500); font-size: 11px; }
.form-hint { font-size: 12px; color: var(--grey-500); margin-top: 4px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-input,
input[type=text], input[type=date], input[type=datetime-local],
input[type=email], input[type=password],
select, textarea {
  padding: 10px 14px; border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm);
  font-size: 14px; background: white; color: var(--grey-900); width: 100%; transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
textarea { resize: vertical; min-height: 90px; }
select { cursor: pointer; }
.form-error { font-size: 12px; color: var(--red); }
.form-error-banner { background: var(--red-light); color: #991b1b; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; font-weight: 500; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--grey-200); flex-wrap: wrap; }

/* Photo upload */
.photo-upload-area { display: flex; gap: 24px; align-items: flex-start; }
.photo-preview-wrap {
  width: 140px; height: 140px; border-radius: var(--radius);
  background: var(--grey-100); border: 2px dashed var(--grey-300);
  overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.card-age { font-size: 12px; font-weight: 500; color: var(--grey-500); }
.profile-age { font-size: 14px; font-weight: 500; color: var(--grey-500); }
.photo-preview-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--grey-400); font-size: 12px; }
.photo-upload-controls { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
#id_photo { display: none; }

/* Tags checkboxes */
.tags-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.tags-checkbox-group label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--grey-300); border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all .15s; }
.tags-checkbox-group label:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.tags-checkbox-group input[type=checkbox] { accent-color: var(--accent); }

/* ============ LOGIN ============ */
.login-container { width: 100%; max-width: 420px; padding: 24px; position: relative; z-index: 1; }
.login-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.login-brand { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: 2px; color: var(--navy); }
.login-brand-sub { font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.login-title { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 6px; color: var(--navy); }
.login-subtitle { font-size: 13px; color: var(--grey-600); margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form input { border-color: var(--grey-300); }
.login-form input:focus { border-color: var(--accent); }
.login-footer { margin-top: 24px; text-align: center; font-size: 12px; color: var(--grey-500); }
.login-disclaimer { margin-top: 8px; font-size: 11px; color: var(--grey-400); }
.login-bg-pattern { position: fixed; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(37,99,235,.15) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(15,32,68,.3) 0%, transparent 50%); pointer-events: none; }

/* ============ NOTIFICATIONS ============ */
.notifications-page { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.notif-list { display: flex; flex-direction: column; gap: 2px; }
.notif-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--radius-sm); border-left: 4px solid transparent; }
.notif-item:hover { background: var(--grey-100); }
.notif-missing { border-left-color: var(--orange); background: #fff7ed; }
.notif-found { border-left-color: var(--green); background: var(--green-light); }
.notif-ban { border-left-color: var(--red); background: var(--red-light); }
.notif-warrant { border-left-color: var(--amber); background: #fffbeb; }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-title { font-weight: 700; font-size: 14px; color: var(--navy); }
.notif-message { font-size: 13px; color: var(--grey-700); margin-top: 2px; }
.notif-meta { font-size: 11px; color: var(--grey-500); margin-top: 4px; }

/* ============ TOASTS ============ */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); border-left: 4px solid var(--accent); padding: 16px; transform: translateX(120%); transition: transform .35s cubic-bezier(.175,.885,.32,1.1); opacity: 0; }
.toast-show { transform: translateX(0); opacity: 1; }
.toast-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.toast-header strong { font-size: 13px; font-weight: 700; color: var(--navy); }
.toast-header button { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--grey-500); line-height: 1; padding: 0; }
.toast-body { font-size: 13px; color: var(--grey-700); line-height: 1.5; }
.toast-link { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--accent); font-weight: 600; }

/* ============ MESSAGES ============ */
.messages-container { position: fixed; top: calc(var(--navbar-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; min-width: 400px; max-width: 600px; }
.message { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); gap: 12px; }
.message-success { background: var(--green-light); color: #14532d; border-left: 4px solid var(--green); }
.message-error { background: var(--red-light); color: #7f1d1d; border-left: 4px solid var(--red); }
.message-warning { background: #fffbeb; color: #78350f; border-left: 4px solid var(--amber); }
.message-info { background: var(--accent-light); color: #1e3a8a; border-left: 4px solid var(--accent); }
.msg-close { background: none; border: none; cursor: pointer; font-size: 18px; opacity: .6; padding: 0; line-height: 1; }

/* ============ ALERTS ============ */
.alert-banner { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 13px; font-weight: 500; }
.alert-missing { background: #fff7ed; color: #7c2d12; border-left: 4px solid var(--orange); }

/* ============ EMPTY STATES ============ */
.empty-state { padding: 24px; text-align: center; color: var(--grey-500); font-size: 13px; }
.empty-state a:not(.btn) { color: var(--accent); }
.empty-state-full { display: flex; flex-direction: column; align-items: center; padding: 80px 24px; gap: 12px; }
.empty-icon { font-size: 48px; }
.empty-state-full h3 { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.empty-state-full p { color: var(--grey-600); font-size: 14px; }

/* ============ TABLE ============ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--grey-500); border-bottom: 2px solid var(--grey-200); background: var(--grey-100); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--grey-200); font-size: 13px; }
.data-table tr:hover td { background: var(--grey-50); }

/* ============ MISC ============ */
.notice-subject-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--navy-light); border-radius: var(--radius-sm); margin-bottom: 20px; border-left: 4px solid var(--navy); }
.confirm-delete-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 48px; text-align: center; }
.confirm-delete-card h2 { font-family: 'Montserrat', sans-serif; font-size: 20px; margin: 16px 0 8px; color: var(--navy); }
.confirm-delete-card p { color: var(--grey-700); margin-bottom: 24px; }
.confirm-icon { font-size: 40px; }
.current-photo { margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; }

/* ============ HAMBURGER ============ */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; background: rgba(255,255,255,0.1);
  border: none; border-radius: 6px; cursor: pointer; padding: 8px; flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px; background: #93c5fd; border-radius: 2px;
  transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 98; opacity: 0; transition: opacity .25s;
}
.mobile-nav-overlay.open { display: block; opacity: 1; }

.mobile-nav-extra { display: none; }
.btn-hide-mobile { }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .navbar-links .nav-link { font-size: 12px; padding: 6px 9px; }
  .navbar-search { flex: 0 0 160px; }
}

@media (max-width: 900px) {
  /* Hamburger visible */
  .hamburger { display: flex; }
  .btn-hide-mobile { display: none !important; }

  /* Slide-in drawer */
  .navbar-links {
    display: flex !important;
    flex-direction: column;
    position: fixed; top: 0; right: -280px; bottom: 0;
    width: 270px; background: var(--navy-dark);
    padding: 80px 16px 32px; gap: 4px;
    z-index: 99; overflow-y: auto;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    box-shadow: -4px 0 20px rgba(0,0,0,.3);
  }
  .navbar-links.open { right: 0; }
  .navbar-links .nav-link {
    font-size: 15px; padding: 12px 16px; border-radius: 8px;
    color: #bfdbfe; border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .navbar-links .nav-link.active { background: rgba(255,255,255,.15); color: white; }
  .mobile-nav-extra { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }

  /* Layout */
  .navbar-search { display: none; }
  .main-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-actions { width: 100%; }
  .messages-container { min-width: unset; width: calc(100% - 32px); left: 16px; transform: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .persons-grid { grid-template-columns: 1fr 1fr; }
  .record-form { padding: 20px; }
  .stat-number { font-size: 28px; }
  .page-title { font-size: 20px; }
  .btn { padding: 8px 14px; font-size: 12px; }
  #toast-container { bottom: 12px; right: 12px; left: 12px; max-width: unset; }
  .form-card { padding: 20px; }
}

/* ============ BEHAVIOUR FLAGS ============ */
.behaviour-flags { display: flex; flex-direction: column; gap: 10px; }
.flag-checkbox {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--grey-300); cursor: pointer;
  transition: all .15s; background: white;
}
.flag-checkbox:hover { border-color: var(--accent); background: var(--accent-light); }
.flag-checkbox input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); flex-shrink: 0; }
.flag-checkbox input:checked ~ .flag-icon,
.flag-checkbox input:checked ~ .flag-text { opacity: 1; }
.flag-violent { border-color: #fca5a5; }
.flag-violent:has(input:checked) { border-color: var(--red); background: #fff1f2; }
.flag-nonverbal { border-color: #93c5fd; }
.flag-nonverbal:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.flag-disabled { border-color: #86efac; }
.flag-disabled:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.flag-icon { font-size: 22px; flex-shrink: 0; }
.flag-text { display: flex; flex-direction: column; gap: 2px; }
.flag-text strong { font-size: 14px; font-weight: 700; color: var(--grey-900); }
.flag-text span { font-size: 12px; color: var(--grey-600); }

/* Flag badges (display) */
.flag-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.flag-badge-violent { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flag-badge-nonverbal { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.flag-badge-disabled { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* Profile flags (large display on sidebar) */
.profile-flags { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--grey-200); }
.profile-flag { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; }

/* Card flags */
.card-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* ============ INCIDENT PHOTO ============ */
.notice-incident-photo { margin-top: 10px; }
.incident-photo-wrap { margin-top: 8px; display: inline-block; }
.incident-photo-wrap a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.incident-photo-thumb { width: 160px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--grey-300); transition: border-color .15s; }
.incident-photo-wrap a:hover .incident-photo-thumb { border-color: var(--accent); }
.incident-photo-caption { font-size: 11px; color: var(--accent); font-weight: 500; }

/* ============ ENHANCED BUTTONS ============ */
.btn-lg { padding: 12px 24px; font-size: 14px; border-radius: 8px; }
.required { color: var(--red); font-weight: 700; }

/* Better form section titles */
.form-section-title { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); border-left: 3px solid var(--accent); padding-left: 10px; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }

/* Login form fixes */
.login-form .form-label { color: var(--grey-700) !important; }
.login-form input { color: var(--grey-900) !important; background: white !important; }
.form-error-banner { display: flex; align-items: center; gap: 8px; }

/* ============ BAN DURATION PICKER ============ */
.duration-picker {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.duration-btn {
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 2px solid var(--grey-300); background: white; color: var(--grey-700);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.duration-btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-light);
}
.duration-btn-active {
  border-color: var(--accent) !important; background: var(--accent) !important;
  color: white !important;
}
.duration-btn-lifetime {
  border-color: #fca5a5; color: #991b1b; background: #fff1f2;
}
.duration-btn-lifetime:hover, .duration-btn-lifetime.duration-btn-active {
  border-color: var(--red) !important; background: var(--red) !important;
  color: white !important;
}
.expiry-display {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--accent-light);
  border: 1.5px solid #93c5fd; border-radius: var(--radius-sm);
  font-size: 13px; color: #1e40af; margin-top: 4px;
}
.expiry-display strong { color: var(--navy); }
.lifetime-display {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #fff1f2;
  border: 1.5px solid #fca5a5; border-radius: var(--radius-sm);
  font-size: 13px; color: #991b1b; margin-top: 4px;
}

/* ============ BAN STATUS — RED ACTIVE / GREEN EXPIRED ============ */
.notice-active-red {
  border-radius: var(--radius-sm);
  border-left: 5px solid #dc2626;
  border-top: 1.5px solid #dc2626;
  border-right: 1.5px solid #dc2626;
  border-bottom: 1.5px solid #dc2626;
  background: #fff8f8;
  padding: 20px;
}
.notice-inactive-green {
  border-radius: var(--radius-sm);
  border-left: 5px solid #16a34a;
  border-top: 1.5px solid #16a34a;
  border-right: 1.5px solid #16a34a;
  border-bottom: 1.5px solid #16a34a;
  background: #f0fdf4;
  padding: 20px;
  opacity: .85;
}

.ban-status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  white-space: nowrap;
}
.ban-status-active {
  background: #dc2626; color: white;
}
.ban-status-expired {
  background: #16a34a; color: white;
}
.ban-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: white;
  flex-shrink: 0;
}
.ban-status-active .ban-status-dot {
  animation: activePulse 1.5s infinite;
}
@keyframes activePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* ============ LOGO IMAGE ============ */
.brand-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo-img { height: 40px; width: auto; object-fit: contain; }
.brand-sub { font-size: 10px; font-weight: 700; color: #7dd3fc; letter-spacing: 1px; text-transform: uppercase; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 28px; }
.login-logo-img { height: 60px; width: auto; object-fit: contain; }

/* Dementia and Mental Health flag styles */
.flag-dementia { border-color: #d8b4fe; }
.flag-dementia:has(input:checked) { border-color: #7c3aed; background: #f5f3ff; }
.flag-mental-health { border-color: #7dd3fc; }
.flag-mental-health:has(input:checked) { border-color: #0284c7; background: #f0f9ff; }
.flag-badge-dementia { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.flag-badge-mental { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

/* ============ CLICKABLE NOTICE CARD ============ */
.notice-card-link {
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--radius-sm); transition: background .15s;
  margin: -4px; padding: 4px;
}
.notice-card-link:hover { background: rgba(0,0,0,.03); }
.notice-click-hint {
  font-size: 12px; color: var(--accent); font-weight: 600;
  margin-top: 10px; display: flex; align-items: center; gap: 4px;
}

/* ============ WARRANT BUTTON & STYLES ============ */
.btn-warrant { background: #d97706 !important; color: white !important; border-color: #d97706 !important; }
.btn-warrant:hover { background: #b45309 !important; border-color: #b45309 !important; }
.ban-status-warrant { background: #d97706; color: white; }
.notice-active-warrant {
  border-radius: var(--radius-sm);
  border-left: 5px solid #d97706;
  border-top: 1.5px solid #d97706;
  border-right: 1.5px solid #d97706;
  border-bottom: 1.5px solid #d97706;
  background: #fffbeb;
  padding: 20px;
}
.status-card-warrant { border-top: 4px solid #d97706; }

/* History group labels */
.history-group { }
.history-group-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--grey-500);
  padding: 8px 0 10px; margin-bottom: 10px;
  border-bottom: 2px solid var(--grey-200);
}


/* ============ DOCUMENT-STYLE DETAIL CARDS ============ */
.doc-card {
  background: white; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.1);
  max-width: 900px; margin: 0 auto 40px; overflow: hidden;
}
.doc-card-red   { border-top: 5px solid #e63329; }
.doc-card-amber { border-top: 5px solid #d97706; }
.doc-card-orange { border-top: 5px solid #ea580c; }

.doc-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 28px 20px; border-bottom: 2.5px solid #e63329; }
.doc-header-left { display: flex; align-items: center; gap: 14px; }
.doc-logo { width: 48px; height: 48px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-logo-lines { width: 26px; }
.doc-logo-lines div { height: 4px; background: white; margin: 4px 0; border-radius: 2px; }
.doc-org { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 900; letter-spacing: 2px; color: #1a1a1a; line-height: 1; }
.doc-org-sub { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; margin-top: 2px; }
.doc-header-right { text-align: right; position: relative; }
.doc-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.doc-subtitle { font-size: 11px; color: #888; margin-top: 2px; }
.doc-stamp { position: absolute; top: -8px; right: -4px; border: 3px solid; padding: 4px 10px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; opacity: 0.3; border-radius: 3px; transform: rotate(-8deg); white-space: nowrap; }

.doc-warning-banner { padding: 10px 28px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: white; text-align: center; }

.doc-meta-bar { display: flex; flex-wrap: wrap; gap: 0; background: #f7f7f7; border-bottom: 1px solid #eee; }
.doc-meta-item { padding: 10px 20px; border-right: 1px solid #eee; min-width: 120px; }
.doc-meta-item span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: #999; font-weight: 700; margin-bottom: 3px; }
.doc-meta-item strong { font-size: 13px; color: #111; font-weight: 600; }

.doc-section { padding: 20px 28px; border-bottom: 1px solid #f0f0f0; }
.doc-section:last-of-type { border-bottom: none; }
.doc-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; border-bottom: 1.5px solid; padding-bottom: 6px; margin-bottom: 14px; }

.doc-identity { display: flex; gap: 20px; }
.doc-photo { width: 110px; height: 110px; border: 2px solid #ddd; border-radius: 5px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 900; color: #ccc; cursor:zoom-in; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.doc-id-fields { flex: 1; }
.doc-field-lg { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 800; color: #111; border-bottom: 2px solid #eee; padding-bottom: 6px; margin-bottom: 12px; }
.doc-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.doc-field { margin-bottom: 8px; }
.doc-field-label { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: #999; font-weight: 700; margin-bottom: 2px; }
.doc-field-value { font-size: 13px; color: #111; border-bottom: 1px solid #eee; padding-bottom: 3px; min-height: 20px; }
.doc-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.doc-text-box { border: 1px solid #ddd; border-radius: 5px; padding: 12px 14px; font-size: 13px; line-height: 1.7; color: #333; background: #fafafa; white-space: pre-wrap; word-break: break-word; margin-top: 6px; }
.doc-incident-photo { margin-top: 8px; position: relative; display: inline-block; border-radius: 5px; overflow: hidden; max-width: 250px; }
.doc-incident-photo img { max-width: 250px; max-height: 200px; object-fit: cover; display: block; }
.doc-photo-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.5); color: white; text-align: center; padding: 6px; font-size: 11px; opacity: 0; transition: opacity .2s; }
.doc-incident-photo:hover .doc-photo-overlay { opacity: 1; }

.doc-signatures { display: flex; gap: 24px; padding: 20px 28px; border-top: 1px solid #eee; }
.doc-sig { flex: 1; text-align: center; }
.doc-sig-line { border-top: 1.5px solid #333; margin: 50px 0 6px; }
.doc-sig-label { font-size: 10px; color: #777; }
.doc-sig-name { font-size: 12px; font-weight: 700; margin-top: 2px; color: #333; }

.doc-footer { display: flex; justify-content: space-between; padding: 10px 28px; background: #f7f7f7; border-top: 1px solid #eee; font-size: 10px; color: #aaa; }

@media (max-width: 600px) {
  .doc-identity { flex-direction: column; }
  .doc-photo { width: 100%; height: 160px; }
  .doc-signatures { flex-direction: column; gap: 12px; }
}

/* ============ INCIDENT DETAIL LAYOUT ============ */
.notice-detail-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.notice-detail-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--navbar-h) + 24px); }
.notice-detail-main { display: flex; flex-direction: column; gap: 20px; }

.notice-status-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.status-dates { display: flex; flex-direction: column; gap: 10px; }
.status-date-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.status-date-row span { color: var(--grey-600); font-size: 12px; white-space: nowrap; }
.status-date-row strong { color: var(--grey-900); text-align: right; font-weight: 600; }

.notice-detail-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 24px; }
.notice-detail-heading { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; color: var(--navy); border-bottom: 1.5px solid var(--grey-200); padding-bottom: 10px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

.nd-field { margin-bottom: 12px; }
.nd-field:last-child { margin-bottom: 0; }
.nd-label { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--grey-500); font-weight: 700; margin-bottom: 3px; }
.nd-value { font-size: 13px; color: var(--grey-900); }
.nd-value.nd-text { line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* Person card in incident sidebar */
.notice-person-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; text-align: center; }
.notice-person-photo { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; margin: 0 auto 10px; background: var(--grey-200); border: 3px solid var(--grey-300); }
.notice-person-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.notice-person-placeholder { width: 80px; height: 80px; border-radius: 8px; background: var(--navy-light); display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 800; color: var(--navy); margin: 0 auto 10px; }
.notice-person-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 2px; }
.notice-person-meta { font-size: 12px; color: var(--grey-600); margin-bottom: 2px; }

/* Full-size incident photo */
.incident-photo-full { position: relative; display: inline-block; border-radius: var(--radius-sm); overflow: hidden; max-width: 480px; width: 100%; }
.incident-photo-full a { display: block; }
.incident-photo-full img { width: 100%; max-height: 360px; object-fit: cover; display: block; border-radius: var(--radius-sm); border: 2px solid var(--grey-300); }
.incident-photo-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.5); color: white; text-align: center; padding: 8px; font-size: 12px; font-weight: 500; opacity: 0; transition: opacity .2s; }
.incident-photo-full:hover .incident-photo-overlay { opacity: 1; }

@media (max-width: 768px) {
  .notice-detail-layout { grid-template-columns: 1fr; }
  .notice-detail-sidebar { position: static; }
  .incident-photo-full { max-width: 100%; }
}
