* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #07162f;
    display: flex;
    min-height: 100vh;
    transition: none;
}

/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    width: 250px;
    min-width: 250px;
    flex: 0 0 250px;
    background: #07162f;
    color: white;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.18s ease, min-width 0.18s ease;
}

.sidebar-toggle {
    width: 38px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 18px;
    font-size: 18px;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 36px;
}

.brand h1 {
    margin: 0;
    font-size: 20px;
}

.brand p {
    margin: 4px 0 0;
    color: #a9b7d0;
    font-size: 13px;
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #2f66e8;
    display: grid;
    place-items: center;
    font-weight: bold;
}

.brand-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

.brand-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 34px;
    text-align: center;
}

.brand-logo-large {
    width: 170px;
    height: auto;
    object-fit: contain;
}

.brand-centered p {
    margin: 0;
    color: #a9b7d0;
    font-size: 14px;
}

nav,
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav {
    gap: 12px;
}

nav a,
.sidebar-nav a {
    color: white;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    white-space: nowrap;
}

nav a:hover,
.sidebar-nav a:hover {
    background: #12315f;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-section-title {
    color: #93c5fd;
    font-size: 12px;
    font-weight: bold;
    margin: 10px 0 4px;
}

.nav-icon {
    width: 22px;
    min-width: 22px;
    text-align: center;
}

.nav-text,
.brand-text,
.user-box,
.nav-section-title {
    transition: opacity 0.12s ease;
}

.user-box {
    margin-top: auto;
    border-top: 1px solid #234061;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-box span {
    color: #a9b7d0;
    font-size: 13px;
}

.logout-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 13px;
    margin-top: 4px;
}

.logout-link:hover {
    color: white;
    text-decoration: underline;
}

body.sidebar-collapsed .sidebar {
    width: 76px;
    min-width: 76px;
    flex-basis: 76px;
    padding-left: 12px;
    padding-right: 12px;
}

body.sidebar-collapsed .brand {
    align-items: center;
    justify-content: center;
}

body.sidebar-collapsed .brand-logo {
    width: 44px;
    max-width: 44px;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .user-box {
    display: none;
}

body.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .nav-icon {
    width: auto;
    min-width: auto;
    font-size: 18px;
}

body.sidebar-collapsed .sidebar-toggle {
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   MAIN LAYOUT
========================================= */

.content {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    padding: 28px;
    overflow-x: hidden;
}

.page-header,
.report-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.report-header {
    align-items: flex-start;
    margin-bottom: 18px;
}

.page-header h2,
.report-header h2 {
    margin: 0;
    font-size: 28px;
}

.page-header p,
.report-header p,
.section-subtitle {
    margin: 8px 0 0;
    color: #53627c;
}

.section-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
}

.card {
    background: white;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 10px 25px rgba(7, 22, 47, 0.05);
    min-width: 0;
}

.large-card {
    min-height: 360px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-header h3 {
    margin: 0;
}

.right-column {
    display: grid;
    gap: 16px;
}

.report-actions,
.report-control {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.report-control select {
    height: 42px;
    min-width: 280px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 12px;
    background: white;
    font-size: 14px;
}

.page-search {
    width: 340px;
    max-width: 100%;
    height: 44px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
}

/* =========================================
   BUTTONS
========================================= */

.primary-button {
    background: #2f66e8;
    color: white;
    border: 0;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.soft-button {
    border: 1px solid #dbe3ee;
    background: white;
    color: #07162f;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: bold;
    cursor: pointer;
}

.soft-button:hover {
    background: #f4f7fb;
}

.danger-button {
    border: 0;
    background: #dc2626;
    color: white;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: bold;
    cursor: pointer;
}

.danger-button:hover {
    background: #b91c1c;
}

.link-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.small-button {
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.save-batch-button {
    margin-top: 18px;
}

/* =========================================
   DASHBOARD / STATS
========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.quick-stats {
    margin-bottom: 16px;
}

.compact-stat {
    min-height: 105px;
}

.stat-card span {
    color: #53627c;
    font-weight: bold;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    margin-top: 12px;
}

.stat-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(7, 22, 47, 0.10);
}

.clickable-stat {
    cursor: pointer;
}

.clickable-stat:hover {
    box-shadow: 0 14px 30px rgba(7, 22, 47, 0.10);
    transform: translateY(-1px);
}

.tool-stats-grid {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

/* =========================================
   TABLES
========================================= */

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    background: #f4f7fb;
    color: #07162f;
    padding: 12px;
    border-bottom: 1px solid #dbe3ee;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.inventory-table tbody tr {
    cursor: pointer;
}

.inventory-table tbody tr:hover {
    background: #f4f7fb;
}

.selected-row {
    background: #eaf1ff;
}

/* =========================================
   TOOL LIST TABLE - CLEAN FINAL VERSION
========================================= */

.tool-list-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding-bottom: 12px;
}

.top-table-scroll,
#topTableScroll,
#topTableScrollInner {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

.tool-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 220px);
    overflow: auto !important;
    border-bottom: 1px solid #dbe3ee;
}

.inventory-table.tool-table {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse;
}

.inventory-table.tool-table th,
.inventory-table.tool-table td {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.inventory-table.tool-table th {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    background: #f4f7fb;
    user-select: none;
}

.inventory-table.tool-table .filter-row th {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ee;
    padding: 6px;
}

.inventory-table.tool-table tbody td {
    background: white;
}

.inventory-table.tool-table tbody tr:hover td {
    background: #f4f7fb;
}

.tool-number-link {
    color: #07162f !important;
    text-decoration: none !important;
    font-weight: 700;
}

.tool-number-link:visited {
    color: #07162f !important;
}

.tool-number-link:hover {
    color: #2f66e8 !important;
    text-decoration: underline !important;
}

.column-filter {
    width: 100%;
    height: 28px;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    padding: 0 7px;
    font-size: 12px;
}

.column-filter:focus {
    outline: 2px solid #93c5fd;
    border-color: #60a5fa;
}

.excel-table th[draggable="true"] {
    cursor: grab;
}

.excel-table th[draggable="true"]:active {
    cursor: grabbing;
}

.dragging-column {
    opacity: 0.45;
}

.drag-over-column {
    outline: 2px solid #2f66e8;
    outline-offset: -2px;
    background: #eaf1ff !important;
}

.inventory-table.resizable-table {
    table-layout: fixed;
}

.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 2;
}

.resizer:hover {
    background: #94a3b8;
}

body.resizing-column {
    cursor: col-resize;
    user-select: none;
}

/* =========================================
   TOOL ACTIONS / TOOL RENTAL
========================================= */

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.transaction-card {
    margin-bottom: 16px;
}

.transaction-card h3 {
    margin-top: 0;
}

.transaction-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
}

.single-grid {
    grid-template-columns: 1fr;
}

.transaction-grid label {
    display: grid;
    gap: 7px;
    font-weight: bold;
    color: #07162f;
}

.transaction-grid input,
.transaction-grid select {
    height: 42px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: white;
}

.wide-field {
    grid-column: span 2;
}

.tool-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.tool-actions form {
    margin: 0;
}

.date-col {
    min-width: 110px;
    white-space: nowrap;
    padding-left: 12px;
    padding-right: 12px;
}

/* =========================================
   STATUS PILLS
========================================= */

.status-pill {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-pill.in-stock {
    background: #dcfce7;
    color: #166534;
}

.status-pill.low-stock {
    background: #ffedd5;
    color: #9a3412;
}

.status-pill.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.status-pill.available {
    background: #dcfce7;
    color: #166534;
}

.status-pill.checked-out {
    background: #dbeafe;
    color: #1e40af;
}

.status-pill.due-soon {
    background: #ffedd5;
    color: #9a3412;
}

.status-pill.overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-pill.warranty-due-soon {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.retired {
    background: #e5e7eb;
    color: #374151;
}

/* =========================================
   IMAGES / REPORTS
========================================= */

.item-thumb,
.empty-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: #f4f7fb;
    border: 1px solid #dbe3ee;
}

.report-overview {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 26px;
    align-items: start;
}

.report-image-box {
    width: 190px;
    height: 165px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    color: #53627c;
}

.report-image-box img {
    max-width: 160px;
    max-height: 145px;
    object-fit: contain;
}

.report-details h2 {
    margin-top: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px 16px;
}

.detail-grid strong {
    color: #53627c;
}

.report-section {
    margin-top: 16px;
}

/* =========================================
   DONUT / DASHBOARD FILTER
========================================= */

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-top: 18px;
}

.donut {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.donut-center {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: white;
    display: grid;
    place-items: center;
    text-align: center;
}

.donut-center strong {
    font-size: 24px;
}

.donut-center span {
    font-size: 12px;
    color: #53627c;
}

.donut-button {
    border: 0;
    cursor: pointer;
    padding: 0;
}

.donut-button:hover {
    transform: scale(1.02);
}

.legend {
    display: grid;
    gap: 10px;
    min-width: 165px;
    color: #53627c;
}

.legend div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend strong {
    margin-left: auto;
    color: #07162f;
}

.legend-row {
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    color: #53627c;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 9px;
    text-align: left;
}

.legend-row:hover {
    background: #f4f7fb;
}

.legend-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-row strong {
    color: #07162f;
}

.active-filter {
    outline: 2px solid #2f66e8;
    outline-offset: 2px;
}

.legend-row.active-filter {
    outline: 0;
    background: #eaf1ff;
    color: #1e40af;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.green {
    background: #22c55e;
}

.dot.orange {
    background: #f97316;
}

.dot.red {
    background: #ef4444;
}

.dashboard-inventory-row {
    cursor: pointer;
}

.dashboard-inventory-row:hover {
    background: #f4f7fb;
}

.stock-status-card .section-header {
    margin-bottom: 8px;
}

.recent-card {
    margin-top: 16px;
}

/* =========================================
   MESSAGES
========================================= */

.message-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.message {
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: bold;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================
   LOGIN
========================================= */

.login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 30%),
        linear-gradient(135deg, #071b45 0%, #0f2f6b 100%);
}

.login-page {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    position: relative;
    width: 360px;
    background: #ffffff;
    border-radius: 30px;
    padding: 65px 35px 35px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.28);
    overflow: visible;
}

.login-robot {
    position: absolute;
    top: -265px;
    left: 50%;
    transform: translateX(-50%);
    width: 285px;
    height: auto;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-top: -25px;
    margin-bottom: 20px;
}

.login-logo {
    width: 215px;
    display: block;
    margin: 0 auto 10px;
    object-fit: contain;
    background: #082766;
    padding: 12px 18px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.login-header p {
    margin: 0;
    font-size: 15px;
    color: #667085;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #102a56;
}

.form-group input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #d3ddec;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.login-form button {
    margin-top: 8px;
    height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 14px 26px rgba(37,99,235,0.28);
}

.login-form button:hover {
    transform: translateY(-1px);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1400px) {
    .tool-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .tool-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .donut-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        flex-basis: auto;
    }

    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .transaction-grid {
        grid-template-columns: 1fr;
    }

    .wide-field {
        grid-column: span 1;
    }

    .report-overview {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .tool-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .tool-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   PRINT
========================================= */

@media print {
    html,
    body,
    .content,
    .card,
    .table-scroll,
    .tool-table-scroll {
        overflow: visible !important;
        max-width: none !important;
    }

    body {
        display: block;
        background: white;
    }

    .content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .page-search,
    .soft-button,
    .danger-button,
    .filter-row,
    .sidebar,
    .sidebar-toggle,
    .report-actions,
    .report-control,
    .section-header button {
        display: none !important;
    }

    .inventory-table.tool-table {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 10px;
    }
}
/* =========================================
   FINAL RESPONSIVE TOOL RENTAL FIX
========================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.content {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Tool page header */
.tool-page-header {
    align-items: flex-start;
}

.tool-page-header .soft-button {
    flex: 0 0 auto;
}

/* Tool stats should wrap instead of pushing page wide */
.tool-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
}

.tool-stats-grid .stat-card {
    min-width: 0;
}

/* Forms should never push outside screen */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 16px;
    align-items: start;
}

.transaction-card {
    min-width: 0;
    overflow: hidden;
}

.transaction-grid,
.single-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
}

.transaction-grid label {
    min-width: 0;
}

.transaction-grid input,
.transaction-grid select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tool-dashboard-grid {
    margin-top: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

/* High zoom desktop fix */
@media (max-width: 1300px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .tool-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Phone / narrow screen sidebar */
@media (max-width: 700px) {
    body {
        display: flex;
        flex-direction: row;
        min-width: 0;
    }

    .sidebar {
        width: 76px !important;
        min-width: 76px !important;
        flex: 0 0 76px !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand {
        align-items: center;
        justify-content: center;
        margin-bottom: 22px;
    }

    .brand-logo {
        width: 44px !important;
        max-width: 44px !important;
    }

    .brand-text,
    .nav-text,
    .nav-section-title,
    .user-box {
        display: none !important;
    }

    .sidebar-nav a {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .nav-icon {
        width: auto;
        min-width: auto;
        font-size: 18px;
    }

    .sidebar-toggle {
        margin-left: auto;
        margin-right: auto;
    }

    .content {
        width: calc(100vw - 76px);
        padding: 18px 14px;
        overflow-x: hidden;
    }

    .page-header,
    .tool-page-header {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page-header h2 {
        font-size: 28px;
        line-height: 1.05;
    }

    .page-header p {
        font-size: 15px;
        line-height: 1.25;
    }

    .tool-stats-grid {
        grid-template-columns: 1fr;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 18px;
    }

    .transaction-card h3 {
        font-size: 22px;
    }
}
/* =========================================
   DASHBOARD TOOL TRACKING
========================================= */

.dashboard-main-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-tool-stats {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.dot.blue {
    background: #2f66e8;
}

.stock-status-card .link-button {
    text-decoration: none;
}

@media (max-width: 900px) {
    .dashboard-main-stats,
    .dashboard-tool-stats {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   TOOL VALUE / DASHBOARD POLISH
========================================= */

.compact-value-card strong {
    font-size: clamp(22px, 2vw, 32px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-underline,
.no-underline *,
.donut-button,
.donut-button * {
    text-decoration: none !important;
}

.dot.blue {
    background: #2f66e8;
}

.dashboard-main-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-tool-stats {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.dashboard-tool-stats .stat-card strong,
.dashboard-main-stats .stat-card strong {
    font-size: clamp(24px, 2.3vw, 34px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-status-card .link-button {
    text-decoration: none;
}

.tool-filter-summary {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.tool-filter-summary div {
    min-width: 180px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fafc;
}

.tool-filter-summary span {
    display: block;
    color: #53627c;
    font-size: 13px;
    font-weight: bold;
}

.tool-filter-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
    color: #07162f;
}

@media (max-width: 700px) {
    .tool-filter-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-main-stats,
    .dashboard-tool-stats {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   QUICK INVENTORY TRANSACTION REDESIGN
========================================= */

.reference-toggle {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #f8fafc;
    margin-bottom: 16px;
}

.toggle-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 11px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    color: #53627c;
}

.toggle-option input {
    display: none;
}

.toggle-option.active {
    background: #2f66e8;
    color: white;
}

.reference-grid {
    display: grid;
    grid-template-columns: minmax(260px, 520px);
    gap: 16px;
}

.reference-grid label,
.line-entry-grid label {
    display: grid;
    gap: 7px;
    font-weight: 800;
    color: #07162f;
}

.reference-grid input,
.line-entry-grid input,
.line-entry-grid select {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: white;
}

.line-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
}

.line-entry-grid .wide-field {
    grid-column: span 4;
}

@media (max-width: 1200px) {
    .line-entry-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .line-entry-grid .wide-field {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .reference-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .toggle-option {
        min-width: 0;
    }

    .reference-grid,
    .line-entry-grid {
        grid-template-columns: 1fr;
    }

    .line-entry-grid .wide-field {
        grid-column: span 1;
    }
}
/* =========================================
   WALTON COLOR ONLY OVERRIDE
   Keeps existing font and layout.
   Does not affect login page.
========================================= */

:root {
    --walton-red: #ed1c24;
    --walton-gray: #808285;
    --walton-black: #000000;
    --walton-soft-gray: #f4f4f4;
    --walton-border: #d8d8d8;
}

/* Main app background */
body:not(.login-body) {
    background: #f4f4f4;
    color: #000000;
}

/* Sidebar */
body:not(.login-body) .sidebar {
    background: #000000;
    color: #ffffff;
}

body:not(.login-body) .sidebar-nav a:hover,
body:not(.login-body) nav a:hover {
    background: #2a2a2a;
}

body:not(.login-body) .nav-section-title {
    color: #c8c8c8;
}

body:not(.login-body) .brand p,
body:not(.login-body) .brand-centered p,
body:not(.login-body) .brand-text p,
body:not(.login-body) .user-box span {
    color: #c8c8c8;
}

body:not(.login-body) .user-box {
    border-top-color: #333333;
}

/* Buttons */
body:not(.login-body) .primary-button {
    background: var(--walton-red);
    color: #ffffff;
}

body:not(.login-body) .primary-button:hover {
    background: #c9161d;
}

body:not(.login-body) .danger-button {
    background: var(--walton-red);
    color: #ffffff;
}

body:not(.login-body) .danger-button:hover {
    background: #b51218;
}

body:not(.login-body) .soft-button {
    border-color: var(--walton-border);
    color: #000000;
}

body:not(.login-body) .soft-button:hover {
    background: #eeeeee;
}

/* Cards */
body:not(.login-body) .card,
body:not(.login-body) .report-section,
body:not(.login-body) .tool-list-card {
    border-color: var(--walton-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

/* Headings and important text */
body:not(.login-body) .page-header h2,
body:not(.login-body) .report-header h2,
body:not(.login-body) .card h3,
body:not(.login-body) .section-header h3 {
    color: #000000;
}

body:not(.login-body) .page-header p,
body:not(.login-body) .report-header p,
body:not(.login-body) .section-subtitle {
    color: #555555;
}

/* Stat cards */
body:not(.login-body) .stat-card {
    border-top: 4px solid var(--walton-red);
}

body:not(.login-body) .stat-card span,
body:not(.login-body) .tool-filter-summary span {
    color: #555555;
}

body:not(.login-body) .stat-card strong,
body:not(.login-body) .tool-filter-summary strong {
    color: #000000;
}

/* Tables */
body:not(.login-body) .data-table th,
body:not(.login-body) .inventory-table th,
body:not(.login-body) .inventory-table.tool-table th {
    background: #eeeeee;
    color: #000000;
    border-bottom-color: var(--walton-border);
}

body:not(.login-body) .inventory-table.tool-table .filter-row th,
body:not(.login-body) .filter-row th {
    background: #f8f8f8;
}

body:not(.login-body) .data-table td,
body:not(.login-body) .inventory-table td {
    border-bottom-color: #e7e7e7;
}

body:not(.login-body) .inventory-table tbody tr:hover,
body:not(.login-body) .inventory-table.tool-table tbody tr:hover td {
    background: #f5f5f5;
}

/* Inputs */
body:not(.login-body) input:focus,
body:not(.login-body) select:focus,
body:not(.login-body) .column-filter:focus,
body:not(.login-body) .page-search:focus {
    outline: 3px solid rgba(237, 28, 36, 0.14);
    border-color: var(--walton-red);
}

/* Toggle buttons */
body:not(.login-body) .toggle-option.active {
    background: var(--walton-red);
    color: #ffffff;
}

/* Links */
body:not(.login-body) .tool-number-link {
    color: #000000;
}

body:not(.login-body) .tool-number-link:hover {
    color: var(--walton-red);
}

/* Table resizing / dragging */
body:not(.login-body) .resizer:hover {
    background: var(--walton-gray);
}

body:not(.login-body) .drag-over-column {
    outline: 2px solid var(--walton-red);
    background: #fff1f1 !important;
}

/* Status colors */
body:not(.login-body) .status-pill.available,
body:not(.login-body) .status-pill.in-stock {
    background: #dcfce7;
    color: #166534;
}

body:not(.login-body) .status-pill.checked-out,
body:not(.login-body) .status-pill.issued {
    background: #e5e5e5;
    color: #000000;
}

body:not(.login-body) .status-pill.low-stock,
body:not(.login-body) .status-pill.due-soon,
body:not(.login-body) .status-pill.warranty-due-soon {
    background: #fff3cd;
    color: #7a4b00;
}

body:not(.login-body) .status-pill.out-of-stock,
body:not(.login-body) .status-pill.overdue {
    background: #ffe1e1;
    color: #b51218;
}

body:not(.login-body) .status-pill.retired {
    background: #e5e5e5;
    color: #555555;
}

/* Donut chart dots */
body:not(.login-body) .dot.red {
    background: var(--walton-red);
}

body:not(.login-body) .dot.orange {
    background: #f97316;
}

body:not(.login-body) .dot.green {
    background: #22c55e;
}

body:not(.login-body) .dot.blue {
    background: var(--walton-gray);
}

/* Selected rows */
body:not(.login-body) .selected-row {
    background: #fff1f1;
}
.material-preview-box {
    min-width: 260px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 12px 16px;
    background: #f8fafc;
}

.material-preview-box span {
    display: block;
    color: #53627c;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.material-preview-box strong {
    font-size: 18px;
    color: #07162f;
}
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tiny-soft-button {
    border: 1px solid #dbe3ee;
    background: white;
    color: #07162f;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.tiny-soft-button:hover {
    background: #f4f7fb;
}

/* =========================================
   PROCUREMENT MATERIAL FORM
========================================= */

.material-form-card {
    padding: 18px;
}

.material-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.material-form-header h3 {
    margin: 0;
}

.material-preview-box {
    min-width: 220px;
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
}

.material-preview-box span {
    display: block;
    color: #53627c;
    font-size: 12px;
    font-weight: bold;
}

.material-preview-box strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

.material-single-column {
    display: grid;
    grid-template-columns: minmax(280px, 720px);
    gap: 14px;
}

.material-field {
    display: grid;
    gap: 7px;
    font-weight: bold;
    color: #07162f;
    min-width: 0;
}

.material-field input,
.material-field select {
    width: 100%;
    height: 40px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 0 11px;
    font-size: 14px;
    background: white;
    min-width: 0;
}

.material-field input[readonly] {
    background: #f8fafc;
    color: #53627c;
}

.field-with-button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.field-with-button .small-button {
    height: 40px;
    padding: 0 12px;
    white-space: nowrap;
}

.modern-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px;
    cursor: pointer;
}

.modern-file-upload input[type="file"] {
    display: none;
}

.file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    background: #ed1c24;
    color: white;
    font-weight: bold;
    white-space: nowrap;
}

.file-name {
    color: #53627c;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .material-form-header {
        flex-direction: column;
    }

    .material-preview-box {
        width: 100%;
    }

    .material-single-column {
        grid-template-columns: 1fr;
    }
}
.split-button-row {
    justify-content: space-between;
    align-items: center;
}

.split-button-row form {
    margin: 0;
}
.material-toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    font-weight: bold;
}

.material-toggle-field span {
    display: grid;
    gap: 3px;
}

.material-toggle-field small {
    color: #53627c;
    font-weight: normal;
}

.material-toggle-field input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #ed1c24;
}
.material-print-sheet {
    max-width: 900px;
    margin: 0 auto;
}

.material-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.material-print-header h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.material-print-header p {
    margin: 0;
    color: #53627c;
}

.material-print-image {
    width: 130px;
    height: 130px;
    object-fit: contain;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
}

.material-print-table td:first-child {
    width: 220px;
    background: #f8fafc;
}

@media print {
    .print-hide,
    .sidebar,
    .sidebar-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        display: block !important;
    }

    .content {
        padding: 0 !important;
        width: 100% !important;
    }

    .material-print-sheet {
        box-shadow: none !important;
        border: 0 !important;
        max-width: 100% !important;
    }
} 
.item-size-value {
    min-width: 0;
}

.item-size-value select,
.item-size-value input {
    width: 100%;
}
.po-print-sheet {
    max-width: 1100px;
}

@media print {
    .print-hide,
    .sidebar,
    .sidebar-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        display: block !important;
    }

    .content {
        padding: 0 !important;
        width: 100% !important;
    }

    .card {
        box-shadow: none !important;
    }
}
/* =========================================
   QUICK TRANSACTION PO SELECT
========================================= */

.reference-grid select {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #ffffff;
    color: #07162f;
    min-width: 0;
}

.reference-grid select:focus {
    outline: 3px solid rgba(237, 28, 36, 0.14);
    border-color: var(--walton-red, #ed1c24);
}
.po-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.po-print-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
}

@media print {
    .sidebar,
    .page-header .report-actions,
    .soft-button,
    .primary-button {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
    }

    .po-print-header {
        display: flex !important;
    }
} 
/* =========================================
   PURCHASE ORDER DETAIL / PRINT
========================================= */

.print-only {
    display: none;
}

.po-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.po-detail-grid .data-table td:first-child {
    width: 170px;
}

.po-print-header {
    display: none;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #000000;
}

.po-print-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.po-print-title {
    text-align: right;
}

.po-print-title h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.po-print-title strong {
    font-size: 16px;
}

@media (max-width: 900px) {
    .po-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .print-only {
        display: flex !important;
    }

    .po-print-header {
        display: flex !important;
    }

    .sidebar,
    .page-header,
    .message-stack,
    .soft-button,
    .primary-button {
        display: none !important;
    }

    body {
        display: block !important;
        background: white !important;
        color: black !important;
    }

    .content {
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
        padding: 14px !important;
        page-break-inside: avoid;
    }

    .po-detail-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }

    .data-table {
        font-size: 11px !important;
    }

    .data-table th,
    .data-table td {
        padding: 7px !important;
    }
}
/* =========================================
   PURCHASE ORDER PRINT FORM
========================================= */

.po-print-form {
    display: none;
}

@media print {
    @page {
        size: letter portrait;
        margin: 0.35in;
    }

    .sidebar,
    .page-header,
    .message-stack,
    .card,
    .soft-button,
    .primary-button {
        display: none !important;
    }

    body {
        display: block !important;
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
    }

    .content {
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .print-only,
    .po-print-form {
        display: block !important;
    }

    .po-form-top {
        display: grid;
        grid-template-columns: 1.15fr 1fr 0.75fr;
        gap: 10px;
        align-items: start;
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .po-form-logo {
        width: 150px;
        height: auto;
        object-fit: contain;
    }

    .po-form-tagline {
        font-size: 9px;
        margin-top: 4px;
    }

    .po-form-title-block {
        text-align: center;
        font-size: 10px;
    }

    .po-form-title-block h1 {
        margin: 0 0 4px;
        font-size: 19px;
        letter-spacing: 1px;
    }

    .po-form-number-block {
        border: 1px solid #000;
        min-height: 42px;
    }

    .po-box-label {
        background: #e8e8e8;
        border-bottom: 1px solid #000;
        font-size: 9px;
        padding: 3px 5px;
        text-transform: uppercase;
    }

    .po-box-value {
        padding: 8px 5px;
        font-size: 12px;
        font-weight: bold;
        text-align: center;
    }

    .po-form-middle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 6px;
    }

    .po-field-row {
        display: grid;
        grid-template-columns: 105px 1fr;
        min-height: 22px;
        border-bottom: 1px solid #000;
        font-size: 10px;
        align-items: end;
    }

    .po-field-row span {
        color: #333;
        padding-right: 5px;
    }

    .po-field-row strong {
        font-weight: normal;
        padding-bottom: 2px;
    }

    .po-check-row {
        display: flex;
        gap: 12px;
        align-items: center;
        min-height: 24px;
        font-size: 10px;
        border-bottom: 1px solid #000;
    }

    .po-check-row input {
        width: 10px;
        height: 10px;
    }

    .po-warning {
        border: 1px solid #000;
        text-align: center;
        font-weight: bold;
        font-size: 10px;
        padding: 3px;
        margin-bottom: 5px;
    }

    .po-print-lines {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 9px;
    }

    .po-print-lines th,
    .po-print-lines td {
        border: 1px solid #000;
        padding: 3px;
        height: 20px;
        vertical-align: top;
    }

    .po-print-lines th {
        background: #e8e8e8;
        text-align: center;
        font-weight: bold;
    }

    .po-print-lines th:nth-child(1),
    .po-print-lines td:nth-child(1) {
        width: 32px;
        text-align: center;
    }

    .po-print-lines th:nth-child(2),
    .po-print-lines td:nth-child(2) {
        width: 50px;
        text-align: right;
    }

    .po-print-lines th:nth-child(3),
    .po-print-lines td:nth-child(3) {
        width: 70px;
    }

    .po-print-lines th:nth-child(4),
    .po-print-lines td:nth-child(4) {
        width: 115px;
    }

    .po-print-lines th:nth-child(6),
    .po-print-lines td:nth-child(6),
    .po-print-lines th:nth-child(7),
    .po-print-lines td:nth-child(7) {
        width: 78px;
        text-align: right;
    }

    .po-print-bottom {
        display: grid;
        grid-template-columns: 1fr 230px;
        gap: 8px;
        margin-top: 4px;
        font-size: 10px;
    }

    .po-special {
        border: 1px solid #000;
        min-height: 48px;
        padding: 4px;
    }

    .po-special strong {
        display: block;
        border-bottom: 1px solid #000;
        margin: -4px -4px 4px;
        padding: 3px 4px;
        background: #e8e8e8;
    }

    .po-totals {
        border: 1px solid #000;
    }

    .po-totals div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-bottom: 1px solid #000;
        min-height: 18px;
    }

    .po-totals div:last-child {
        border-bottom: 0;
        font-weight: bold;
    }

    .po-totals span,
    .po-totals strong {
        padding: 3px 5px;
    }

    .po-totals span {
        background: #e8e8e8;
        border-right: 1px solid #000;
        text-transform: uppercase;
    }

    .po-totals strong {
        text-align: right;
    }
}
.po-header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.po-header-column {
    display: grid;
    gap: 14px;
    align-content: start;
}

.po-header-column label,
.po-header-full {
    display: grid;
    gap: 7px;
    font-weight: bold;
}

.po-header-column input,
.po-header-column select,
.po-header-full input {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 0 12px;
    background: white;
}

.po-header-full {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .po-header-grid {
        grid-template-columns: 1fr;
    }

    .po-header-full {
        grid-column: auto;
    }
}
.disabled-button,
.disabled-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db;
}
@media print {
    body * {
        visibility: hidden !important;
    }

    .po-print-form,
    .po-print-form *,
    .material-print-sheet,
    .material-print-sheet * {
        visibility: visible !important;
    }

    .po-print-form,
    .material-print-sheet {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        background: white !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .material-print-sheet {
        padding: 0.35in !important;
    }

    .print-hide,
    .page-header,
    .sidebar,
    .topbar,
    .nav,
    .report-actions,
    .soft-button,
    .primary-button,
    .message-stack {
        display: none !important;
    }

    html,
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    @page {
        size: letter;
        margin: 0.35in;
    }
}
.barcode-print-sheet {
    width: 2.125in;
    height: 1in;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.barcode-label {
    width: 2.05in;
    height: 0.9in;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
}

.barcode-label svg {
    width: 1.95in;
    height: 0.55in;
}

.barcode-text {
    margin-top: 0.03in;
    font-size: 8pt;
    line-height: 1;
    font-weight: 600;
    color: #111;
    text-align: center;
    white-space: nowrap;
}


.office-equipment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
    gap: 16px;
    align-items: start;
}

.office-equipment-form {
    display: grid;
    gap: 14px;
}

.office-equipment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
}

.office-equipment-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    color: #111827;
}

.office-equipment-form input,
.office-equipment-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d7dee8;
    border-radius: 7px;
    padding: 0 12px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.office-equipment-form input:focus,
.office-equipment-form select:focus {
    outline: none;
    border-color: #ef1b25;
    box-shadow: 0 0 0 3px rgba(239, 27, 37, 0.12);
}

.office-equipment-form .wide-field {
    grid-column: 1 / -1;
}

.office-equipment-form .button-row {
    margin-top: 4px;
}

.office-equipment-status {
    display: inline-flex;
    align-items: center;
    min-width: 86px;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.office-equipment-status.available {
    background: #dcfce7;
    color: #166534;
}

.office-equipment-status.issued {
    background: #dbeafe;
    color: #1d4ed8;
}

.office-equipment-status.in-repair {
    background: #ffedd5;
    color: #c2410c;
}

.office-equipment-status.retired {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 1100px) {
    .office-equipment-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .office-equipment-form-grid {
        grid-template-columns: 1fr;
    }
}
.office-equipment-detail-image {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.mobile-scan-card {
    max-width: 820px;
    margin: 0 auto;
}

.mobile-scan-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.mobile-scan-fields label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-scan-fields input {
    min-height: 48px;
    font-size: 16px;
}

.mobile-scan-mode,
.mobile-scan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.mobile-scan-mode button,
.mobile-scan-actions button {
    min-height: 46px;
    padding: 0 18px;
}

.mobile-camera-box {
    position: relative;
    width: 100%;
    height: 420px;
    margin-top: 16px;
    border: 1px solid #d6e0ee;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

#barcodeVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.barcode-guide {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 38%;
    height: 24%;
    border: 3px solid #ef1b2d;
    border-radius: 6px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.mobile-scan-status {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #eef6ff;
    color: #17446b;
    font-weight: 700;
}

.mobile-scan-status.success {
    background: #e6ffef;
    color: #176b37;
}

.mobile-scan-status.error {
    background: #ffecec;
    color: #9b1c1c;
}

.mobile-last-scan {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d6e0ee;
    border-radius: 8px;
    background: #fff;
}

.mobile-last-scan span {
    display: block;
    color: #50627a;
    font-size: 12px;
    margin-bottom: 4px;
}

.mobile-last-scan strong {
    font-size: 18px;
}

@media (max-width: 700px) {
    .mobile-scan-mode button,
    .mobile-scan-actions button {
        width: 100%;
    }

    .mobile-camera-box {
        height: 340px;
    }
}

.office-equipment-movement-grid input,
.office-equipment-movement-grid select {
    width: 100%;
    height: 34px;
    padding: 8px 10px;
    border: 1px solid #d6e0ee;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font: inherit;
    box-sizing: border-box;
}

.office-equipment-movement-grid input:focus,
.office-equipment-movement-grid select:focus {
    outline: none;
    border-color: #ef1b2d;
    box-shadow: 0 0 0 2px rgba(239, 27, 45, 0.12);
}

.office-equipment-movement-grid .wide-field input {
    width: 100%;
}

.office-equipment-movement-grid + .button-row {
    margin-top: 14px;
}
.office-equipment-movement-grid input,
.office-equipment-movement-grid select {
    width: 100%;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #d6e0ee;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font: inherit;
    box-sizing: border-box;
}

.office-equipment-movement-grid input:focus,
.office-equipment-movement-grid select:focus {
    outline: none;
    border-color: #ef1b2d;
    box-shadow: 0 0 0 2px rgba(239, 27, 45, 0.12);
}

.office-equipment-movement-grid .wide-field input {
    width: 100%;
}

.office-equipment-movement-grid + .button-row {
    margin-top: 14px;
}
.scan-success-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.28);
    pointer-events: none;
    z-index: 5;
}

.scan-success-overlay.show {
    display: flex;
    animation: scan-success-fade 0.75s ease-out forwards;
}

.scan-success-mark {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 62px;
    line-height: 92px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(22, 163, 74, 0.45);
}

@keyframes scan-success-fade {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }

    15% {
        opacity: 1;
        transform: scale(1);
    }

    70% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}
@media print {
    body:not(.barcode-print-page) .material-print-sheet,
    body:not(.barcode-print-page) .material-print-sheet * {
        visibility: visible !important;
    }

    body:not(.barcode-print-page) .material-print-sheet {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 900px !important;
        margin: 0 auto !important;
        padding: 0.35in !important;
        background: white !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    body:not(.barcode-print-page) .barcode-print-sheet {
        display: none !important;
    }
}
/* =========================================
   BARCODE PRINT PAGE ONLY
========================================= */

.barcode-print-sheet {
    width: 2.125in;
    height: 1in;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    margin: 24px auto;
}

.barcode-label {
    width: 2.05in;
    height: 0.9in;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
}

.barcode-label svg {
    width: 1.95in;
    height: 0.55in;
}

.barcode-text {
    margin-top: 0.03in;
    font-size: 8pt;
    line-height: 1;
    font-weight: 700;
    color: #000;
    text-align: center;
    white-space: nowrap;
}

@media print {
    body.barcode-print-page {
        display: block !important;
        width: 2.125in !important;
        height: 1in !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        overflow: hidden !important;
    }

    body.barcode-print-page .sidebar,
    body.barcode-print-page .page-header,
    body.barcode-print-page .print-hide,
    body.barcode-print-page .message-stack {
        display: none !important;
    }

    body.barcode-print-page .content {
        width: 2.125in !important;
        height: 1in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.barcode-print-page .barcode-print-sheet {
        display: flex !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 2.125in !important;
        height: 1in !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
        visibility: visible !important;
    }

    body.barcode-print-page .barcode-print-sheet *,
    body.barcode-print-page .barcode-label,
    body.barcode-print-page .barcode-label *,
    body.barcode-print-page #materialBarcode {
        visibility: visible !important;
    }

    body.barcode-print-page .barcode-label {
        width: 2.05in !important;
        height: 0.9in !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    body.barcode-print-page .barcode-label svg {
        width: 1.95in !important;
        height: 0.55in !important;
        display: block !important;
    }

    body.barcode-print-page .barcode-text {
        font-size: 8pt !important;
        line-height: 1 !important;
        margin-top: 0.03in !important;
        color: #000 !important;
    }
}



.setup-user-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.setup-user-grid label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.setup-user-grid input,
.setup-user-grid select,
#usersTable input,
#usersTable select {
    width: 100%;
    height: 38px;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    padding: 0 10px;
    background: white;
}

.setup-check-field {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    padding: 7px 10px;
}

.setup-check-field small {
    display: block;
    color: #53627c;
    font-weight: 400;
}

.setup-check-field input {
    width: 20px;
    height: 20px;
}

@media (max-width: 1200px) {
    .setup-user-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .setup-user-grid {
        grid-template-columns: 1fr;
    }
}
.setup-tab-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.setup-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
}

.setup-tab:hover {
    background: #eeeeee;
}

.setup-tab.active {
    background: #ed1c24;
    color: #ffffff;
    border-color: #ed1c24;
}
 
/* =========================================
   SETUP TABLE FORMS
========================================= */

.setup-table input,
.setup-table select {
    width: 100%;
    min-width: 120px;
    height: 38px;
    border: 1px solid #d7dee8;
    border-radius: 7px;
    padding: 0 10px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.setup-table input:focus,
.setup-table select:focus {
    outline: none;
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.12);
}

.setup-table input[type="checkbox"] {
    width: 22px;
    min-width: 22px;
    height: 22px;
    accent-color: #ed1c24;
}

.setup-table td {
    vertical-align: middle;
}

.setup-table .setup-action-cell {
    width: 170px;
}

.setup-table .tool-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
}
.setup-table input[readonly],
.setup-user-grid input[readonly] {
    background: #f8fafc;
    color: #4b5563;
    font-weight: 700;
}
.po-detail-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.po-action-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.po-action-row form {
    margin: 0;
}

@media (max-width: 800px) {
    .po-detail-actions {
        justify-items: stretch;
        width: 100%;
    }

    .po-action-row {
        justify-content: flex-start;
    }
}
/* =========================================
   PO DETAIL PRINT FIX
========================================= */

@media print {
    .po-detail-print-area,
    .po-detail-print-area * {
        visibility: visible !important;
    }

    .po-detail-print-area {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0.35in !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .po-detail-print-area .card {
        display: block !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
        border-radius: 0 !important;
        padding: 12px !important;
        margin: 0 0 10px !important;
        page-break-inside: avoid;
    }

    .po-detail-print-area .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10px !important;
    }

    .po-detail-print-area .data-table th,
    .po-detail-print-area .data-table td {
        padding: 5px !important;
        border-bottom: 1px solid #dddddd !important;
        color: black !important;
    }

    .po-detail-print-area .po-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .po-detail-actions,
    .page-header,
    .sidebar,
    .sidebar-toggle,
    .message-stack,
    .print-hide,
    .report-actions,
    .soft-button,
    .primary-button,
    .danger-button {
        display: none !important;
    }
}
/* =========================================
   Purchase Order Print Layout
========================================= */

@media print {

    @page {
        size: letter portrait;
        margin: 0.25in;
    }

    body * {
        visibility: hidden !important;
    }

    .po-print-form,
    .po-print-form * {
        visibility: visible !important;
    }

    .po-print-form {
        position: static !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        font-family: Arial, sans-serif !important;
        font-size: 9px !important;
    }

    /* Header */

    .po-classic-top {
        display: grid;
        grid-template-columns: 1fr 1.1fr 0.75fr;
        gap: 12px;
        align-items: start;
    }

    .po-classic-logo {
        width: 150px;
        height: auto;
        object-fit: contain;
    }

    .po-classic-small {
        margin-top: 5px;
        font-size: 8px;
        font-weight: 700;
        line-height: 1.25;
    }

    .po-classic-title {
        text-align: center;
        font-size: 9px;
        font-weight: 700;
    }

    .po-classic-title h1 {
        margin: 2px 0 3px;
        font-size: 22px;
        line-height: 1;
        letter-spacing: 1px;
    }

    .po-classic-number {
        border: 1px solid #000;
        min-height: 54px;
    }

    .po-classic-number-label {
        padding: 4px 6px;
        border-bottom: 1px solid #000;
        font-size: 8px;
        text-transform: uppercase;
    }

    .po-classic-number-value {
        padding: 10px 6px;
        text-align: center;
        font-size: 13px;
        font-weight: 800;
    }

    .po-classic-rule {
        margin: 10px 0 12px;
        border-top: 3px solid #000;
    }

    /* PO Information */

    .po-classic-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-bottom: 8px;
    }

    .po-classic-field {
        display: grid;
        grid-template-columns: 95px 1fr;
        align-items: end;
        min-height: 19px;
        border-bottom: 1px solid #000;
    }

    .po-classic-field span,
    .po-classic-check-row span {
        color: #000 !important;
        text-decoration: none !important;
        font-size: 8px;
    }

    .po-classic-field strong {
        font-size: 9px;
        font-weight: 700;
    }

    .po-classic-check-row {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 19px;
        border-bottom: 1px solid #000;
        font-size: 9px;
    }

    .po-classic-check-row label {
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }

    .po-classic-check-row input {
        width: 10px;
        height: 10px;
        margin: 0;
    }

    .po-classic-notify {
        padding: 3px;
        border: 1px solid #000;
        border-bottom: 0;
        text-align: center;
        font-size: 9px;
        font-weight: 800;
    }

    /* Line Items */

    .po-classic-lines {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        font-size: 8px;
    }

    .po-classic-lines th,
    .po-classic-lines td {
        height: 17px;
        padding: 2px 4px;
        border: 1px solid #000;
        vertical-align: middle;
    }

    .po-classic-lines th {
        text-align: center;
        font-weight: 800;
    }

    .po-classic-lines tr {
        page-break-inside: avoid;
    }

    .po-classic-lines th:nth-child(1),
    .po-classic-lines td:nth-child(1) {
        width: 28px;
        text-align: center;
    }

    .po-classic-lines th:nth-child(2),
    .po-classic-lines td:nth-child(2) {
        width: 42px;
        text-align: right;
    }

    .po-classic-lines th:nth-child(3),
    .po-classic-lines td:nth-child(3) {
        width: 54px;
    }

    .po-classic-lines th:nth-child(4),
    .po-classic-lines td:nth-child(4) {
        width: 95px;
    }

    .po-classic-lines th:nth-child(5),
    .po-classic-lines td:nth-child(5) {
        width: 95px;
    }

    .po-classic-lines th:nth-child(7),
    .po-classic-lines td:nth-child(7),
    .po-classic-lines th:nth-child(8),
    .po-classic-lines td:nth-child(8) {
        width: 68px;
        text-align: right;
    }

    /* Footer / Totals */

    .po-classic-bottom {
        display: grid;
        grid-template-columns: 1fr 185px;
        gap: 6px;
        margin-top: 4px;
        page-break-inside: avoid;
    }

    .po-classic-special {
        min-height: 46px;
        border: 1px solid #000;
    }

    .po-classic-special strong {
        display: block;
        padding: 3px 5px;
        border-bottom: 1px solid #000;
        font-size: 9px;
    }

    .po-classic-special div {
        padding: 5px;
        font-size: 9px;
    }

    .po-classic-totals {
        border: 1px solid #000;
    }

    .po-classic-totals div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 18px;
        border-bottom: 1px solid #000;
    }

    .po-classic-totals div:last-child {
        border-bottom: 0;
    }

    .po-classic-totals span,
    .po-classic-totals strong {
        padding: 3px 5px;
        font-size: 9px;
    }

    .po-classic-totals span {
        border-right: 1px solid #000;
        font-weight: 700;
    }

    .po-classic-totals strong {
        text-align: right;
        font-weight: 800;
    }
}
.po-detail-table {
    table-layout: fixed;
}

.po-detail-table td:first-child {
    width: 210px;
    white-space: nowrap;
}

.po-detail-table td:nth-child(2) {
    width: auto;
}
/* =========================================
   ITEM DETAIL REPORT
========================================= */

.item-detail-card {
    padding: 18px;
}

.item-detail-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.item-detail-media {
    display: grid;
    gap: 12px;
}

.item-detail-image-box {
    width: 180px;
    height: 150px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.item-detail-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.item-detail-image-box span {
    color: #64748b;
    font-weight: 700;
}

.item-detail-code {
    border: 1px solid #d7dee8;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.item-detail-code span,
.item-detail-field span {
    display: block;
    color: #53627c;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.item-detail-code strong,
.item-detail-field strong {
    color: #000000;
    font-size: 14px;
    line-height: 1.3;
    word-break: break-word;
}

.item-detail-main {
    min-width: 0;
}

.item-detail-title-row {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.item-detail-title-row h2 {
    margin: 0;
    font-size: 24px;
}

.item-detail-title-row p {
    margin: 6px 0 0;
    color: #53627c;
    font-weight: 700;
}

.item-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
}

.item-detail-field {
    min-height: 72px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 11px 12px;
}

@media (max-width: 1200px) {
    .item-detail-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

@media (max-width: 800px) {
    .item-detail-layout {
        grid-template-columns: 1fr;
    }

    .item-detail-image-box {
        width: 100%;
        max-width: 240px;
    }

    .item-detail-grid {
        grid-template-columns: 1fr;
    }
}


.item-detail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
}

.item-detail-image-box {
    width: 180px;
    height: 210px;
}

.item-detail-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.item-detail-code {
    width: 180px;
}

/* =========================================
   DYMO 30336 QR LABEL - QR TOP, TEXT VERTICAL
========================================= */

body.barcode-print-page .barcode-print-sheet {
    width: 1in;
    height: 2.125in;
    margin: 20px auto;
    padding: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.barcode-print-page .qr-label {
    width: 0.92in;
    height: 2.05in;
    display: grid;
    grid-template-rows: 0.82in 1.18in;
    align-items: start;
    justify-items: center;
    gap: 0.02in;
    background: #ffffff;
    overflow: hidden;
}

body.barcode-print-page .qr-code-image {
    width: 0.74in;
    height: 0.74in;
    object-fit: contain;
    margin-top: 0;
}

body.barcode-print-page .qr-code-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    width: auto;
    height: 1.15in;
    font-size: 8pt;
    line-height: 1;
    font-weight: 700;
    color: #000000;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

@media print {
    body.barcode-print-page,
    body.barcode-print-page .content {
        width: 1in !important;
        height: 2.125in !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: hidden !important;
    }

    body.barcode-print-page * {
        visibility: hidden !important;
    }

    body.barcode-print-page .barcode-print-sheet,
    body.barcode-print-page .barcode-print-sheet *,
    body.barcode-print-page .qr-label,
    body.barcode-print-page .qr-label *,
    body.barcode-print-page .qr-code-image,
    body.barcode-print-page .qr-code-text {
        visibility: visible !important;
    }

    body.barcode-print-page .sidebar,
    body.barcode-print-page .page-header,
    body.barcode-print-page .message-stack,
    body.barcode-print-page .print-hide {
        display: none !important;
    }

    body.barcode-print-page .barcode-print-sheet {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 1in !important;
        height: 2.125in !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    body.barcode-print-page .qr-label {
        width: 0.92in !important;
        height: 2.05in !important;
        display: grid !important;
        grid-template-rows: 0.82in 1.18in !important;
        align-items: start !important;
        justify-items: center !important;
        gap: 0.02in !important;
        background: #ffffff !important;
        overflow: hidden !important;
        transform: none !important;
    }

    body.barcode-print-page .qr-code-image {
        width: 0.74in !important;
        height: 0.74in !important;
        object-fit: contain !important;
        margin-top: 0 !important;
    }

    body.barcode-print-page .qr-code-text {
        writing-mode: vertical-rl !important;
        text-orientation: mixed !important;
        height: 1.15in !important;
        font-size: 8pt !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        color: #000000 !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }
}

.barcode-guide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(68vw, 280px);
    height: min(68vw, 280px);
    transform: translate(-50%, -50%);
    border: 3px solid #ef1b2d;
    border-radius: 14px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}
/* =========================================
   CYCLE COUNT PHONE MODE
========================================= */

.mobile-scan-card {
    max-width: 760