:root {
    --ogc-green: #0f7a3b;
    --ogc-green-dark: #095c2b;
    --ogc-green-soft: #e7f4ed;
    --ogc-gray: #667085;
    --ogc-gray-dark: #344054;
    --ogc-border: #d9e2dd;
    --ogc-bg: #f5f7f6;
    --ogc-white: #ffffff;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    background: var(--ogc-bg);
    color: #1f2933;
    font-family: Tahoma, Arial, sans-serif;
    overflow-x: hidden;
}

.app-topbar {
    background: var(--ogc-green-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-brand-logo {
    width: 96px;
    max-height: 34px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    padding: 5px 8px;
}

.app-brand span {
    color: #ffffff;
    font-size: 0.98rem;
    white-space: nowrap;
}

.app-topbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.app-topbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.16rem rgba(255, 255, 255, 0.18);
}

.app-topbar .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(2);
}

.app-topbar .navbar-brand,
.app-topbar .nav-link {
    color: var(--ogc-white);
}

.app-topbar .nav-link:hover,
.app-topbar .navbar-brand:hover {
    color: #d9f2e4;
}

.app-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 57px);
}

.app-sidebar {
    background: var(--ogc-white);
    border-left: 1px solid var(--ogc-border);
    padding: 24px 18px;
}

.sidebar-card {
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f7f4 100%);
    margin-bottom: 18px;
}

.sidebar-label,
.section-caption {
    color: var(--ogc-gray);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.sidebar-name {
    font-weight: 700;
    color: var(--ogc-gray-dark);
}

.sidebar-meta {
    color: var(--ogc-green-dark);
    font-size: 0.88rem;
    margin-top: 4px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    color: var(--ogc-gray-dark);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--ogc-green-dark);
    background: var(--ogc-green-soft);
    border-color: #c7e6d4;
}

.app-content {
    padding: 28px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ogc-gray-dark);
    margin: 0;
}

.metric-card,
.data-panel {
    background: var(--ogc-white);
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.05);
}

.metric-card {
    padding: 20px;
    min-height: 132px;
}

.metric-label {
    color: var(--ogc-gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.metric-value {
    font-size: 2rem;
    line-height: 1;
    color: var(--ogc-green-dark);
    font-weight: 800;
}

.metric-note {
    color: var(--ogc-gray);
    font-size: 0.85rem;
    margin-top: 10px;
}

.data-panel {
    padding: 20px;
}

.data-panel h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ogc-gray-dark);
    margin-bottom: 16px;
}

.table {
    vertical-align: middle;
}

.table a {
    font-weight: 700;
}

.table thead th {
    color: var(--ogc-gray);
    font-size: 0.85rem;
    border-bottom-color: var(--ogc-border);
}

.badge {
    border-radius: 8px;
    font-weight: 700;
}

.btn-success {
    --bs-btn-bg: var(--ogc-green);
    --bs-btn-border-color: var(--ogc-green);
    --bs-btn-hover-bg: var(--ogc-green-dark);
    --bs-btn-hover-border-color: var(--ogc-green-dark);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 122, 59, 0.08), rgba(102, 112, 133, 0.08)),
        var(--ogc-bg);
}

.login-card {
    width: min(100%, 430px);
    background: var(--ogc-white);
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(31, 41, 51, 0.12);
}

.login-title {
    color: var(--ogc-green-dark);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.login-logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin: 0 auto 18px;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--ogc-border);
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ogc-green);
    box-shadow: 0 0 0 0.18rem rgba(15, 122, 59, 0.14);
}

.empty-state {
    border: 1px dashed var(--ogc-border);
    border-radius: 8px;
    padding: 24px;
    color: var(--ogc-gray);
    background: #fbfdfc;
}

.transport-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.transport-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    background: #fbfdfc;
    color: var(--ogc-gray-dark);
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
}

.transport-option:has(input:checked) {
    border-color: var(--ogc-green);
    background: var(--ogc-green-soft);
    color: var(--ogc-green-dark);
}

.transport-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    background: #f1f4f2;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.detail-grid > div {
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    padding: 14px;
    background: #fbfdfc;
}

.detail-grid span,
.detail-label {
    display: block;
    color: var(--ogc-gray);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.detail-grid strong {
    color: var(--ogc-gray-dark);
    font-size: 0.98rem;
}

.detail-text {
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    padding: 14px;
    background: #fbfdfc;
    color: var(--ogc-gray-dark);
}

.manager-note-cell {
    min-width: 240px;
}

.security-request-list {
    display: grid;
    gap: 14px;
}

.security-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: stretch;
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdfc;
}

.security-request-return {
    background: #ffffff;
}

.request-number-link {
    color: var(--ogc-green-dark);
    font-weight: 800;
    text-decoration: none;
    font-size: 1.05rem;
}

.request-number-link:hover {
    color: var(--ogc-green);
    text-decoration: underline;
}

.security-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.security-summary div {
    border-top: 1px solid var(--ogc-border);
    padding-top: 10px;
}

.security-summary span {
    display: block;
    color: var(--ogc-gray);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.security-summary strong {
    color: var(--ogc-gray-dark);
}

.security-action-box {
    border-right: 4px solid var(--ogc-green);
    padding-right: 14px;
}

.security-action-button {
    min-height: 58px;
    font-size: 1.08rem;
    font-weight: 800;
}

.security-note {
    background: var(--ogc-green-soft);
    border: 1px solid #c7e6d4;
    border-radius: 8px;
    color: var(--ogc-green-dark);
    padding: 12px;
    font-weight: 700;
}

.security-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.security-action-buttons .btn {
    min-width: 190px;
}

.quick-action-buttons .btn {
    min-width: 170px;
}

.security-dashboard-overview .metric-card {
    height: 100%;
}

.vehicle-exit-panel[hidden] {
    display: none !important;
}

.vehicle-choice-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.vehicle-choice-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 76px;
    border: 1px solid var(--ogc-border);
    border-radius: 8px;
    background: #fbfdfc;
    padding: 12px;
    cursor: pointer;
}

.vehicle-choice input {
    margin-top: 4px;
}

.vehicle-choice span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vehicle-choice strong {
    color: var(--ogc-gray-dark);
}

.vehicle-choice small {
    color: var(--ogc-gray);
    line-height: 1.45;
}

.vehicle-choice:has(input:checked) {
    border-color: var(--ogc-green);
    background: var(--ogc-green-soft);
}

.vehicle-driver-select:disabled {
    opacity: 0.58;
}

.report-metric {
    font-size: 1.35rem;
    line-height: 1.25;
}

.pwa-install-button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1100;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: var(--ogc-green-dark);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(9, 92, 43, 0.28);
}

.pwa-install-button:hover {
    background: var(--ogc-green);
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    body {
        background: #eef4f1;
    }

    .app-topbar .container-fluid {
        padding-inline: 16px;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .app-topbar .navbar-collapse {
        padding-top: 12px;
    }

    .app-topbar .d-flex {
        align-items: stretch !important;
        flex-direction: column;
        gap: 10px !important;
        padding-bottom: 8px;
    }

    .app-topbar .btn {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-brand-logo {
        width: 82px;
        max-height: 30px;
        padding: 4px 7px;
    }

    .app-brand span {
        font-size: 0.9rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        border-left: 0;
        border-bottom: 1px solid var(--ogc-border);
        padding: 14px 14px 12px;
        position: sticky;
        top: 57px;
        z-index: 20;
    }

    .sidebar-card {
        margin-bottom: 12px;
        padding: 12px;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .sidebar-nav a {
        white-space: nowrap;
        flex: 0 0 auto;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        scroll-snap-align: start;
    }

    .app-content {
        padding: 20px;
        padding-bottom: 92px;
    }

    .content-header {
        margin-bottom: 16px;
    }

    .content-header h1 {
        font-size: 1.35rem;
        line-height: 1.35;
    }

    .metric-card {
        min-height: 104px;
        padding: 16px;
    }

    .metric-value {
        font-size: 1.65rem;
    }

    .transport-options,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-choice-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-request,
    .security-summary {
        grid-template-columns: 1fr;
    }

    .security-action-box {
        border-right: 0;
        border-top: 4px solid var(--ogc-green);
        padding-right: 0;
        padding-top: 14px;
    }
}

@media (max-width: 767.98px) {
    .login-shell {
        align-items: start;
        padding: 18px;
    }

    .login-card {
        margin-top: 28px;
        padding: 22px;
        width: 100%;
    }

    .login-title {
        font-size: 1.3rem;
    }

    .app-content {
        padding: 14px;
        padding-bottom: 104px;
    }

    .data-panel {
        padding: 16px;
    }

    .data-panel h2 {
        font-size: 1.05rem;
    }

    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 1rem;
    }

    textarea.form-control {
        min-height: 110px;
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .row.g-3 {
        --bs-gutter-y: 0.85rem;
    }

    .table-responsive {
        overflow: visible;
    }

    .table {
        border-collapse: separate;
        border-spacing: 0 12px;
        margin-bottom: 0;
    }

    .table thead {
        display: none;
    }

    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tbody tr {
        background: #fbfdfc;
        border: 1px solid var(--ogc-border);
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(31, 41, 51, 0.045);
        padding: 10px 12px;
    }

    .table tbody td {
        border: 0;
        border-bottom: 1px solid #edf2ef;
        padding: 10px 0;
        color: var(--ogc-gray-dark);
    }

    .table tbody td:last-child {
        border-bottom: 0;
    }

    .table tbody td::before {
        content: attr(data-label);
        display: block;
        color: var(--ogc-gray);
        font-size: 0.78rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .table td .btn,
    .table td .d-flex .btn {
        width: 100%;
    }

    .table td .d-flex {
        width: 100%;
    }

    .alert {
        border-radius: 8px;
    }

    .pwa-install-button {
        right: 14px;
        left: 14px;
        bottom: 78px;
        width: calc(100% - 28px);
        min-height: 48px;
    }

    .transport-option {
        min-height: 54px;
    }

    .security-request {
        padding: 14px;
    }

    .security-action-button {
        min-height: 56px;
        width: 100%;
    }

    .detail-grid > div {
        padding: 12px;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 10px;
        left: 10px;
        bottom: 10px;
        z-index: 1050;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--ogc-border);
        border-radius: 8px;
        box-shadow: 0 18px 42px rgba(31, 41, 51, 0.18);
        backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav a {
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 6px;
        border-radius: 8px;
        color: var(--ogc-gray-dark);
        background: #f7faf8;
        border: 1px solid transparent;
        text-decoration: none;
        font-size: 0.86rem;
        font-weight: 800;
        text-align: center;
    }

    .mobile-bottom-nav a.active {
        color: var(--ogc-green-dark);
        background: var(--ogc-green-soft);
        border-color: #c7e6d4;
    }
}

@media (display-mode: standalone) and (max-width: 767.98px) {
    .app-topbar {
        padding-top: env(safe-area-inset-top);
    }

    .mobile-bottom-nav {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

.mobile-drawer-close,
.mobile-menu-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    body {
        background: #eef4f1;
        -webkit-tap-highlight-color: transparent;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .app-topbar {
        min-height: 60px;
        padding: 0;
        position: sticky;
        top: 0;
        z-index: 1180;
        box-shadow: 0 8px 22px rgba(31, 41, 51, 0.16);
    }

    .app-topbar .container-fluid {
        min-height: 60px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding-inline: 12px;
    }

    .app-topbar .navbar-collapse {
        display: none !important;
    }

    .app-brand {
        max-width: calc(100% - 58px);
        gap: 8px;
        margin: 0;
    }

    .app-brand-logo {
        width: 108px;
        max-height: 36px;
        border-radius: 6px;
        padding: 4px 7px;
        flex: 0 0 auto;
    }

    .app-brand span {
        max-width: 124px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.88rem;
    }

    .app-menu-toggle {
        width: 44px;
        height: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        margin-right: auto;
        padding: 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
    }

    .app-layout {
        display: block;
        min-height: calc(100vh - 60px);
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        width: min(86vw, 330px);
        max-width: 330px;
        padding: 14px;
        padding-top: calc(14px + env(safe-area-inset-top));
        overflow-y: auto;
        transform: translateX(105%);
        transition: transform 0.24s ease;
        border-left: 1px solid var(--ogc-border);
        border-bottom: 0;
        box-shadow: -18px 0 42px rgba(31, 41, 51, 0.22);
    }

    .mobile-menu-open .app-sidebar {
        transform: translateX(0);
    }

    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1190;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        margin-bottom: 12px;
        border: 1px solid #c7e6d4;
        border-radius: 8px;
        background: var(--ogc-green-soft);
        color: var(--ogc-green-dark);
        font-weight: 800;
    }

    .sidebar-card {
        padding: 14px;
        margin-bottom: 12px;
    }

    .sidebar-nav {
        display: grid;
        gap: 8px;
        overflow: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
    }

    .sidebar-nav a {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        white-space: normal;
        flex: none;
        scroll-snap-align: none;
    }

    .app-content {
        padding: 12px;
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .content-header {
        display: block;
        margin: 0 -12px 12px;
        padding: 12px 14px;
        background: #ffffff;
        border-bottom: 1px solid var(--ogc-border);
        box-shadow: 0 8px 20px rgba(31, 41, 51, 0.04);
    }

    .section-caption {
        display: none;
    }

    .content-header h1 {
        font-size: 1.24rem;
        line-height: 1.35;
        color: var(--ogc-green-dark);
    }

    .metric-card,
    .data-panel {
        box-shadow: 0 8px 20px rgba(31, 41, 51, 0.06);
    }

    .metric-card {
        min-height: 96px;
        padding: 15px;
    }

    .metric-label {
        margin-bottom: 8px;
    }

    .metric-value {
        font-size: 1.55rem;
    }
}

@media (max-width: 767.98px) {
    .login-shell {
        min-height: 100svh;
        align-items: start;
        place-items: start center;
        padding: 18px;
        width: 100%;
        overflow-x: hidden;
    }

    .login-card {
        width: 100%;
        max-width: calc(100vw - 36px);
        margin-top: 18px;
        padding: 20px;
        justify-self: center;
        min-width: 0;
    }

    .login-logo {
        width: min(190px, 84%);
        margin-bottom: 14px;
    }

    .login-title {
        font-size: 1.24rem;
    }

    .data-panel {
        padding: 14px;
        margin-bottom: 12px;
    }

    .data-panel h2 {
        font-size: 1.02rem;
        margin-bottom: 12px;
    }

    .row.g-3 {
        --bs-gutter-y: 0.75rem;
    }

    .form-label {
        margin-bottom: 6px;
        color: var(--ogc-gray-dark);
        font-size: 0.88rem;
        font-weight: 700;
    }

    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px;
    }

    textarea.form-control {
        min-height: 108px;
    }

    .btn {
        min-height: 46px;
        border-radius: 8px;
        font-weight: 800;
    }

    .transport-options,
    .detail-grid,
    .vehicle-choice-list,
    .security-summary,
    .security-request {
        grid-template-columns: 1fr;
    }

    .vehicle-choice {
        min-height: 64px;
    }

    .transport-option {
        min-height: 54px;
    }

    .table-responsive {
        overflow: visible;
        border: 0;
    }

    .table {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .table thead {
        display: none;
    }

    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tbody tr {
        background: #ffffff;
        border: 1px solid var(--ogc-border);
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(31, 41, 51, 0.045);
        padding: 10px 12px;
    }

    .table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        border: 0;
        border-bottom: 1px solid #edf2ef;
        padding: 8px 0;
        color: var(--ogc-gray-dark);
        text-align: right;
        min-height: 34px;
    }

    .table tbody td:last-child {
        border-bottom: 0;
    }

    .table tbody td::before {
        content: attr(data-label);
        display: block;
        margin: 0;
        color: var(--ogc-gray);
        font-size: 0.76rem;
        font-weight: 800;
        line-height: 1.45;
    }

    .table tbody td[colspan] {
        display: block;
    }

    .table tbody td[colspan]::before {
        display: none;
    }

    .table td .badge {
        justify-self: start;
        white-space: normal;
        text-align: center;
    }

    .table td .btn,
    .table td .d-flex .btn {
        width: 100%;
    }

    .table td .d-flex {
        width: 100%;
        gap: 8px !important;
    }

    .security-request {
        padding: 13px;
        gap: 12px;
    }

    .security-action-box {
        border-right: 0;
        border-top: 4px solid var(--ogc-green);
        padding-right: 0;
        padding-top: 12px;
    }

    .security-action-button {
        min-height: 58px;
        width: 100%;
        font-size: 1rem;
    }

    .security-action-buttons,
    .quick-action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .security-action-buttons .btn,
    .quick-action-buttons .btn {
        width: 100%;
        min-width: 0;
        min-height: 64px;
        padding: 9px 8px;
        font-size: 0.84rem;
        line-height: 1.35;
        white-space: normal;
        text-align: center;
    }

    .security-dashboard-overview {
        margin-bottom: 0;
    }

    .security-dashboard-overview .row {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.65rem;
    }

    .security-dashboard-overview .metric-card {
        min-height: 122px;
        padding: 12px;
    }

    .security-dashboard-overview .metric-label {
        min-height: 38px;
        margin-bottom: 7px;
        font-size: 0.75rem;
        line-height: 1.45;
    }

    .security-dashboard-overview .metric-value {
        font-size: 1.42rem;
    }

    .security-dashboard-overview .metric-note {
        margin-top: 7px;
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .detail-grid > div {
        padding: 12px;
    }

    .empty-state {
        padding: 18px;
    }

    .pwa-install-button {
        right: 12px;
        left: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        width: calc(100% - 24px);
        min-height: 48px;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 8px;
        z-index: 1050;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
        gap: 6px;
        padding: 7px;
        padding-bottom: calc(7px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        border: 1px solid var(--ogc-border);
        border-radius: 8px;
        box-shadow: 0 18px 42px rgba(31, 41, 51, 0.18);
        backdrop-filter: blur(12px);
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        min-width: 0;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 5px;
        border-radius: 8px;
        color: var(--ogc-gray-dark);
        background: #f7faf8;
        border: 1px solid transparent;
        text-decoration: none;
        font-family: inherit;
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1.35;
        text-align: center;
    }

    .mobile-bottom-nav button {
        appearance: none;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav button:active {
        color: var(--ogc-green-dark);
        background: var(--ogc-green-soft);
        border-color: #c7e6d4;
    }
}

@media (max-width: 360px) {
    .app-brand-logo {
        width: 94px;
    }

    .app-brand span {
        max-width: 96px;
        font-size: 0.8rem;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        font-size: 0.72rem;
        padding-inline: 3px;
    }

    .security-action-buttons .btn,
    .quick-action-buttons .btn {
        min-height: 68px;
        font-size: 0.76rem;
        padding-inline: 5px;
    }

    .security-dashboard-overview .metric-card {
        min-height: 128px;
        padding: 10px;
    }

    .security-dashboard-overview .metric-label {
        font-size: 0.7rem;
    }

    .security-dashboard-overview .metric-value {
        font-size: 1.26rem;
    }

    .security-dashboard-overview .metric-note {
        font-size: 0.68rem;
    }

    .table tbody td {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

@media (display-mode: standalone) and (max-width: 991.98px) {
    .app-topbar {
        padding-top: env(safe-area-inset-top);
    }

    .app-content {
        padding-bottom: calc(108px + env(safe-area-inset-bottom));
    }
}
