:root {
    --ink: #14213d;
    --ink-strong: #0b1324;
    --muted: #65738a;
    --line: #dfe6ef;
    --line-strong: #cbd5e1;
    --surface: #ffffff;
    --surface-soft: #f6f8fb;
    --canvas: #edf2f7;
    --brand: #2557d6;
    --brand-dark: #173eaa;
    --brand-soft: #eaf0ff;
    --success: #087f5b;
    --success-soft: #e6f8f1;
    --warning: #a05a00;
    --warning-soft: #fff4dd;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 28px rgba(15, 23, 42, .05);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, .13);
    color-scheme: light;
    font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { background: var(--canvas); }
body {
    color: var(--ink-strong) !important;
    background:
        radial-gradient(circle at 8% -10%, rgba(37, 87, 214, .10), transparent 31rem),
        var(--canvas) !important;
    font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .btn, a { -webkit-tap-highlight-color: transparent; }

.btn {
    min-height: 42px !important;
    padding: 10px 16px !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #aebbd0 !important; box-shadow: 0 6px 18px rgba(15, 23, 42, .08) !important; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(37, 87, 214, .22) !important;
    outline-offset: 2px;
}
.btn.primary, .btn-primary, .auth-shell .btn, .public-page .btn:not(.secondary) {
    color: #fff !important;
    border-color: var(--brand) !important;
    background: var(--brand) !important;
}
.btn.primary:hover, .btn-primary:hover, .auth-shell .btn:hover, .public-page .btn:not(.secondary):hover { background: var(--brand-dark) !important; }
.btn.secondary, .btn-secondary, .btn-quiet, .public-page .btn.secondary {
    color: var(--ink) !important;
    background: #fff !important;
}
.btn-danger, .btn.danger { color: var(--danger) !important; border-color: #f6c7c2 !important; background: var(--danger-soft) !important; }
.btn-warning { color: var(--warning) !important; border-color: #f3d69d !important; background: var(--warning-soft) !important; }

input, select, textarea {
    min-height: 44px !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--ink-strong) !important;
    background: #fff !important;
    font-size: 15px !important;
    transition: border-color .16s ease, box-shadow .16s ease;
}
input:hover, select:hover, textarea:hover { border-color: #9eacc2 !important; }
input:focus, select:focus, textarea:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 4px rgba(37, 87, 214, .12) !important; }
::placeholder { color: #8b98aa; opacity: 1; }

.card, .panel, .stat, .tile, .loan-card, .user-card {
    border-color: var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
}
.subtle { color: var(--muted) !important; font-size: 14px !important; line-height: 1.6 !important; }
.badge, .role-badge, .status-badge { border-radius: 999px !important; font-weight: 750 !important; }
.badge { color: var(--success) !important; background: var(--success-soft) !important; }
.badge.off, .badge.empty { color: #596579 !important; background: #edf1f5 !important; }
.badge.warn { color: var(--warning) !important; background: var(--warning-soft) !important; }
.badge.bad { color: var(--danger) !important; background: var(--danger-soft) !important; }

/* Public catalogue: calm library-like workspace with image-led inventory cards. */
.public-page { width: min(1280px, calc(100% - 40px)) !important; padding: 28px 0 64px !important; }
.public-page > header {
    position: relative;
    overflow: hidden;
    min-height: 166px;
    padding: 32px 34px !important;
    border: 0 !important;
    border-radius: var(--radius-lg) !important;
    background: linear-gradient(120deg, #101c38 0%, #183d87 70%, #2557d6 100%) !important;
    box-shadow: 0 20px 55px rgba(16, 28, 56, .20) !important;
}
.public-page > header::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -86px;
    top: -138px;
    border: 56px solid rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}
.public-page header h1 { color: #fff; font-size: clamp(26px, 4vw, 40px) !important; letter-spacing: -.035em; }
.public-page header .subtle { max-width: 620px; color: rgba(255,255,255,.76) !important; font-size: 15px !important; }
.public-page .title-with-logo { gap: 14px !important; }
.public-page .title-logo { width: 48px !important; height: 48px !important; border: 2px solid rgba(255,255,255,.7) !important; }
.public-page header .actions { position: relative; z-index: 1; }
.public-page header .btn.secondary { color: #fff !important; border-color: rgba(255,255,255,.32) !important; background: rgba(255,255,255,.12) !important; backdrop-filter: blur(8px); }
.public-page header .btn:not(.secondary) { border-color: #fff !important; color: var(--brand-dark) !important; background: #fff !important; }

.public-page .stats { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px !important; margin: 18px 0 !important; }
.public-page .stat { position: relative; padding: 18px 20px !important; overflow: hidden; }
.public-page .stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.public-page .stat span { color: var(--muted) !important; font-size: 13px !important; font-weight: 650; }
.public-page .stat strong { color: var(--ink); font-size: 30px !important; letter-spacing: -.03em; }

.public-page .search-panel { position: sticky; top: 12px; z-index: 8; padding: 18px 20px !important; border-radius: var(--radius) !important; backdrop-filter: blur(16px); background: rgba(255,255,255,.92) !important; }
.public-page .search-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.public-page .result-count { color: var(--muted); font-size: 14px; }
.public-page .search-view-tools { display: flex; align-items: center; gap: 9px; }
.public-page .view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #eef3f8; }
.public-page .view-toggle button { min-height: 30px; padding: 5px 10px; border: 0; border-radius: 7px; color: #64748b; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.public-page .view-toggle button.active { color: #174ea6; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.08); }
.public-page .toolbar { grid-template-columns: minmax(260px, 1.7fr) minmax(150px, .7fr) minmax(140px, .65fr) auto auto !important; gap: 10px !important; }
.public-page .toolbar input { padding-left: 44px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2365738a' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.8-3.8'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: 14px center !important; }

.public-page .item-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
}
.public-page .item-table-head { display: none !important; }
.public-page .item-table-row:not(.item-table-head) {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr 104px !important;
    grid-template-rows: auto auto auto 1fr;
    gap: 8px 12px !important;
    min-width: 0 !important;
    min-height: 230px !important;
    padding: 18px !important;
    overflow: hidden;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.public-page .item-table-row:not(.item-table-head):hover { transform: translateY(-3px); border-color: #c6d2e2 !important; box-shadow: 0 18px 42px rgba(15,23,42,.10); }
.public-page .item-cell { display: block !important; color: var(--muted) !important; font-size: 13px !important; }
.public-page .item-cell::before { display: none !important; }
.public-page .item-cell[data-label="기자재 정보"] { grid-column: 1; grid-row: 1; align-self: start; }
.public-page .item-cell[data-label="기자재 정보"] strong { display: -webkit-box !important; min-height: 44px; overflow: hidden; color: var(--ink-strong) !important; font-size: 16px !important; line-height: 1.35; white-space: normal !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.public-page .item-cell[data-label="기자재 정보"] small { display: inline-flex !important; margin-top: 9px; padding: 4px 8px; border-radius: 999px; color: var(--brand-dark) !important; background: var(--brand-soft); font-size: 12px; font-weight: 700; }
.public-page .item-cell[data-label="자산번호"] { grid-column: 1; grid-row: 2; }
.public-page .item-cell[data-label="자산번호"]::after { content: "자산번호"; display: inline; margin-left: 6px; color: #8793a5; font-size: 12px; }
.public-page .item-cell[data-label="보관 위치"] { grid-column: 1; grid-row: 3; }
.public-page .item-cell[data-label="보관 위치"] .cell-value::before { content: "보관 · "; color: #8793a5; }
.public-page .quantity-cell { grid-column: 1 / -1; grid-row: 4; align-self: end; padding-top: 12px; border-top: 1px solid #edf1f5; }
.public-page .quantity-cell > .cell-value { display: none; }
.public-page .item-cell[data-label="비고"] { display: none !important; }
.public-page .item-photo-cell { grid-column: 2 !important; grid-row: 1 / span 3 !important; align-self: start; justify-content: flex-end !important; }
.public-page .photo { width: 104px !important; height: 104px !important; border: 0 !important; border-radius: 14px !important; background: var(--surface-soft) !important; }
.public-page .no-photo { position: relative; color: transparent !important; }
.public-page .no-photo::after { content: "사진 없음"; position: absolute; inset: 0; display: grid; place-items: center; color: #98a3b3; font-size: 12px; }
.public-page .item-list > .panel { grid-column: 1 / -1; }
.public-page .item-list.table-view { display: block !important; overflow-x: auto; background: #fff; }
.public-page .item-list.table-view .item-table-head { display: grid !important; grid-template-columns: minmax(190px,1.35fr) minmax(120px,.8fr) minmax(130px,.9fr) minmax(130px,.8fr) minmax(180px,1.25fr) 92px !important; min-width: 900px; }
.public-page .item-list.table-view .item-table-row:not(.item-table-head) { display: grid !important; grid-template-columns: minmax(190px,1.35fr) minmax(120px,.8fr) minmax(130px,.9fr) minmax(130px,.8fr) minmax(180px,1.25fr) 92px !important; grid-template-rows: auto !important; min-width: 900px; min-height: 78px !important; margin: 0 !important; padding: 10px 12px !important; border: 0 !important; border-bottom: 1px solid #edf1f5 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important; }
.public-page .item-list.table-view .item-cell, .public-page .item-list.table-view .quantity-cell, .public-page .item-list.table-view .item-photo-cell { grid-column: auto !important; grid-row: auto !important; padding: 0 !important; border: 0 !important; }
.public-page .item-list.table-view .photo { width: 72px !important; height: 54px !important; }
.public-page .public-empty[hidden] { display: none !important; }
.public-page .catalog-more-wrap { margin-top: 12px; }

/* Authentication */
.auth-page { position: relative; overflow: hidden; }
.auth-page::before {
    content: "";
    position: fixed;
    inset: 0 50% 0 0;
    background: linear-gradient(145deg, #101c38, #173a80 62%, #2557d6);
    z-index: -1;
}
.auth-shell { width: min(470px, calc(100vw - 32px)) !important; padding: 38px !important; border: 1px solid rgba(255,255,255,.8) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-lg) !important; }
.auth-shell .brand { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-shell h1 { font-size: 27px !important; letter-spacing: -.03em; }
.auth-shell label { margin-bottom: 8px !important; font-size: 14px !important; }
.auth-shell input { margin-bottom: 17px !important; padding: 12px 14px !important; }
.auth-shell .btn { min-height: 48px !important; }
.auth-shell .switch { font-size: 14px !important; }

/* Dashboard */
.dashboard-page { width: min(1520px, calc(100% - 40px)) !important; padding: 28px 0 64px !important; }
.dashboard-page .hero { gap: 16px !important; }
.dashboard-page .hero-main { position: relative; overflow: hidden; min-height: 158px; padding: 28px 30px !important; border: 0 !important; border-radius: var(--radius-lg) !important; background: linear-gradient(125deg, #101c38, #163574 70%, #2557d6) !important; box-shadow: 0 20px 55px rgba(16,28,56,.20) !important; }
.dashboard-page .hero-main::after { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; top: -150px; border: 56px solid rgba(255,255,255,.07); border-radius: 50%; }
.dashboard-page .hero-main h1 { font-size: clamp(26px, 3vw, 38px) !important; letter-spacing: -.035em; }
.dashboard-page .hero-main p { font-size: 15px !important; }
.dashboard-page .hero-side { padding: 24px !important; border-radius: var(--radius-lg) !important; }
.dashboard-page .stats { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap: 10px !important; }
.dashboard-page .stat { min-height: 100px; padding: 19px !important; }
.dashboard-page .stat strong { color: var(--ink); font-size: 29px !important; letter-spacing: -.03em; }
.dashboard-page .panel { padding: 22px !important; }
.dashboard-page .panel-title { font-size: 19px !important; letter-spacing: -.015em; }
.dashboard-page .grid { gap: 16px !important; }
.dashboard-page .equipment-list { border-color: var(--line) !important; border-radius: 14px !important; }
.dashboard-page .equipment-table-row { border-color: #edf1f5 !important; }
.dashboard-page .equipment-table-row:hover:not(.equipment-table-head) { background: #f8faff !important; }
.dashboard-page .admin-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.dashboard-page .admin-pagination span { min-width: 72px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 750; }
.dashboard-page details { border-radius: var(--radius-sm); }
.dashboard-page summary { color: var(--brand-dark); font-weight: 700; }

/* Shared secondary screens */
.app-page { width: min(1120px, calc(100% - 36px)) !important; padding-top: 26px !important; }
.app-page .topbar { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.88); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
.app-page .topbar h1 { color: var(--ink-strong); font-size: clamp(22px, 3vw, 30px) !important; letter-spacing: -.025em; }
.app-page .card { padding: 22px !important; }
.app-page table th { color: var(--muted) !important; font-size: 13px !important; }
.app-page table td { padding-top: 12px !important; padding-bottom: 12px !important; }
.app-page .tile strong { color: var(--ink); }

@media (max-width: 980px) {
    .public-page .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .public-page .toolbar { grid-template-columns: 1fr 1fr !important; }
    .public-page .toolbar input { grid-column: 1 / -1; }
    .public-page .toolbar .btn { width: 100%; }
    .dashboard-page .stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .dashboard-page .work-queue-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (min-width: 721px) and (max-width: 900px) {
    .public-page > header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end !important;
    }
    .public-page header .actions { flex-wrap: nowrap !important; align-self: end; }
    .public-page header .actions .btn { white-space: nowrap; }
}

@media (max-width: 720px) {
    body { background: var(--canvas) !important; }
    .public-page, .dashboard-page, .app-page { width: min(100% - 24px, 100%) !important; padding-top: 12px !important; }
    .public-page { display: flex; flex-direction: column; }
    .public-page > header { order: 0; min-height: 0; padding: 20px 18px !important; }
    .public-page > .search-panel { order: 1; margin-top: 12px; }
    .public-page > .stats { order: 2; }
    .public-page > .item-list { order: 3; }
    .public-page > .catalog-more-wrap { order: 4; }
    .public-page header .actions { width: 100%; }
    .public-page header .actions .btn { flex: 1; }
    .public-page .stats { grid-template-columns: repeat(3, 1fr); gap: 8px !important; }
    .public-page .stat { min-width: 0; padding: 14px 12px !important; }
    .public-page .stat span { min-height: 38px; font-size: 12px !important; line-height: 1.45; }
    .public-page .stat strong { font-size: 23px !important; }
    .public-page .search-panel { position: static; padding: 17px !important; margin-bottom: 0 !important; }
    .public-page .search-heading { align-items: start; flex-direction: column; gap: 4px; }
    .public-page .view-toggle { display: none; }
    .public-page .toolbar { grid-template-columns: 1fr !important; }
    .public-page .toolbar input { grid-column: auto; }
    .public-page .item-list { grid-template-columns: 1fr; gap: 10px; }
    .public-page .item-table-row:not(.item-table-head) { min-height: 204px !important; padding: 16px !important; }

    .auth-page { place-items: start center !important; padding: 18px 0; }
    .auth-page::before { inset: 0 0 58% 0; }
    .auth-shell { margin-top: 30px; padding: 28px 22px !important; }

    .dashboard-page .hero { grid-template-columns: 1fr !important; }
    .dashboard-page .hero-main { min-height: 0; padding: 25px 21px !important; }
    .dashboard-page .hero-side { padding: 20px !important; }
    .dashboard-page .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .dashboard-page .stat { min-height: 88px; padding: 15px !important; }
    .dashboard-page .panel { padding: 17px !important; }
    .dashboard-page .work-queue { padding: 15px; }
    .dashboard-page .work-queue-grid { grid-template-columns: 1fr; }
    .app-page .topbar { align-items: flex-start; padding: 18px; }
}

/* Operational UX additions */
.dashboard-page .work-queue { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.dashboard-page .work-queue-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dashboard-page .work-queue-head strong, .dashboard-page .work-queue-head span { display: block; }
.dashboard-page .work-queue-head strong { color: var(--ink-strong); font-size: 17px; }
.dashboard-page .work-queue-head span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.dashboard-page .work-queue-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.dashboard-page .work-card { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 70px; padding: 12px; border: 1px solid #dce5ef; border-radius: 13px; color: #26384e; background: #f9fbfd; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.dashboard-page .work-card:hover { transform: translateY(-2px); border-color: #a9c3e8; box-shadow: 0 9px 24px rgba(20,54,100,.10); }
.dashboard-page .work-card.urgent { border-color: #f3c677; background: #fffaf0; }
.dashboard-page .work-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #155eef; background: #e9f1ff; font-size: 11px; font-weight: 900; }
.dashboard-page .work-card.urgent .work-icon { color: #9a5700; background: #ffedc6; }
.dashboard-page .work-card small, .dashboard-page .work-card strong { display: block; }
.dashboard-page .work-card small { color: #6e7e92; font-size: 10px; }
.dashboard-page .work-card strong { margin-top: 2px; font-size: 15px; }
.dashboard-page .work-card i { color: #69809a; font-size: 11px; font-style: normal; }
.dashboard-page .notification-dropdown { position: relative; }
.dashboard-page .notification-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; background: #dc3545; font-size: 10px; }
.dashboard-page .notification-menu { width: min(380px, calc(100vw - 28px)) !important; max-height: 470px; overflow-y: auto; }
.dashboard-page .notification-dropdown .notification-menu { right: 0; left: auto; }
.dashboard-page .notification-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #e5eaf1; }
.dashboard-page .notification-menu form { margin: 0; }
.dashboard-page .notification-read-all { border: 0; color: #155eef; background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.dashboard-page .notification-item button { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf1f5; color: #26384f; background: #fff; text-align: left; cursor: pointer; }
.dashboard-page .notification-item.unread button { background: #edf4ff; }
.dashboard-page .notification-item strong, .dashboard-page .notification-item span, .dashboard-page .notification-item small { display: block; }
.dashboard-page .notification-item span { margin-top: 3px; color: #5f6e82; font-size: 11px; white-space: pre-line; }
.dashboard-page .notification-item small { margin-top: 5px; color: #8b97a6; font-size: 10px; }
.dashboard-page .notification-empty { padding: 24px; color: #8190a3; text-align: center; font-size: 12px; }
.dashboard-page .security-alert, .dashboard-page .maintenance-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid #f2ca6d; border-radius: 14px; color: #744500; background: #fff8e3; }
.dashboard-page .security-alert span { font-size: 12px; }
.dashboard-page .maintenance-alert { display: block; border-color: #f7d38e; }
.dashboard-page .maintenance-alert > div { margin-top: 5px; font-size: 12px; }
.dashboard-page .stat-warning { border-color: #f4cf87 !important; background: #fffaf0 !important; }
.dashboard-page .cart-add { margin-top: 7px; padding: 5px 8px; border: 1px solid #bcd0e7; border-radius: 8px; color: #315a85; background: #f0f6fc; font-size: 10px; font-weight: 850; cursor: pointer; }
.dashboard-page .cart-add.added { color: #087553; border-color: #9bd9c3; background: #e1f8ef; }
.dashboard-page .condition-photo-grid { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0; }
.dashboard-page .condition-photo-grid a { position: relative; flex: 0 0 auto; }
.dashboard-page .condition-photo-grid img { width: 72px; height: 56px; border-radius: 8px; object-fit: cover; }
.dashboard-page .condition-photo-grid span { position: absolute; right: 3px; bottom: 3px; padding: 2px 5px; border-radius: 5px; color: #fff; background: rgba(15,23,42,.75); font-size: 9px; }
.dashboard-page .condition-form { display: grid; grid-template-columns: 100px minmax(150px,1fr) minmax(150px,1fr) auto; gap: 7px; }
.dashboard-page .password-required { padding: 10px 12px; border-radius: 9px; color: #8a4d00; background: #fff2ce; font-size: 12px; font-weight: 800; }
.dashboard-page .message { transition: opacity .25s ease, transform .25s ease; }
.dashboard-page .message-hide { opacity: 0; transform: translateY(-6px); }
.dashboard-page .cart-tray { position: fixed; z-index: 45; right: 20px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 300px; min-height: 52px; padding: 10px 16px; border: 0; border-radius: 15px; color: #fff; background: #103f9d; box-shadow: 0 16px 35px rgba(16,63,157,.28); font-weight: 800; cursor: pointer; }
.dashboard-page .cart-tray[hidden] { display: none; }
.dashboard-page dialog.cart-dialog, .dashboard-page dialog.confirm-dialog { width: min(620px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 18px; color: #172033; background: #fff; }
.dashboard-page dialog::backdrop { background: rgba(8,22,45,.64); backdrop-filter: blur(2px); }
.dashboard-page .cart-dialog > form, .dashboard-page .confirm-dialog { padding: 18px; }
.dashboard-page .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.dashboard-page .dialog-head strong, .dashboard-page .dialog-head span { display: block; }
.dashboard-page .dialog-head strong { font-size: 19px; }
.dashboard-page .dialog-head span { margin-top: 4px; color: #718096; font-size: 12px; }
.dashboard-page .dialog-close { width: 38px; height: 38px; border: 0; border-radius: 10px; color: #5f6e82; background: #edf2f7; font-size: 22px; cursor: pointer; }
.dashboard-page .cart-items { max-height: 230px; overflow-y: auto; }
.dashboard-page .cart-row { display: grid; grid-template-columns: minmax(0,1fr) 70px 48px; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid #edf1f5; }
.dashboard-page .cart-row strong, .dashboard-page .cart-row span { display: block; }
.dashboard-page .cart-row span { color: #718096; font-size: 10px; }
.dashboard-page .cart-remove { min-height: 36px; border: 0; border-radius: 8px; color: #a3212c; background: #ffedef; cursor: pointer; }
.dashboard-page .cart-fields { margin: 12px 0; }
.dashboard-page .dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dashboard-page .confirm-dialog { text-align: center; }
.dashboard-page .confirm-dialog h2 { margin: 8px 0; }
.dashboard-page .confirm-dialog p { color: #5d6c7f; line-height: 1.55; }
.dashboard-page .confirm-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; color: #9f5a00; background: #fff0c5; font-size: 22px; font-weight: 900; }

/* Admin command center */
.dashboard-page { scroll-behavior: smooth; }
.dashboard-page .admin-sidebar { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #d9e4ef; border-radius: 22px; background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%); box-shadow: 0 14px 36px rgba(25,48,79,.08); }
.dashboard-page .admin-sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 18px 16px; border-bottom: 1px solid #e3eaf2; }
.dashboard-page .admin-sidebar-mark { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #164aa5, #2469df); box-shadow: 0 8px 18px rgba(21,94,239,.23); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.dashboard-page .admin-sidebar-brand strong, .dashboard-page .admin-sidebar-brand small { display: block; }
.dashboard-page .admin-sidebar-brand strong { color: #152a47; font-size: 14px; }
.dashboard-page .admin-sidebar-brand small { margin-top: 3px; color: #75849a; font-size: 10px; }
.dashboard-page .admin-sidebar-nav { display: grid; gap: 6px; padding: 12px; }
.dashboard-page .admin-sidebar-nav a, .dashboard-page .admin-sidebar-nav button { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 9px; align-items: center; width: 100%; min-height: 47px; padding: 0 11px; border: 0; border-radius: 12px; color: #53657b; background: transparent; text-align: left; text-decoration: none; cursor: pointer; transition: color .18s ease, background-color .18s ease, transform .18s ease; }
.dashboard-page .admin-sidebar-nav a:hover, .dashboard-page .admin-sidebar-nav button:hover { color: #174f9f; background: #eaf2fd; transform: translateX(2px); }
.dashboard-page .admin-sidebar-nav a:first-child { color: #155eef; background: #e7f0ff; box-shadow: inset 0 0 0 1px #d4e4fb; }
.dashboard-page .admin-sidebar-nav a span, .dashboard-page .admin-sidebar-nav button span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: #315b91; background: #edf3fa; font-size: 9px; font-weight: 900; }
.dashboard-page .admin-sidebar-nav b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-page .admin-sidebar-nav i { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; background: #d43b47; font-size: 9px; font-style: normal; font-weight: 900; }
.dashboard-page .admin-sidebar-user { margin-top: auto; padding: 15px 16px; border-top: 1px solid #e3eaf2; background: rgba(255,255,255,.72); }
.dashboard-page .admin-sidebar-user strong, .dashboard-page .admin-sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-page .admin-sidebar-user strong { color: #203753; font-size: 12px; }
.dashboard-page .admin-sidebar-user span { margin-top: 3px; color: #8491a2; font-size: 10px; }
.dashboard-page .hero { position: relative; z-index: 35; overflow: visible; scroll-margin-top: 18px; }
.dashboard-page .hero-main { min-height: 126px; padding: 20px 23px !important; }
.dashboard-page .hero-main::after { width: 240px; height: 240px; right: -96px; top: -125px; border-width: 44px; }
.dashboard-page .hero-main .mtx-title--admin { margin-bottom: 7px; }
.dashboard-page .hero-main .mtx-heading { font-size: clamp(27px, 2.7vw, 39px) !important; }
.dashboard-page .hero-main p { max-width: 820px; margin: 8px 0 0; font-size: 12px !important; line-height: 1.55; }
.dashboard-page .hero-side { position: relative; overflow: visible; padding: 18px !important; }
.dashboard-page .hero-side .dropdown.open { z-index: 3; }
.dashboard-page .hero-side .dropdown-menu { z-index: 80; }
.dashboard-page .hero-side .subtle { margin: 9px 0 11px; font-size: 11px; line-height: 1.45; }
.dashboard-page .hero-side .toolbar-row { gap: 6px; }
.dashboard-page .hero-side .tbtn { min-height: 34px; padding: 7px 10px; }
.dashboard-page .admin-command-bar { position: sticky; z-index: 34; top: 12px; border-color: #d7e2ee; border-radius: 15px; background: rgba(255,255,255,.91); box-shadow: 0 10px 28px rgba(27,50,80,.09); backdrop-filter: blur(16px); }
.dashboard-page .work-queue, .dashboard-page .stats, .dashboard-page .grid { scroll-margin-top: 92px; }
.dashboard-page .work-queue { margin-top: 2px; border-radius: 18px; }
.dashboard-page .work-queue-head strong { font-size: 18px; }
.dashboard-page .work-card { min-height: 72px; background: linear-gradient(145deg, #fbfdff, #f6f9fd); }
.dashboard-page .stats { grid-template-columns: repeat(12, minmax(0,1fr)) !important; gap: 10px !important; margin-bottom: 16px; }
.dashboard-page .stat { position: relative; grid-column: span 3; min-height: 94px; overflow: hidden; border-color: #dbe5ef; border-radius: 16px; background: linear-gradient(145deg, #fff, #f8fbff); box-shadow: 0 9px 24px rgba(27,50,80,.055); }
.dashboard-page .stat::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #2061c6, #79acff); opacity: .75; }
.dashboard-page .stat:nth-child(2)::before { background: linear-gradient(90deg, #128866, #55c59f); }
.dashboard-page .stat:nth-child(3)::before { background: linear-gradient(90deg, #6b55bd, #a98ae8); }
.dashboard-page .stat:nth-child(4)::before { background: linear-gradient(90deg, #d0831b, #f0ba63); }
.dashboard-page .stat.stat-secondary { grid-column: span 4; min-height: 72px; padding-block: 13px !important; }
.dashboard-page .stat.stat-secondary span { font-size: 11px; }
.dashboard-page .stat.stat-secondary strong { font-size: 24px !important; }
/* The list is its own horizontal scroller (overflow-x: auto), so a sticky header here would be pushed down over the first row by its `top` offset. Keep it in normal flow. */
.dashboard-page .equipment-table-head { position: static; background: #f6f9fd; box-shadow: 0 1px 0 #e4ebf2; }
.dashboard-page .panel { border-radius: 18px !important; box-shadow: 0 10px 28px rgba(27,50,80,.055); }
.dashboard-page .tab-select { position: sticky; z-index: 12; top: 76px; }

@media (min-width: 1121px) {
    .dashboard-page { display: grid; grid-template-columns: 190px minmax(0,1fr); column-gap: 18px; align-items: start; width: min(1580px, calc(100% - 32px)) !important; padding-top: 18px !important; }
    .dashboard-page > :not(.admin-sidebar) { grid-column: 2; }
    .dashboard-page .admin-sidebar { position: sticky; grid-column: 1; grid-row: 1 / span 40; top: 18px; min-height: calc(100vh - 36px); max-height: calc(100vh - 36px); }
    .dashboard-page .hero { grid-template-columns: minmax(0,1fr) 300px; }
}

@media (max-width: 1120px) {
    .dashboard-page .admin-sidebar { position: sticky; z-index: 40; top: 0; margin-bottom: 12px; border-radius: 16px; }
    .dashboard-page .admin-sidebar-brand, .dashboard-page .admin-sidebar-user { display: none; }
    .dashboard-page .admin-sidebar-nav { display: flex; gap: 7px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
    .dashboard-page .admin-sidebar-nav::-webkit-scrollbar { display: none; }
    .dashboard-page .admin-sidebar-nav a, .dashboard-page .admin-sidebar-nav button { flex: 0 0 auto; grid-template-columns: 25px auto auto; width: auto; min-height: 42px; padding: 0 10px; }
    .dashboard-page .admin-sidebar-nav a span, .dashboard-page .admin-sidebar-nav button span { width: 24px; height: 24px; }
    .dashboard-page .admin-sidebar-nav b { font-size: 11px; }
    .dashboard-page .admin-command-bar { top: 61px; }
    .dashboard-page .hero { scroll-margin-top: 72px; }
    .dashboard-page .stats { grid-template-columns: repeat(6, minmax(0,1fr)) !important; }
    .dashboard-page .stat { grid-column: span 3; }
    .dashboard-page .stat.stat-secondary { grid-column: span 2; }
}

@media (min-width: 721px) and (max-width: 900px) {
    .dashboard-page .notification-dropdown .notification-menu { right: auto; left: 0; }
}

@media (max-width: 720px) {
    .dashboard-page .notification-menu { position: fixed !important; top: 70px !important; right: 14px !important; left: 14px !important; width: auto !important; }
    .dashboard-page .security-alert { align-items: flex-start; flex-direction: column; }
    .dashboard-page .condition-form { grid-template-columns: 1fr; }
    .dashboard-page .cart-tray { right: 12px; bottom: 12px; left: 12px; min-width: 0; }
    .dashboard-page dialog.cart-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
    .dashboard-page .cart-fields { grid-template-columns: 1fr !important; }
    .dashboard-page .admin-sidebar { margin-bottom: 9px; }
    .dashboard-page .admin-sidebar-nav a, .dashboard-page .admin-sidebar-nav button { grid-template-columns: 22px auto auto; min-height: 40px; padding: 0 9px; }
    .dashboard-page .admin-sidebar-nav a span, .dashboard-page .admin-sidebar-nav button span { width: 22px; height: 22px; font-size: 8px; }
    .dashboard-page .hero { gap: 9px !important; }
    .dashboard-page .hero-main { padding: 17px !important; }
    .dashboard-page .hero-main .mtx-heading { font-size: 25px !important; }
    .dashboard-page .hero-main p { display: none; }
    .dashboard-page .hero-side { padding: 15px !important; }
    .dashboard-page .hero-side .subtle { display: none; }
    .dashboard-page .hero-side .toolbar-row { margin-top: 10px; }
    .dashboard-page .hero-side .tbtn { flex: 1 1 auto; min-width: 0; }
    .dashboard-page .admin-command-bar { top: 57px; gap: 6px; overflow: hidden; padding: 8px; }
    .dashboard-page .admin-command-bar form { flex: 1 1 auto; min-width: 0 !important; }
    .dashboard-page .admin-command-bar form input { min-width: 0; }
    .dashboard-page .admin-command-bar > button[data-open-panel] { display: none; }
    .dashboard-page .admin-command-bar > button[data-qr-scan] { flex: 0 0 auto; }
    .dashboard-page .work-queue { margin-bottom: 10px; }
    .dashboard-page .work-queue-head span { display: none; }
    .dashboard-page .work-queue-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
    .dashboard-page .work-card { grid-template-columns: 32px minmax(0,1fr); min-height: 66px; padding: 10px; }
    .dashboard-page .work-card i { display: none; }
    .dashboard-page .stats { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 8px !important; }
    .dashboard-page .stat, .dashboard-page .stat.stat-secondary { grid-column: auto; min-height: 82px; padding: 14px !important; }
    .dashboard-page .stat strong, .dashboard-page .stat.stat-secondary strong { font-size: 25px !important; }
}

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