:root {
    --dsal-navy: #0f2438;
    --dsal-navy-2: #18344f;
    --dsal-blue: #2563eb;
    --dsal-blue-dark: #1d4ed8;
    --dsal-success: #15803d;
    --dsal-warning: #d97706;
    --dsal-danger: #dc2626;
    --dsal-emergency: #991b1b;
    --dsal-bg: #f4f6f8;
    --dsal-card: #ffffff;
    --dsal-text: #172033;
    --dsal-muted: #667085;
    --dsal-border: #dde3ea;
    --dsal-sidebar-width: 256px;
    --dsal-topbar-height: 68px;
    --bs-primary: var(--dsal-blue);
    --bs-primary-rgb: 37, 99, 235;
    --bs-success: var(--dsal-success);
    --bs-success-rgb: 21, 128, 61;
    --bs-warning: var(--dsal-warning);
    --bs-warning-rgb: 217, 119, 6;
    --bs-danger: var(--dsal-danger);
    --bs-danger-rgb: 220, 38, 38;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--dsal-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--dsal-bg);
    color: var(--dsal-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.975rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--dsal-blue-dark);
}

a:hover {
    color: #173eaa;
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.min-w-0 {
    min-width: 0;
}

.dsal-shell {
    display: flex;
    min-height: 100vh;
}

.dsal-sidebar {
    width: var(--dsal-sidebar-width);
    flex: 0 0 var(--dsal-sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1040;
    color: #e8eef5;
    background: var(--dsal-navy);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dsal-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1rem 1rem;
}

.dsal-sidebar-mobile-header {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dsal-brand,
.dsal-guard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
}

.dsal-brand {
    padding: 0.3rem 0.5rem 1.4rem;
}

.dsal-brand:hover,
.dsal-guard-brand:hover {
    color: #fff;
}

.dsal-brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-size: 1.25rem;
}

.dsal-brand strong,
.dsal-guard-brand strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.dsal-brand small,
.dsal-guard-brand small {
    display: block;
    color: #aebdcb;
    font-size: 0.78rem;
    font-weight: 500;
}

.dsal-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.dsal-nav-section + .dsal-nav-section {
    margin-top: 1.35rem;
}

.dsal-nav-heading {
    padding: 0 0.75rem 0.45rem;
    color: #879aad;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dsal-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.15rem 0;
    padding: 0.66rem 0.75rem;
    border-radius: 7px;
    color: #cbd6e0;
    font-size: 0.92rem;
    font-weight: 620;
    text-decoration: none;
}

.dsal-nav-link i {
    width: 1.2rem;
    color: #9eb0c2;
    font-size: 1rem;
    text-align: center;
}

.dsal-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.dsal-nav-link.active {
    color: #fff;
    background: var(--dsal-navy-2);
    box-shadow: inset 3px 0 0 #60a5fa;
}

.dsal-nav-link.active i {
    color: #93c5fd;
}

.dsal-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dsal-user-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.86rem;
    font-weight: 800;
}

.dsal-sidebar-user {
    overflow: hidden;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsal-sidebar-role {
    color: #9eb0c2;
    font-size: 0.76rem;
}

.dsal-workspace {
    width: calc(100% - var(--dsal-sidebar-width));
    min-width: 0;
    flex: 1;
}

.dsal-topbar {
    height: var(--dsal-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--dsal-border);
}

.dsal-topbar-context {
    overflow: hidden;
    color: var(--dsal-text);
    font-size: 0.95rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsal-topbar-subtitle {
    color: var(--dsal-muted);
    font-size: 0.75rem;
}

.dsal-menu-button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--dsal-border);
    color: var(--dsal-navy);
    font-size: 1.35rem;
}

.dsal-account-button {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.3rem 0.65rem;
    border: 0;
    color: var(--dsal-text);
    text-align: left;
}

.dsal-account-button:hover,
.dsal-account-button:focus,
.dsal-account-button.show {
    background: #f1f5f9;
    color: var(--dsal-text);
}

.dsal-account-copy {
    display: flex;
    flex-direction: column;
    max-width: 180px;
}

.dsal-account-copy strong {
    overflow: hidden;
    font-size: 0.84rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsal-account-copy small {
    color: var(--dsal-muted);
    font-size: 0.72rem;
}

.dsal-main {
    padding: 1.75rem 1.5rem 2.5rem;
}

.management-portal .dsal-main > .container {
    max-width: 1440px;
}

.guard-portal .dsal-main > .container,
.guard-portal .dsal-alert-container {
    max-width: 1120px;
}

.dsal-alert-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.dsal-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-width: 1px;
    border-radius: 8px;
}

.dsal-alert > div {
    flex: 1;
}

.page-heading {
    color: var(--dsal-text);
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 760;
    letter-spacing: -0.035em;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-kicker {
    margin-bottom: 0.35rem;
    color: var(--dsal-blue-dark);
    font-size: 0.74rem;
    font-weight: 780;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.page-subtitle,
.text-muted {
    color: var(--dsal-muted) !important;
}

.section-heading {
    color: var(--dsal-text);
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.section-description {
    color: var(--dsal-muted);
    font-size: 0.86rem;
}

.card {
    overflow: hidden;
    border: 1px solid var(--dsal-border);
    border-radius: 10px;
    background: var(--dsal-card);
    box-shadow: 0 1px 2px rgba(15, 36, 56, 0.04), 0 4px 12px rgba(15, 36, 56, 0.035);
}

.card-header,
.card-footer {
    border-color: var(--dsal-border);
}

.card-header {
    background: #fff;
}

.card-body {
    color: var(--dsal-text);
}

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 7px;
    font-weight: 680;
}

.btn-sm {
    min-height: 36px;
}

.btn-primary {
    --bs-btn-bg: var(--dsal-blue);
    --bs-btn-border-color: var(--dsal-blue);
    --bs-btn-hover-bg: var(--dsal-blue-dark);
    --bs-btn-hover-border-color: var(--dsal-blue-dark);
}

.btn-success {
    --bs-btn-bg: var(--dsal-success);
    --bs-btn-border-color: var(--dsal-success);
}

.btn-danger {
    --bs-btn-bg: var(--dsal-danger);
    --bs-btn-border-color: var(--dsal-danger);
}

.btn-warning {
    --bs-btn-bg: var(--dsal-warning);
    --bs-btn-border-color: var(--dsal-warning);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

.touch-button {
    min-height: 52px;
    padding: 0.8rem 1rem;
    font-size: 0.98rem;
    font-weight: 750;
    text-align: center;
}

.form-label,
legend.form-label {
    margin-bottom: 0.42rem;
    color: #344054;
    font-size: 0.88rem;
    font-weight: 680;
}

.form-control,
.form-select {
    min-height: 46px;
    border-color: #cfd7e1;
    border-radius: 7px;
    color: var(--dsal-text);
    font-size: 0.95rem;
}

textarea.form-control {
    min-height: 112px;
}

.form-control:focus,
.form-select:focus {
    border-color: #7aa2f7;
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
    color: #98a2b3;
}

.form-text,
.small {
    font-size: 0.82rem;
}

.required-marker {
    color: var(--dsal-danger);
    font-weight: 800;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.16rem;
    border-color: #b8c3d0;
}

.form-check-input:checked {
    border-color: var(--dsal-blue);
    background-color: var(--dsal-blue);
}

.yes-no-group {
    min-width: 0;
}

.yes-no-control {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #bfc9d5;
    border-radius: 7px;
    background: #fff;
}

.yes-no-option {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.55rem 1rem;
    color: #475467;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.yes-no-option + .btn-check + .yes-no-option {
    border-left: 1px solid #bfc9d5;
}

.btn-check:focus-visible + .yes-no-option {
    position: relative;
    z-index: 2;
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: -3px;
}

.btn-check:checked + .yes-no-option {
    color: #fff;
    background: var(--dsal-blue);
}

.status-label {
    margin-bottom: 0.22rem;
    color: var(--dsal-muted);
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.summary-value {
    color: var(--dsal-text);
    font-size: 1.04rem;
    font-weight: 720;
}

.text-pre-wrap {
    white-space: pre-wrap;
}

.badge {
    padding: 0.43em 0.7em;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 720;
    letter-spacing: 0.015em;
}

.badge-routine,
.severity-routine {
    color: #344054;
    background: #eaecf0;
}

.badge-low,
.severity-low {
    color: #1e40af;
    background: #dbeafe;
}

.badge-medium,
.severity-medium {
    color: #92400e;
    background: #fef3c7;
}

.badge-high,
.severity-high {
    color: #991b1b;
    background: #fee2e2;
}

.badge-emergency,
.severity-emergency {
    color: #fff;
    background: var(--dsal-emergency);
}

.activity-type-badge {
    color: #344054;
    background: #eef2f6;
    border: 1px solid #dce3eb;
}

.status-badge {
    color: #344054;
    background: #eef2f6;
}

.status-open,
.status-escalated,
.status-denied {
    color: #991b1b;
    background: #fee2e2;
}

.status-in-progress,
.status-under-review,
.status-awaiting-evidence {
    color: #92400e;
    background: #fef3c7;
}

.status-completed,
.status-closed {
    color: #166534;
    background: #dcfce7;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.9rem;
}

.metric-card {
    min-height: 132px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--dsal-border);
    border-radius: 9px;
    background: #fff;
    color: var(--dsal-text);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 36, 56, 0.04);
}

.metric-card:hover {
    border-color: #b8c6d5;
    color: var(--dsal-text);
    box-shadow: 0 4px 12px rgba(15, 36, 56, 0.08);
}

.metric-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    grid-row: 1 / span 2;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #edf2f7;
    color: var(--dsal-navy-2);
    font-size: 1.05rem;
}

.metric-label {
    align-self: center;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.055em;
    line-height: 1.25;
    text-transform: uppercase;
}

.metric-value {
    grid-column: 2;
    align-self: end;
    color: var(--dsal-text);
    font-size: 1.85rem;
    font-weight: 780;
    line-height: 1;
}

.metric-context {
    grid-column: 1 / -1;
    padding-top: 0.7rem;
    color: var(--dsal-muted);
    font-size: 0.76rem;
}

.metric-warning {
    border-left: 3px solid var(--dsal-warning);
}

.metric-danger {
    border-left: 3px solid var(--dsal-danger);
}

.metric-danger .metric-icon {
    color: #991b1b;
    background: #fee2e2;
}

.metric-warning .metric-icon {
    color: #92400e;
    background: #fef3c7;
}

.operations-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.operations-summary-link {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--dsal-border);
    border-radius: 8px;
    color: var(--dsal-text);
    text-decoration: none;
}

.operations-summary-link:hover {
    border-color: #b8c6d5;
    color: var(--dsal-text);
    background: #f8fafc;
}

.operations-summary-link i {
    color: var(--dsal-blue);
    font-size: 1.35rem;
}

.operations-summary-link strong {
    display: block;
    font-size: 1.4rem;
}

.operations-summary-link span {
    display: block;
    color: var(--dsal-muted);
    font-size: 0.82rem;
}

.attention-list {
    display: grid;
    gap: 0;
}

.attention-item {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.78rem 1rem;
    border-bottom: 1px solid var(--dsal-border);
    color: var(--dsal-text);
    text-decoration: none;
}

.attention-item:last-child {
    border-bottom: 0;
}

.attention-item:hover {
    color: var(--dsal-text);
    background: #f8fafc;
}

.attention-copy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.attention-copy i {
    width: 1.2rem;
    color: var(--dsal-warning);
    font-size: 1.05rem;
    text-align: center;
}

.attention-count {
    min-width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #344054;
    background: #f2f4f7;
    font-weight: 780;
}

.data-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.table {
    --bs-table-color: var(--dsal-text);
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #f5f8fb;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.82rem 0.9rem;
    border-bottom-color: #e6ebf0;
    vertical-align: middle;
}

.table thead th {
    border-bottom-width: 1px;
    color: #667085;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.record-link {
    color: #1d4ed8;
    font-weight: 740;
    text-decoration: none;
}

.record-link:hover {
    text-decoration: underline;
}

.filter-card .card-body {
    padding: 1.15rem;
}

.filter-toggle {
    width: 100%;
    justify-content: space-between;
}

.export-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.export-group .btn {
    min-width: 66px;
}

.activity-mobile-list {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
}

.activity-mobile-card {
    padding: 1rem;
    border: 1px solid var(--dsal-border);
    border-radius: 8px;
    background: #fff;
}

.activity-mobile-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

.activity-mobile-meta {
    display: grid;
    gap: 0.2rem;
    margin: 0.75rem 0;
    color: #475467;
    font-size: 0.86rem;
}

.activity-mobile-meta i {
    width: 1rem;
    margin-right: 0.35rem;
    color: #7b8797;
}

.dsal-guard-nav,
.dsal-guest-nav {
    min-height: 68px;
    background: var(--dsal-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dsal-guard-brand {
    max-width: 72vw;
    padding: 0;
    white-space: normal;
}

.dsal-guard-brand .dsal-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.dsal-guard-nav .navbar-nav {
    gap: 0.25rem;
}

.dsal-guard-nav .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: #c9d5df;
    font-weight: 640;
}

.dsal-guard-nav .nav-link:hover,
.dsal-guard-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.dsal-guard-account > .btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 0;
    color: #fff;
    text-align: left;
}

.dsal-guard-account > .btn:hover,
.dsal-guard-account > .btn.show {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.dsal-guard-account .btn > span:last-of-type {
    display: flex;
    flex-direction: column;
}

.dsal-guard-account strong {
    font-size: 0.82rem;
}

.dsal-guard-account small {
    color: #aebdcb;
    font-size: 0.72rem;
}

.dsal-guard-main {
    padding-top: 1.5rem;
}

.guard-status-card {
    position: relative;
    border-left: 4px solid #98a2b3;
}

.guard-status-card.on-duty {
    border-left-color: var(--dsal-success);
}

.guard-status-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.guard-site-name {
    margin: 0.25rem 0 0;
    color: var(--dsal-text);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 760;
    letter-spacing: -0.025em;
}

.guard-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dsal-border);
}

.guard-status-item {
    min-width: 0;
}

.guard-status-item strong {
    display: block;
    overflow-wrap: anywhere;
}

.active-state-panel {
    border-left: 4px solid var(--dsal-blue);
}

.active-state-panel.patrol-state {
    border-left-color: var(--dsal-success);
}

.active-state-panel.handover-state {
    border-left-color: var(--dsal-warning);
}

.active-state-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    color: #1e3a5f;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.active-state-panel.patrol-state .active-state-label {
    color: #166534;
}

.active-state-panel.handover-state .active-state-label {
    color: #92400e;
}

.guard-count-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.guard-count-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--dsal-border);
    border-radius: 8px;
    background: #fff;
    color: var(--dsal-text);
    text-decoration: none;
}

.guard-count-card:hover {
    color: var(--dsal-text);
    border-color: #b8c6d5;
}

.guard-count-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #1e40af;
    background: #dbeafe;
}

.guard-count-card strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
}

.guard-count-card span {
    color: var(--dsal-muted);
    font-size: 0.78rem;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.quick-action {
    min-height: 106px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--dsal-border);
    border-radius: 9px;
    background: #fff;
    color: var(--dsal-text);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 36, 56, 0.04);
}

.quick-action:hover {
    border-color: #aebdcb;
    color: var(--dsal-text);
    box-shadow: 0 4px 12px rgba(15, 36, 56, 0.07);
}

.quick-action:disabled,
.quick-action.disabled {
    color: #7b8797;
    background: #f4f6f8;
    cursor: not-allowed;
    opacity: 1;
}

.quick-action-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 1.25rem;
}

.quick-action-copy strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.94rem;
    font-weight: 750;
}

.quick-action-copy small {
    display: block;
    color: var(--dsal-muted);
    font-size: 0.76rem;
    line-height: 1.3;
}

.quick-action.priority-success .quick-action-icon {
    color: #166534;
    background: #dcfce7;
}

.quick-action.priority-warning .quick-action-icon {
    color: #92400e;
    background: #fef3c7;
}

.quick-action.priority-danger .quick-action-icon {
    color: #991b1b;
    background: #fee2e2;
}

.quick-action.secondary .quick-action-icon {
    color: #344054;
    background: #eef2f6;
}

.end-shift-panel {
    padding: 1rem;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fffafa;
}

.end-shift-panel .btn {
    min-width: 180px;
}

.system-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--dsal-border);
    border-radius: 9px;
    background: #f8fafc;
}

.system-context-item {
    min-height: 82px;
    padding: 0.9rem 1rem;
    border-right: 1px solid var(--dsal-border);
}

.system-context-item:last-child {
    border-right: 0;
}

.system-context.context-count-1 {
    grid-template-columns: 1fr;
}

.system-context.context-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-context-item:nth-child(3n) {
    border-right: 0;
}

.system-context-item:nth-child(n + 4) {
    border-top: 1px solid var(--dsal-border);
}

.system-context-item strong {
    display: block;
    margin: 0.16rem 0;
}

.system-context-item small {
    display: block;
    color: var(--dsal-muted);
}

.guard-portal form > .card,
.guard-portal form.card {
    box-shadow: 0 1px 2px rgba(15, 36, 56, 0.04);
}

.guard-portal form .card-body > h2:first-child,
.guard-portal form.card .card-body > h2:first-child {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--dsal-border);
    color: var(--dsal-navy-2);
    font-size: 1rem !important;
    letter-spacing: 0.01em;
}

.conditional-section {
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.dsal-guest-main {
    min-height: calc(100vh - 68px);
}

.dsal-guest-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1rem;
    font-weight: 740;
}

.dsal-guest-brand .dsal-brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 1rem;
}

.guest-portal .card {
    border-top: 3px solid var(--dsal-navy-2);
}

@media (max-width: 1199.98px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .dsal-sidebar.offcanvas-lg {
        width: var(--dsal-sidebar-width) !important;
        height: 100vh !important;
        flex-grow: 0 !important;
        background: var(--dsal-navy) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .dsal-sidebar-mobile-header {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .dsal-sidebar.offcanvas-lg {
        width: min(86vw, 290px);
        height: 100vh;
        position: fixed;
        z-index: var(--bs-offcanvas-zindex, 1045);
        flex: initial;
    }

    .dsal-sidebar-inner {
        height: calc(100% - 57px);
    }

    .dsal-workspace {
        width: 100%;
    }

    .dsal-main {
        padding: 1.35rem 1rem 2rem;
    }

    .dsal-guard-nav .navbar-collapse {
        padding: 0.75rem 0 1rem;
    }

    .dsal-guard-account {
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .quick-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-context {
        grid-template-columns: 1fr;
    }

    .system-context-item {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--dsal-border);
    }

    .system-context-item:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .dsal-topbar {
        padding: 0 1rem;
    }

    .dsal-account-copy {
        max-width: 120px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card {
        min-height: 120px;
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 0.9rem;
    }

    .metric-icon {
        width: 34px;
        height: 34px;
    }

    .metric-value {
        font-size: 1.6rem;
    }

    .guard-status-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .guard-status-item {
        padding-bottom: 0.7rem;
        border-bottom: 1px solid #edf0f3;
    }

    .guard-status-item:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .table > :not(caption) > * > * {
        padding: 0.72rem 0.8rem;
    }

    .card-body.p-4 {
        padding: 1.1rem !important;
    }
}

@media (max-width: 575.98px) {
    .dsal-main {
        padding: 1.1rem 0 1.75rem;
    }

    .dsal-main > .container,
    .dsal-alert-container {
        padding-right: 0.9rem;
        padding-left: 0.9rem;
    }

    .management-portal .dsal-topbar {
        height: 62px;
    }

    .dsal-account-copy small {
        display: none;
    }

    .page-heading {
        font-size: 1.55rem;
    }

    .page-subtitle {
        font-size: 0.88rem;
    }

    .card {
        border-radius: 8px;
    }

    .card-header {
        padding-right: 0.9rem;
        padding-left: 0.9rem;
    }

    .quick-action-grid {
        gap: 0.65rem;
    }

    .quick-action {
        min-height: 116px;
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
        padding: 0.85rem;
    }

    .quick-action-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 1.05rem;
    }

    .quick-action-copy strong {
        font-size: 0.88rem;
    }

    .quick-action-copy small {
        font-size: 0.72rem;
    }

    .guard-count-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .guard-count-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .yes-no-control {
        width: 100%;
    }

    .end-shift-panel {
        text-align: left;
    }

    .end-shift-panel .btn {
        width: 100%;
        margin-top: 0.75rem;
    }

    .operations-summary {
        grid-template-columns: 1fr;
    }

    .data-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 359.98px) {
    .quick-action-grid,
    .metric-grid,
    .guard-count-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
