body { background: #eef2f6; color: #172033; }
.login-page { min-height: 100vh; background: #eef2f6; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #0e2638 0%, #102b40 46%, #eef2f6 46%, #eef2f6 100%); }
.login-card { width: min(100%, 440px); background: #fff; border-radius: 8px; padding: 28px; box-shadow: 0 18px 45px rgba(15, 23, 42, .22); border-top: 5px solid #d6b35d; }
.login-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 16px; }
.login-brand img { width: 78px; height: 78px; object-fit: contain; border: 1px solid #e4d1a0; border-radius: 8px; padding: 6px; background: #fff; }
.login-kicker { color: #102b40; font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.login-brand h1 { margin: .2rem 0 0; color: #9a741f; font-size: 1rem; font-weight: 800; line-height: 1.1; }
.login-copy { color: #667085; margin-bottom: 22px; }
.login-card .form-label { color: #344054; font-weight: 700; }
.login-card .form-control { border-radius: 7px; border-color: #d7dde6; }
.login-card .form-control:focus { border-color: #d6b35d; box-shadow: 0 0 0 .2rem rgba(214, 179, 93, .18); }
.login-card .btn-primary { background: #102b40; border-color: #102b40; border-radius: 7px; font-weight: 800; }
.login-card .btn-primary:hover { background: #0e2638; border-color: #0e2638; }
.login-footer { margin-top: 18px; color: #98a2b3; font-size: .82rem; text-align: center; font-weight: 700; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: #0e2638; color: #fff; flex: 0 0 250px; height: 100vh; position: sticky; top: 0; overflow-y: auto; overflow-x: hidden; box-shadow: 8px 0 24px rgba(15, 23, 42, .12); }
.brand { display: flex; align-items: center; gap: .75rem; padding: 1rem .9rem .75rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand img { width: 54px; height: 54px; flex: 0 0 54px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.brand-title { font-size: .9rem; line-height: 1.15; font-weight: 800; }
.brand-subtitle { color: #d6b35d; font-size: .82rem; font-weight: 700; margin-top: 2px; }
.user-chip { margin: .85rem .85rem .6rem; padding: .7rem .75rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.user-name { font-size: .9rem; font-weight: 700; }
.user-role { color: #b9c6d2; font-size: .78rem; margin-top: 2px; }
.sidebar-nav { padding: .35rem .6rem 1rem; gap: .18rem; }
.sidebar .nav-link { color: #dbeafe; padding: .62rem .75rem; border-radius: 7px; font-size: .92rem; line-height: 1.15; white-space: normal; display: flex; align-items: center; gap: .65rem; }
.sidebar .nav-link i, .nav-section-label i { color: #d6b35d; width: 18px; flex: 0 0 18px; text-align: center; }
.nav-section-label { color: #9fb0bf; display: flex; align-items: center; gap: .65rem; padding: .72rem .75rem .35rem; font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.nav-collapse-toggle { width: 100%; border: 0; background: transparent; text-align: left; }
.nav-chevron { color: #9fb0bf !important; transition: transform .2s ease; }
.nav-collapse-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.sidebar-submenu { margin: .15rem 0 .35rem; padding-left: .35rem; border-left: 1px solid rgba(214,179,93,.28); }
.sidebar .nav-link-child { padding-left: 1.25rem; background: rgba(255,255,255,.035); }
.sidebar .nav-link:hover { background: rgba(214,179,93,.16); color: #fff; }
.content { flex: 1; min-width: 0; padding: 22px; overflow-x: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.topbar-kicker { color: #667085; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.topbar h1 { font-size: 1.45rem; margin: 0; font-weight: 800; }
.dashboard-hero { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: #102b40; color: #fff; border-radius: 8px; padding: 22px; margin-bottom: 16px; border-left: 6px solid #d6b35d; box-shadow: 0 10px 26px rgba(15, 23, 42, .12); }
.dashboard-hero h2 { margin: 0; font-size: 1.6rem; font-weight: 800; }
.dashboard-hero p { margin: .35rem 0 0; color: #d9e5ee; max-width: 720px; }
.hero-label, .section-kicker { color: #d6b35d; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.hero-mark img { width: 86px; height: 86px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }
.quick-actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-bottom: 16px; }
.quick-action { display: inline-flex; align-items: center; min-height: 38px; padding: .5rem .8rem; background: #fff; border: 1px solid #d7dde6; color: #172033; text-decoration: none; border-radius: 7px; font-weight: 700; box-shadow: 0 5px 16px rgba(15, 23, 42, .05); }
.quick-action:hover { border-color: #d6b35d; color: #102b40; }
.stat-card { border: 0; border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); overflow: hidden; }
.stat-card .card-body { border-top: 4px solid #102b40; }
.stat-card .number { font-size: 2rem; line-height: 1; font-weight: 800; margin-top: .45rem; }
.stat-label { color: #667085; font-size: .82rem; font-weight: 700; }
.stat-foot { color: #98a2b3; font-size: .78rem; margin-top: .35rem; }
.stat-green .card-body { border-top-color: #20875a; }
.stat-gold .card-body { border-top-color: #d6b35d; }
.stat-blue .card-body { border-top-color: #2274a5; }
.stat-slate .card-body { border-top-color: #667085; }
.stat-red .card-body { border-top-color: #b42318; }
.table-card, .form-card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.08rem; font-weight: 800; }
.dashboard-table thead th { color: #667085; font-size: .78rem; text-transform: uppercase; border-top: 0; }
.dashboard-table tbody tr:hover { background: #f8fafc; }
.cashbox-inline-form { display: grid; grid-template-columns: 110px 100px auto; gap: .35rem; min-width: 300px; }
.vehicle-grid-table { padding: 0; overflow: hidden; }
.grid-table { margin: 0 !important; border-collapse: separate; border-spacing: 0; }
.grid-table thead th { background: #102b40; color: #fff; border: 0; font-size: .74rem; letter-spacing: 0; text-transform: uppercase; padding: .9rem .85rem; white-space: nowrap; }
.grid-table tbody td { padding: .85rem; border-color: #edf0f5; vertical-align: middle; }
.grid-table tbody tr:hover td { background: #f8fafc; }
.grid-table tbody tr:last-child td { border-bottom: 0; }
.plate-pill { display: inline-flex; align-items: center; min-height: 30px; padding: .25rem .55rem; border-radius: 6px; background: #eef4f8; color: #102b40; border: 1px solid #d5e0e8; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.grid-actions { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.grid-actions form { margin: 0; }
.grid-actions .btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vehicle-card { background: #fff; border-radius: 8px; border: 1px solid #dfe5ee; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); padding: 16px; }
.vehicle-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: 14px; }
.vehicle-plate { color: #102b40; font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.vehicle-sub { color: #667085; font-size: .86rem; margin-top: 3px; }
.vehicle-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vehicle-meta span { display: block; color: #667085; font-size: .74rem; font-weight: 700; text-transform: uppercase; }
.vehicle-meta strong { display: block; color: #172033; font-size: .9rem; font-weight: 800; overflow-wrap: anywhere; }
.vehicle-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid #edf0f5; }
.vehicle-actions form { margin: 0; }
.checkpoint-inline-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(120px, .8fr) auto; gap: .4rem; min-width: 420px; }
.checkpoint-actions { display: inline-flex; margin: 0 .25rem .25rem 0; }
.travel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.travel-grid > div { background: #f8fafc; border: 1px solid #e5eaf1; border-radius: 8px; padding: 12px; }
.travel-grid span { display: block; color: #667085; font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.travel-grid strong { display: block; color: #172033; font-size: .95rem; margin-top: 3px; overflow-wrap: anywhere; }
.travel-wide { grid-column: span 3; }
.travel-hms { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.travel-hms input { text-align: center; font-weight: 700; }
.security-form-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.security-form-paper { --security-font-size: 1.06rem; background: #fff; border: 1px solid #c9d2df; border-radius: 8px; padding: 28px 38px; max-width: 840px; min-height: 1000px; margin: 0 auto; color: #111827; font-family: "Times New Roman", serif; font-size: var(--security-font-size); box-shadow: 0 14px 32px rgba(15, 23, 42, .10); }
.security-form-header { text-align: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #111827; }
.security-form-header img { width: 118px; height: 90px; object-fit: contain; display: block; margin: 0 auto 4px; }
.security-form-header h2 { margin: 0; font-size: 1.28rem; font-weight: 800; letter-spacing: 0; }
.security-form-header h3 { margin: 2px 0; font-size: 1.22rem; font-style: italic; font-weight: 800; letter-spacing: 0; }
.security-form-header h4 { margin: 4px 0 0; color: #111827; font-size: 1.08rem; font-weight: 800; text-decoration: underline; letter-spacing: 0; }
.security-form-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #d7dde6; font-size: var(--security-font-size); }
.security-form-meta span { font-weight: 800; }
.security-form-body { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; margin-top: 18px; }
.security-left-column { min-width: 0; }
.security-person-photo { text-align: center; font-family: "Times New Roman", serif; font-size: var(--security-font-size); font-weight: 700; color: #111827; }
.security-person-photo img { width: 118px; height: 138px; object-fit: cover; border: 2px solid #111827; display: block; margin: 0 auto 6px; background: #f8fafc; padding: 3px; }
.security-side-details { grid-column: 1 / -1; margin-top: 12px; padding: 12px 14px 4px; border: 1px solid #d7dde6; line-height: 1.32; }
.security-form-fields { line-height: 1.42; padding-top: 2px; }
.security-form-line { min-height: 30px; display: grid; grid-template-columns: 158px minmax(0, 1fr); align-items: center; column-gap: 8px; border-bottom: 1px solid transparent; font-size: var(--security-font-size); }
.security-form-line span, .security-form-line div span { font-weight: 800; white-space: nowrap; }
.security-form-line strong, .security-form-line div strong { font-weight: 700; overflow-wrap: anywhere; min-width: 0; display: inline-block; padding: 0 2px; line-height: 1.25; font-size: var(--security-font-size); }
.security-side-details .security-form-line { grid-template-columns: 142px minmax(0, 1fr); min-height: 28px; margin-bottom: 3px; align-items: center; }
.security-side-details .security-form-line span { white-space: nowrap; }
.security-side-details .security-form-line strong { padding: 0; }
.security-pair-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: center; }
.security-wide-line { grid-template-columns: 238px minmax(0, 1fr) !important; }
.security-long-label { grid-template-columns: 340px minmax(0, 1fr) !important; }
.security-form-line.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-bottom: 0; }
.security-form-line.two-fields > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: end; column-gap: 8px; min-width: 0; }
.photo-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; }
.camera-preview { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; background: #111827; border-radius: 8px; object-fit: cover; }
.camera-select { width: auto; min-width: 150px; }
@media (max-width: 840px) {
  .login-shell { padding: 16px; background: #eef2f6; }
  .login-card { padding: 22px; }
  .login-brand img { width: 64px; height: 64px; }
  .login-kicker { font-size: 1.22rem; }
  .login-brand h1 { font-size: .95rem; }
  .app-shell { display: block; }
  .sidebar { width: 100%; height: auto; position: static; overflow: visible; }
  .brand { padding: .8rem 1rem; }
  .brand img { width: 46px; height: 46px; flex-basis: 46px; }
  .sidebar-nav { flex-direction: row !important; overflow-x: auto; padding: .4rem .75rem .85rem; }
  .sidebar .nav-link { white-space: nowrap; flex: 0 0 auto; }
  .nav-section-label { flex: 0 0 auto; padding: .62rem .75rem; }
  .sidebar .nav-link-child { padding-left: .75rem; }
  .user-chip { display: none; }
  .content { padding: 16px; }
  .dashboard-hero { align-items: flex-start; }
  .hero-mark { display: none; }
  .section-head { align-items: flex-start; }
  .vehicle-meta { grid-template-columns: 1fr; }
  .checkpoint-inline-form { min-width: 360px; }
  .travel-grid { grid-template-columns: 1fr; }
  .travel-wide { grid-column: auto; }
  .security-form-paper { padding: 22px; min-height: 0; }
  .security-form-meta, .security-form-body, .security-form-line.two-fields, .security-pair-row { display: block; }
  .security-person-photo { margin-bottom: 16px; }
  .security-form-line, .security-form-line.two-fields > div { margin-bottom: 8px; }
  .security-wide-line, .security-form-line, .security-side-details .security-form-line { grid-template-columns: 1fr !important; }
  .security-form-line span, .security-form-line div span { white-space: normal; }
}
@media print {
  .sidebar, .topbar, .passenger-tabs, .security-form-actions, form, .dataTables_filter, .dataTables_length, .dataTables_paginate, .dataTables_info { display: none !important; }
  .content { padding: 0; }
  .table-card { box-shadow: none; padding: 0; }
  .tab-pane { display: none !important; }
  #securityForm { display: block !important; opacity: 1 !important; }
  .security-form-paper { border: 0; box-shadow: none; max-width: none; padding: 0; }
  .security-side-details { break-inside: avoid; }
}
