/* Realistic styling pass for remaining public/protected pages. */
body.site-realistic{
  background:
    radial-gradient(circle at top left,rgba(7,89,184,.13),transparent 32%),
    linear-gradient(180deg,#eef3f8 0%,#f8fafc 52%,#edf2f7 100%);
}
body.site-realistic .shell:not(.officer-lock-shell){
  max-width:1440px;
  margin:0 auto;
}
body.site-realistic .main-panel,
body.site-realistic .forms-panel,
body.site-realistic .departments-panel,
body.site-realistic .policy-panel,
body.site-realistic .officer-lock-panel .officer-access-card{
  overflow:hidden;
  border:1px solid #cbd8e8;
  border-radius:16px;
  background:linear-gradient(180deg,#fff,#f9fbfe);
  box-shadow:0 22px 52px rgba(0,24,64,.12);
}
body.site-realistic .section-head{
  padding:34px 38px;
  color:#fff;
  background:
    linear-gradient(90deg,rgba(0,16,39,.96),rgba(0,61,130,.86)),
    url('/assets/home-police-hero.png') center 53%/cover no-repeat;
  border-bottom:5px solid #d5b458;
}
body.site-realistic .section-head h1{
  color:#fff;
  font-size:clamp(28px,4vw,44px);
  letter-spacing:.035em;
}
body.site-realistic .section-head p{
  max-width:760px;
  color:#dcecff;
  line-height:1.55;
}
body.site-realistic .with-sidebar{
  max-width:1440px;
  margin:0 auto;
  padding:22px;
  gap:22px;
  grid-template-columns:275px minmax(0,1fr);
}
body.site-realistic .with-sidebar .main-panel{
  margin:0;
}
body.site-realistic .sidebar{
  position:sticky;
  top:92px;
  align-self:start;
  min-height:calc(100vh - 130px);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  background:
    linear-gradient(180deg,rgba(0,17,39,.96),rgba(0,45,100,.94)),
    url('/assets/home-police-hero.png') 34% center/cover no-repeat;
  box-shadow:0 22px 48px rgba(0,25,64,.18);
}
body.site-realistic .sidebar h3{
  display:block;
  margin:0 0 18px;
  color:#fff;
  font-size:18px;
  letter-spacing:.08em;
}
body.site-realistic .side-link{
  position:relative;
  margin-bottom:10px;
  padding:15px 16px 15px 18px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  background:rgba(255,255,255,.045);
  color:#e7f1ff;
  letter-spacing:.02em;
  transition:transform .2s ease,background .2s ease,border-color .2s ease;
}
body.site-realistic .side-link:before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:4px;
  border-radius:0 4px 4px 0;
  background:transparent;
}
body.site-realistic .side-link:hover,
body.site-realistic .side-link.active{
  transform:translateX(3px);
  border-color:rgba(213,180,88,.55);
  background:linear-gradient(90deg,rgba(13,99,191,.82),rgba(19,111,217,.58));
}
body.site-realistic .side-link.active:before{
  background:#d5b458;
}
body.site-realistic .grid,
body.site-realistic .academy-grid,
body.site-realistic .departments-grid{
  gap:24px;
  padding:30px 32px 34px;
}
body.site-realistic .tile,
body.site-realistic .form-card,
body.site-realistic .rank-item,
body.site-realistic .rank,
body.site-realistic .codes-section,
body.site-realistic .academy-note,
body.site-realistic .department-dialog,
body.site-realistic .policy-content section{
  border-color:#cfdcea;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f9fbff);
  box-shadow:0 12px 28px rgba(0,34,80,.07);
}
body.site-realistic .tile:hover,
body.site-realistic .form-card:hover,
body.site-realistic .rank-item:hover{
  transform:translateY(-4px);
  box-shadow:0 22px 42px rgba(0,34,80,.14);
}
body.site-realistic .tile-img{
  background:
    linear-gradient(135deg,rgba(0,27,63,.96),rgba(7,89,184,.88)),
    url('/assets/home-police-hero.png') center/cover no-repeat;
  border-bottom:4px solid #d5b458;
}
body.site-realistic .tiny-btn,
body.site-realistic .button-outline,
body.site-realistic .form-card>span{
  border-radius:6px;
  letter-spacing:.06em;
}
body.site-realistic .tiny-btn:hover,
body.site-realistic .button-outline:hover{
  background:#082f69;
  border-color:#082f69;
  color:#fff;
}

body.departments-page.site-realistic .departments-panel{
  border-radius:16px;
}
body.departments-page.site-realistic .departments-kicker{
  color:#d5b458;
  letter-spacing:.16em;
}
body.departments-page.site-realistic .department-card .tile-body{
  padding:22px;
}
body.departments-page.site-realistic .dialog-heading{
  background:
    linear-gradient(90deg,rgba(0,16,39,.96),rgba(0,61,130,.86)),
    url('/assets/home-police-hero.png') center/cover no-repeat;
  border-bottom:5px solid #d5b458;
}
body.departments-page.site-realistic .dialog-icon{
  border:1px solid rgba(213,180,88,.55);
  background:rgba(0,18,42,.65);
}

body.forms-page.site-realistic .forms-panel{
  border-radius:16px;
}
body.forms-page.site-realistic .form-card{
  min-height:255px;
}
body.forms-page.site-realistic .form-card:before{
  height:5px;
  background:linear-gradient(90deg,#d5b458,#0d63bf);
}
body.forms-page.site-realistic .form-card .ico{
  border-color:#d5b458;
  background:radial-gradient(circle at 30% 20%,#0d63bf,#001d42 62%);
}
body.officer-forms-page.site-realistic .section-head:before,
body.forms-page.site-realistic #civilian-forms>.section-head:before{
  border-color:rgba(213,180,88,.48);
  color:#f4d982;
}

body.rank-realistic .rank-ladder,
body.rank-realistic .rank-accordion{
  padding:30px 32px 34px;
}
body.rank-realistic .rank-item,
body.rank-realistic .rank{
  border-left:0;
  overflow:hidden;
  position:relative;
}
body.rank-realistic .rank-item:before,
body.rank-realistic .rank:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:linear-gradient(180deg,#d5b458,#0d63bf);
}
body.rank-realistic .rank-toggle{
  padding:21px 24px;
}
body.rank-realistic .rank-detail-inner{
  background:#fff;
}

body.academy-realistic .academy-card .tile-body{
  padding:22px;
}
body.academy-realistic .academy-note{
  margin:26px 32px 0;
  border-left:6px solid #d5b458;
  background:#fff8df;
}
body.academy-realistic .search{
  border-color:rgba(255,255,255,.28);
  background:rgba(255,255,255,.12);
  color:#fff;
}
body.academy-realistic .search input{
  color:#fff;
  background:transparent;
}
body.academy-realistic .search input::placeholder{
  color:#dcecff;
}
body.academy-realistic .training-dialog .dialog-heading{
  background:
    linear-gradient(90deg,rgba(0,16,39,.96),rgba(0,61,130,.86)),
    url('/assets/home-police-hero.png') center/cover no-repeat;
  border-bottom:5px solid #d5b458;
}

body.officer-lock-page.site-realistic{
  background:
    linear-gradient(90deg,rgba(0,8,22,.92),rgba(0,29,68,.72)),
    url('/assets/home-police-hero.png') center/cover fixed no-repeat;
}
body.officer-lock-page.site-realistic .officer-lock-panel{
  border:0;
  box-shadow:none;
  background:transparent;
}
body.officer-lock-page.site-realistic .officer-access-card{
  backdrop-filter:blur(12px);
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(247,251,255,.94));
  border-top:5px solid #d5b458;
}
body.officer-lock-page.site-realistic .officer-access-icon{
  background:radial-gradient(circle at 30% 20%,#0d63bf,#001d42 62%);
  color:#fff;
  border:2px solid #d5b458;
}

body.policy-realistic .policy-panel{
  overflow:hidden;
}
body.policy-realistic .policy-hero{
  color:#fff;
  background:
    linear-gradient(90deg,rgba(0,16,39,.96),rgba(0,61,130,.86)),
    url('/assets/home-police-hero.png') center 52%/cover no-repeat;
  border-bottom:5px solid #d5b458;
}
body.policy-realistic .policy-hero p,
body.policy-realistic .policy-hero span:last-child{
  color:#dcecff;
}
body.policy-realistic .policy-icon{
  border:1px solid rgba(213,180,88,.55);
  background:rgba(0,18,42,.65);
}
body.policy-realistic .policy-content{
  background:#f4f7fb;
}
body.policy-realistic .policy-content section{
  padding:22px;
}

@media(max-width:950px){
  body.site-realistic .with-sidebar{
    display:block;
    padding:12px;
  }
  body.site-realistic .sidebar{
    position:static;
    display:flex;
    align-items:center;
    gap:10px;
    min-height:auto;
    margin-bottom:14px;
    padding:14px;
    overflow-x:auto;
    border-radius:13px;
  }
  body.site-realistic .sidebar h3{display:none;}
  body.site-realistic .side-link{flex:0 0 auto;margin:0;white-space:nowrap;}
  body.site-realistic .side-link:hover,
  body.site-realistic .side-link.active{transform:none;}
  body.site-realistic .section-head{padding:28px 22px;}
}
@media(max-width:650px){
  body.site-realistic .grid,
  body.site-realistic .academy-grid,
  body.site-realistic .departments-grid,
  body.rank-realistic .rank-ladder,
  body.rank-realistic .rank-accordion{
    padding:18px 14px 24px;
    gap:15px;
  }
  body.site-realistic .section-head h1{font-size:28px;}
  body.officer-lock-page.site-realistic{background-attachment:scroll;}
}
/* Custom 404 page */
.error-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(1, 14, 31, .72), rgba(1, 14, 31, .82)),
    radial-gradient(circle at 20% 20%, rgba(11, 95, 189, .45), transparent 30%),
    linear-gradient(135deg, #06162d 0%, #0a2345 52%, #020914 100%);
  color: #fff;
}
.error-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 82%);
  pointer-events: none;
}
.error-shell {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 84px) 18px;
}
.error-scene {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  color: #001d3d;
  box-shadow: 0 38px 90px rgba(0, 0, 0, .38);
}
.error-visual {
  min-height: 540px;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 42px;
  background:
    linear-gradient(145deg, rgba(0, 29, 61, .94), rgba(7, 89, 184, .86)),
    url('/assets/home-police-hero.png') center/cover;
  isolation: isolate;
}
.error-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, .34), rgba(0, 29, 61, .9));
  z-index: -1;
}
.error-crest {
  width: clamp(150px, 18vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(209, 164, 44, .85);
  box-shadow: 0 24px 54px rgba(0,0,0,.3), inset 0 0 0 12px rgba(255,255,255,.05);
  backdrop-filter: blur(6px);
}
.error-crest img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.35));
}
.error-code {
  display: grid;
  gap: 2px;
  text-align: center;
  color: #fff;
}
.error-code span {
  font-size: clamp(62px, 10vw, 126px);
  font-weight: 950;
  line-height: .85;
  letter-spacing: -.08em;
}
.error-code small {
  color: #d1a42c;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.error-gridline {
  position: absolute;
  inset: auto 28px 28px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #d1a42c, transparent);
  opacity: .9;
}
.error-content {
  padding: clamp(34px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.error-status {
  width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(7, 89, 184, .09);
  color: #0759b8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.error-content h1 {
  margin: 18px 0 12px;
  max-width: 620px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: .95;
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.error-content p {
  max-width: 640px;
  margin: 0;
  color: #465879;
  font-size: 18px;
  line-height: 1.6;
}
.error-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 26px 0 28px;
  padding: 13px 15px;
  border-left: 4px solid #d1a42c;
  background: #f2f6fb;
  color: #465879;
}
.error-reference strong {
  color: #001d3d;
  font-size: 18px;
}
.error-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.error-action {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(0, 35, 76, .15);
  border-radius: 18px;
  background: #fff;
  color: #001d3d;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(0, 31, 70, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.error-action::after {
  content: "->";
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4fb;
  color: #0759b8;
  font-weight: 950;
}
.error-action strong {
  font-size: 17px;
  text-transform: uppercase;
}
.error-action span {
  color: #526480;
  line-height: 1.35;
}
.error-action.primary {
  background: linear-gradient(135deg, #0759b8, #003a7c);
  color: #fff;
  border-color: #0759b8;
}
.error-action.primary span { color: rgba(255,255,255,.84); }
.error-action.primary::after { background: rgba(255,255,255,.18); color: #fff; }
.error-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(0, 31, 70, .16);
  border-color: rgba(7, 89, 184, .44);
}
.error-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 29, 61, .06);
  color: #465879;
}
.error-help strong { color: #001d3d; }
.error-help a {
  margin-left: auto;
  color: #0759b8;
  font-weight: 900;
  text-decoration: none;
}
@media (max-width: 900px) {
  .error-scene { grid-template-columns: 1fr; }
  .error-visual { min-height: 360px; }
  .error-actions { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .error-shell { padding-inline: 10px; }
  .error-scene { border-radius: 20px; }
  .error-content { padding: 28px 20px; }
  .error-visual { min-height: 290px; padding: 28px; }
  .error-help a { margin-left: 0; width: 100%; }
}