
/* ============================================================
   PULSOR-INV | AMEC-BCCM PROFESSIONAL DESIGN SYSTEM
   Theme layer: load after style.css and auth.css.
   ============================================================ */

:root {
    --pulse-primary: #831d2b;
    --pulse-primary-dark: #641321;
    --pulse-primary-light: #fdf1f3;
    --pulse-accent: #c44959;

    --pulse-bg: #f4f6fa;
    --pulse-surface: #ffffff;
    --pulse-surface-soft: #f8f9fc;

    --pulse-text: #182233;
    --pulse-muted: #69768a;
    --pulse-border: #e4e8ef;

    --pulse-success: #167347;
    --pulse-success-bg: #eaf7ef;
    --pulse-warning: #986400;
    --pulse-warning-bg: #fff5db;
    --pulse-danger: #b42332;
    --pulse-danger-bg: #fff0f1;
    --pulse-info: #225f9e;
    --pulse-info-bg: #edf5ff;

    --pulse-radius-sm: 8px;
    --pulse-radius-md: 12px;
    --pulse-radius-lg: 17px;

    --pulse-shadow-sm: 0 2px 8px rgba(19, 31, 52, .045);
    --pulse-shadow-md: 0 12px 30px rgba(19, 31, 52, .075);
    --pulse-shadow-lg: 0 22px 55px rgba(19, 31, 52, .12);

    --pulse-sidebar-width: 258px;
    --pulse-transition: 180ms ease;
}

/* Base */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--pulse-bg);
    color: var(--pulse-text);
    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(196, 73, 89, .32);
    outline-offset: 2px;
}

::selection {
    background: rgba(196, 73, 89, .18);
    color: var(--pulse-primary-dark);
}

/* App layout */

.app {
    min-height: 100vh;
    background: var(--pulse-bg);
}

.sidebar {
    width: var(--pulse-sidebar-width);
    min-width: var(--pulse-sidebar-width);
    padding: 23px 15px 16px;
    background:
        linear-gradient(
            165deg,
            #8c2332 0%,
            #761927 55%,
            #601421 100%
        );
    box-shadow: 5px 0 24px rgba(48, 10, 19, .10);
}

.brand {
    gap: 13px;
    padding: 7px 9px 21px;
}

.brand-icon {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .13);
    font-size: 25px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.brand h1 {
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .45px;
}

.brand span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .76);
    font-size: 10px;
    letter-spacing: .2px;
}

.facility-box {
    margin: 2px 3px 13px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--pulse-radius-md);
    background: rgba(255, 255, 255, .085);
}

.facility-box strong {
    color: #fff;
    font-size: 13px;
    letter-spacing: .25px;
}

.facility-box span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
}

.system-status {
    margin: 0 3px 19px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .075);
    color: rgba(255, 255, 255, .91);
    font-size: 11px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48db93;
    box-shadow: 0 0 0 4px rgba(72, 219, 147, .12);
}

.navigation {
    gap: 5px;
}

.nav-btn {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    font-weight: 600;
    transition:
        background var(--pulse-transition),
        color var(--pulse-transition),
        transform var(--pulse-transition);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    transform: translateX(2px);
}

.nav-btn.active-nav {
    border-color: rgba(255, 255, 255, .55);
    background: #fff;
    color: var(--pulse-primary-dark);
    box-shadow: 0 5px 14px rgba(30, 5, 11, .15);
}

.nav-icon {
    width: 19px;
    font-size: 15px;
}

.sidebar-footer {
    padding: 15px 8px 5px;
    border-top: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
    gap: 4px;
}

.sidebar-footer strong {
    color: #fff;
    font-size: 11px;
}

/* Main and topbar */

.main {
    min-width: 0;
    background: var(--pulse-bg);
}

.topbar {
    min-height: 82px;
    padding: 15px 30px;
    border-bottom: 1px solid var(--pulse-border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(19, 31, 52, .025);
    backdrop-filter: blur(12px);
}

.page-heading h2 {
    margin: 0 0 3px;
    color: var(--pulse-text);
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -.35px;
}

.page-heading p {
    color: var(--pulse-muted);
    font-size: 12px;
}

.topbar-right {
    gap: 15px;
}

#currentDate {
    color: var(--pulse-muted);
    font-size: 11px;
}

.user-profile {
    gap: 10px;
}

.user-avatar {
    width: 37px;
    height: 37px;
    border: 2px solid #f4d9de;
    background:
        linear-gradient(
            145deg,
            var(--pulse-primary),
            var(--pulse-accent)
        );
    box-shadow: 0 3px 8px rgba(131, 29, 43, .16);
    font-size: 11px;
}

.user-profile strong {
    color: var(--pulse-text);
    font-size: 12px;
    font-weight: 700;
}

.user-profile small {
    color: var(--pulse-muted);
    font-size: 10px;
}

.logout-btn {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--pulse-border);
    border-radius: 9px;
    background: #fff;
    color: #515d70;
    font-size: 11px;
    font-weight: 700;
    transition: var(--pulse-transition);
}

.logout-btn:hover {
    border-color: #e9b7bf;
    background: var(--pulse-danger-bg);
    color: var(--pulse-danger);
}

.content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 27px 30px 50px;
}

/* Page headings */

.section-heading {
    align-items: center;
    margin-bottom: 21px;
}

.section-heading h2 {
    color: var(--pulse-text);
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -.25px;
}

.section-heading p {
    margin-top: 4px;
    color: var(--pulse-muted);
    font-size: 12px;
}

/* Dashboard cards */

.dashboard-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 21px;
}

.dashboard-card {
    position: relative;
    min-height: 126px;
    padding: 18px 18px 16px;
    overflow: hidden;
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-md);
    background: var(--pulse-surface);
    box-shadow: var(--pulse-shadow-sm);
    transition:
        transform var(--pulse-transition),
        box-shadow var(--pulse-transition);
}

.dashboard-card::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 52px;
    border-radius: 0 0 0 52px;
    background: rgba(131, 29, 43, .035);
    content: "";
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pulse-shadow-md);
}

.dashboard-card span {
    color: var(--pulse-muted);
    font-size: 11px;
    font-weight: 650;
}

.dashboard-card strong {
    margin: 8px 0 5px;
    color: var(--pulse-text);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -.7px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.dashboard-card small {
    color: #8792a3;
    font-size: 10px;
}

.available-card {
    border-top: 3px solid var(--pulse-success);
}

.available-card strong {
    color: var(--pulse-success);
}

.warning-card {
    border-top: 3px solid #e2a326;
}

.warning-card strong,
.pending-card strong {
    color: var(--pulse-warning);
}

.danger-card,
.incompatible-card {
    border-top: 3px solid var(--pulse-danger);
}

.danger-card strong,
.incompatible-card strong {
    color: var(--pulse-danger);
}

.pending-card {
    border-top: 3px solid #e2a326;
}

/* Panels and dashboard layout */

.dashboard-grid {
    gap: 18px;
    margin-bottom: 18px;
}

.panel,
.form-card,
.result-card {
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-lg);
    background: var(--pulse-surface);
    box-shadow: var(--pulse-shadow-sm);
}

.panel {
    margin-bottom: 19px;
}

.panel-header {
    min-height: 59px;
    padding: 16px 19px;
    border-bottom: 1px solid #edf0f4;
}

.panel-header h3,
.form-section-title h3 {
    color: var(--pulse-text);
    font-size: 14px;
    font-weight: 750;
}

.panel-header p,
.form-section-title p {
    margin-top: 3px;
    color: var(--pulse-muted);
    font-size: 11px;
}

.form-card {
    padding: 24px;
}

.form-section-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0f4;
}

.form-section-title h3 {
    font-size: 16px;
}

.form-section-title p {
    font-size: 12px;
}

/* Forms */

.form-grid {
    gap: 18px;
}

.form-group {
    min-width: 0;
}

.form-group label,
label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 11px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.search-row input,
.inventory-controls input,
.inventory-controls select,
#crossmatchSearch,
#scanInput,
#mapRefrigerator {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d8dee8;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--pulse-text);
    font-size: 12px;
    transition:
        border-color var(--pulse-transition),
        box-shadow var(--pulse-transition);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover,
.search-row input:hover,
.inventory-controls input:hover,
.inventory-controls select:hover {
    border-color: #b7c0ce;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-row input:focus,
.inventory-controls input:focus,
.inventory-controls select:focus,
#crossmatchSearch:focus,
#scanInput:focus,
#mapRefrigerator:focus {
    border-color: var(--pulse-accent);
    box-shadow: 0 0 0 3px rgba(196, 73, 89, .10);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #8792a3;
    font-size: 10px;
    line-height: 1.45;
}

.form-group input[readonly] {
    background: #f5f6f8;
    color: #596579;
}

.form-group input:disabled,
.form-group select:disabled {
    cursor: not-allowed;
    opacity: .65;
}

/* Buttons */

.primary-btn,
.secondary-btn,
.action-btn,
.pulse-access-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition:
        transform var(--pulse-transition),
        background var(--pulse-transition),
        border-color var(--pulse-transition),
        box-shadow var(--pulse-transition);
}

.primary-btn {
    border: 1px solid var(--pulse-primary);
    background:
        linear-gradient(
            135deg,
            var(--pulse-primary),
            #9b2b3b
        );
    color: #fff;
    box-shadow: 0 4px 10px rgba(131, 29, 43, .13);
}

.primary-btn:hover {
    transform: translateY(-1px);
    border-color: var(--pulse-primary-dark);
    background: var(--pulse-primary-dark);
    box-shadow: 0 6px 15px rgba(131, 29, 43, .19);
}

.secondary-btn {
    border: 1px solid #d8dee8;
    background: #fff;
    color: #3c485b;
}

.secondary-btn:hover {
    transform: translateY(-1px);
    border-color: #c5ccd8;
    background: #f8f9fb;
}

.action-btn {
    min-height: 29px;
    margin: 2px;
    padding: 6px 9px;
    border: 1px solid #e3e7ee;
    background: #f6f7fa;
    color: #354155;
    font-size: 10px;
}

.action-btn:hover {
    border-color: #cbd2de;
    background: #ebeff5;
}

.action-btn.danger {
    border-color: #f6d1d5;
    background: var(--pulse-danger-bg);
    color: var(--pulse-danger);
}

.action-btn.danger:hover {
    border-color: #e7aab2;
    background: #ffe3e6;
}

.action-btn.success {
    border-color: #c8ead7;
    background: var(--pulse-success-bg);
    color: var(--pulse-success);
}

.action-btn.success:hover {
    background: #d9f2e4;
}

button:disabled {
    cursor: not-allowed !important;
    opacity: .55;
    transform: none !important;
    box-shadow: none !important;
}

/* Notices and status messages */

.alert,
.info-box,
.suggested-location,
.highlight-message {
    border-radius: 11px;
    line-height: 1.55;
}

.alert {
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid var(--pulse-border);
    background: var(--pulse-surface-soft);
    color: #435066;
    font-size: 11px;
}

.alert-success {
    border-color: #c8ead7;
    background: var(--pulse-success-bg);
    color: var(--pulse-success);
}

.alert-warning {
    border-color: #f0dfa8;
    background: var(--pulse-warning-bg);
    color: #805900;
}

.alert-danger {
    border-color: #f1c6cc;
    background: var(--pulse-danger-bg);
    color: #a51d2a;
}

.alert-info {
    border-color: #c8def8;
    background: var(--pulse-info-bg);
    color: #225f9e;
}

.info-box {
    margin: 20px 0;
    padding: 15px 16px;
    border: 1px solid #f0dfa8;
    border-left: 4px solid #dfa52b;
    background: #fffaf0;
    color: #76591b;
}

.info-box strong {
    display: block;
    margin-bottom: 4px;
    color: #755417;
    font-size: 12px;
}

.info-box p {
    font-size: 11px;
}

.suggested-location {
    margin: 18px 0;
    padding: 15px 16px;
    border: 1px solid #cfe4d8;
    background: #f1faf4;
    color: #246442;
}

.suggested-location strong {
    display: block;
    margin-bottom: 5px;
    color: #1b6940;
    font-size: 12px;
}

#suggestedLocation {
    color: #246442;
    font-size: 12px;
}

.highlight-message {
    margin-bottom: 15px;
    padding: 13px 15px;
    border: 1px solid #c8def8;
    background: var(--pulse-info-bg);
    color: #225f9e;
    font-size: 11px;
}

/* Inventory controls and tables */

.inventory-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.inventory-controls input {
    width: min(270px, 100%);
}

.inventory-controls select {
    width: auto;
    min-width: 165px;
}

.table-container {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--pulse-border);
    border-radius: var(--pulse-radius-md);
    background: #fff;
    box-shadow: var(--pulse-shadow-sm);
}

.table-container table,
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #354155;
    font-size: 11px;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 12px;
    border-bottom: 1px solid #e5e9ef;
    background: #f7f8fb;
    color: #586579;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .35px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid #edf0f4;
    color: #3b475b;
    font-size: 11px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    background: #fff;
    transition: background var(--pulse-transition);
}

tbody tr:hover {
    background: #fcf6f7;
}

tbody td strong {
    color: #202b3d;
    font-weight: 750;
}

.inventory-container {
    max-height: 70vh;
}

/* Status badges */

.status-badge,
.crossmatch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 30px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1px;
    white-space: nowrap;
}

.status-AVAILABLE,
.crossmatch-COMPATIBLE {
    border-color: #c8ead7;
    background: var(--pulse-success-bg);
    color: var(--pulse-success);
}

.status-RESERVED {
    border-color: #c8def8;
    background: var(--pulse-info-bg);
    color: #225f9e;
}

.status-RELEASED {
    border-color: #d9dce3;
    background: #f0f1f4;
    color: #616c7d;
}

.status-REMOVED {
    border-color: #d9dce3;
    background: #f0f1f4;
    color: #737983;
}

.status-EXPIRED,
.status-INCOMPATIBLE,
.crossmatch-INCOMPATIBLE {
    border-color: #f1c6cc;
    background: var(--pulse-danger-bg);
    color: var(--pulse-danger);
}

.status-CROSSMATCH_PENDING,
.status-PENDING,
.crossmatch-PENDING {
    border-color: #f0dfa8;
    background: var(--pulse-warning-bg);
    color: #805900;
}

/* Search rows and unit cards */

.search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-row input {
    flex: 1;
    min-width: 0;
}

.crossmatch-layout,
.scan-layout {
    gap: 18px;
}

.crossmatch-result,
.unit-summary,
.result-card {
    padding: 18px;
}

.unit-summary {
    margin-bottom: 14px;
    border: 1px solid var(--pulse-border);
    border-radius: 12px;
    background: #fbfcfe;
}

.unit-summary h3,
.result-card h3 {
    margin-bottom: 14px;
    color: var(--pulse-text);
    font-size: 15px;
    font-weight: 750;
}

.unit-info-grid {
    gap: 11px;
}

.unit-info {
    padding: 11px 12px;
    border: 1px solid #e9edf3;
    border-radius: 9px;
    background: #fff;
}

.unit-info span {
    display: block;
    margin-bottom: 4px;
    color: var(--pulse-muted);
    font-size: 10px;
}

.unit-info strong {
    color: var(--pulse-text);
    font-size: 12px;
}

/* Workflow steps */

.workflow {
    padding: 19px;
}

.workflow-step {
    gap: 12px;
}

.workflow-step > span {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border: 1px solid #edc9cf;
    border-radius: 50%;
    background: var(--pulse-primary-light);
    color: var(--pulse-primary);
    font-size: 11px;
    font-weight: 800;
}

.workflow-step strong {
    color: var(--pulse-text);
    font-size: 12px;
}

.workflow-step small {
    display: block;
    margin-top: 2px;
    color: var(--pulse-muted);
    font-size: 10px;
}

.workflow-line {
    width: 2px;
    height: 22px;
    margin: 4px 0 4px 14px;
    background: #e4b9c0;
}

/* FEFO cards */

.recommended-unit {
    margin: 12px 0;
    padding: 16px;
    border: 1px solid var(--pulse-border);
    border-left: 4px solid var(--pulse-accent);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--pulse-shadow-sm);
}

.recommended-unit h4 {
    margin-bottom: 9px;
    color: var(--pulse-primary);
    font-size: 13px;
}

.recommended-unit p {
    margin: 5px 0;
    color: #4c586b;
    font-size: 11px;
}

/* Storage map */

.storage-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.storage-shelf {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--pulse-border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--pulse-shadow-sm);
}

.storage-shelf h3 {
    margin-bottom: 12px;
    color: var(--pulse-text);
    font-size: 13px;
}

.positions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.storage-position {
    min-width: 0;
    min-height: 112px;
    padding: 11px;
    overflow-wrap: anywhere;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    background: #f8f9fc;
    color: #69768a;
    font-size: 10px;
    line-height: 1.45;
    transition:
        border-color var(--pulse-transition),
        box-shadow var(--pulse-transition);
}

.storage-position strong {
    color: #445065;
    font-size: 10px;
}

.storage-position.occupied {
    border-color: #c8def8;
    background: #f0f6ff;
    color: #315e8c;
}

.storage-position.occupied strong {
    color: #214d7d;
}

.storage-position.highlighted {
    border: 2px solid var(--pulse-accent);
    background: #fff2f4;
    box-shadow: 0 0 0 4px rgba(196, 73, 89, .12);
    color: var(--pulse-primary-dark);
}

.storage-position.highlighted strong {
    color: var(--pulse-primary-dark);
}

/* Activity and reports */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.activity-item {
    padding: 13px 15px;
    border: 1px solid var(--pulse-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--pulse-shadow-sm);
}

.activity-item strong {
    display: block;
    color: #344054;
    font-size: 11px;
    font-weight: 650;
}

.activity-time {
    display: block;
    margin-top: 5px;
    color: #8a95a5;
    font-size: 10px;
}

.component-item,
.overview-grid > div {
    padding: 12px 15px;
    border-bottom: 1px solid #edf0f4;
}

.component-item:last-child {
    border-bottom: 0;
}

.component-item span {
    color: #4c586b;
    font-size: 11px;
}

.component-count,
.component-item strong {
    color: var(--pulse-primary);
    font-size: 14px;
    font-weight: 800;
}

.overview-grid {
    gap: 12px;
    padding: 15px;
}

.overview-grid > div {
    border: 1px solid #edf0f4;
    border-radius: 11px;
    background: #fbfcfe;
}

.overview-grid strong {
    color: #69768a;
    font-size: 10px;
}

.overview-grid p {
    margin-top: 5px;
    color: var(--pulse-text);
    font-size: 23px;
    font-weight: 800;
}

/* Barcode and scanner */

.barcode-box {
    display: flex;
    min-height: 115px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px dashed #c9d0dc;
    border-radius: 10px;
    background: #fbfcfe;
}

#barcodeImage {
    max-width: 100%;
    height: auto;
}

#barcodePlaceholder {
    color: #8a95a5;
    font-size: 10px;
}

.scanner-box,
#reader {
    width: 100%;
    min-height: 220px;
    overflow: hidden;
    border: 1px dashed #c9d0dc;
    border-radius: 12px;
    background: #f7f8fb;
}

.scanner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 13px 0;
}

/* Empty states */

.empty-state {
    display: flex;
    min-height: 130px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px dashed #dbe1ea;
    border-radius: 12px;
    background: #fbfcfe;
    text-align: center;
}

.empty-state strong {
    color: #465267;
    font-size: 12px;
}

.empty-state span {
    max-width: 420px;
    color: #8792a3;
    font-size: 11px;
}

/* Auth page polish */

.pulse-auth-screen {
    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(196, 73, 89, .09),
            transparent 34%
        ),
        linear-gradient(135deg, #f6f7fa, #eef1f6);
}

.pulse-auth-card {
    border: 1px solid rgba(222, 227, 236, .9);
    border-radius: 20px;
    box-shadow: var(--pulse-shadow-lg);
}

.pulse-auth-icon {
    border: 1px solid #f3d7dc;
}

.pulse-auth-primary-btn {
    min-height: 43px;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            var(--pulse-primary),
            #9b2b3b
        );
    box-shadow: 0 5px 13px rgba(131, 29, 43, .15);
}

.pulse-auth-primary-btn:hover {
    background: var(--pulse-primary-dark);
}

/* Supervisor access manager */

.pulse-access-card {
    border: 1px solid var(--pulse-border);
    border-radius: 17px;
    box-shadow: var(--pulse-shadow-lg);
}

.pulse-user-row {
    border-color: var(--pulse-border);
    border-radius: 11px;
    background: #fff;
}

.pulse-user-row:hover {
    background: #fbfcfe;
}

.pulse-access-btn {
    border: 1px solid #edc8ce;
    background: var(--pulse-primary-light);
    color: var(--pulse-primary);
}

.pulse-access-btn:hover {
    background: #f9e3e7;
}

/* Responsive tablet */

@media (max-width: 1180px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storage-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content {
        padding-right: 22px;
        padding-left: 22px;
    }

    .topbar {
        padding-right: 22px;
        padding-left: 22px;
    }
}

/* Responsive mobile */

@media (max-width: 760px) {
    .sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;
        position: relative;
        padding: 13px 12px;
    }

    .app {
        display: block;
    }

    .brand {
        padding: 4px 5px 13px;
    }

    .facility-box {
        margin-bottom: 8px;
    }

    .system-status {
        margin-bottom: 10px;
    }

    .navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .nav-btn {
        min-height: 39px;
        padding: 9px 8px;
        font-size: 11px;
    }

    .nav-btn:hover {
        transform: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        padding: 15px 16px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 9px;
    }

    .content {
        padding: 19px 14px 35px;
    }

    .dashboard-grid,
    .crossmatch-layout,
    .scan-layout {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .inventory-controls {
        width: 100%;
        justify-content: stretch;
    }

    .inventory-controls input,
    .inventory-controls select {
        width: 100%;
        min-width: 0;
    }

    .search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-row .primary-btn {
        width: 100%;
    }

    .storage-map {
        grid-template-columns: 1fr;
    }

    .positions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-card {
        min-height: 110px;
        padding: 14px;
    }

    .dashboard-card strong {
        font-size: 24px;
    }

    .table-container {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .navigation {
        grid-template-columns: 1fr 1fr;
    }

    .user-profile {
        max-width: calc(100% - 95px);
    }

    .user-profile strong {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Reduced-motion accessibility */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Print layout for reports */

@media print {
    .sidebar,
    .topbar,
    .nav-btn,
    .primary-btn,
    .secondary-btn,
    .action-btn,
    .logout-btn,
    .inventory-controls,
    .scanner-buttons {
        display: none !important;
    }

    .main {
        width: 100% !important;
        margin: 0 !important;
    }

    .content {
        max-width: none;
        padding: 0;
    }

    .page {
        display: none !important;
    }

    .page.active {
        display: block !important;
    }

    .panel,
    .dashboard-card,
    .table-container {
        break-inside: avoid;
        box-shadow: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}