:root {
    --bg: #020813;
    --text: #e6f6ff;
    --muted: #88a9bd;
    --cyan: #00b7ff;
    --cyan2: #38e8ff;
    --line: rgba(0, 183, 255, 0.45);
    --danger: #ff3b5c;
    --warning: #ffb020;
    --good: #22c55e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Rajdhani", Arial, Helvetica, sans-serif;
    font-size: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 140, 255, 0.24), transparent 34rem),
        radial-gradient(circle at 10% 70%, rgba(0, 183, 255, 0.11), transparent 26rem),
        linear-gradient(180deg, #02050c 0%, var(--bg) 45%, #01040a 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(0,183,255,0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,183,255,0.18) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.23;
    background:
        linear-gradient(90deg, transparent 0 8%, rgba(0,183,255,0.12) 8.2%, transparent 8.6%),
        linear-gradient(0deg, transparent 0 18%, rgba(0,183,255,0.08) 18.2%, transparent 18.6%);
}

/* Header / Logo */
.site-hero {
    position: relative;
    min-height: 150px;
    padding: 22px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(0, 183, 255, 0.16), transparent 42rem),
        linear-gradient(180deg, #01050d, #071426 80%, #020813);
    border-bottom: 1px solid rgba(0,183,255,0.45);
    box-shadow: 0 0 40px rgba(0, 119, 255, 0.24);
    overflow: hidden;
}

.site-hero::before {
    content: "";
    position: absolute;
    inset: 18px 8%;
    border: 1px solid rgba(0, 183, 255, 0.28);
    clip-path: polygon(8% 0, 92% 0, 100% 32%, 100% 68%, 92% 100%, 8% 100%, 0 68%, 0 32%);
    box-shadow: inset 0 0 35px rgba(0, 183, 255, 0.18), 0 0 25px rgba(0, 183, 255, 0.15);
}

.tech-logo-image {
    position: relative;
    z-index: 2;
    text-align: center;
}

.tech-logo-image img {
    width: min(475px, 47vw);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter:
        drop-shadow(0 0 12px rgba(0,183,255,.45))
        drop-shadow(0 0 32px rgba(0,110,255,.35));
}

.item-photo-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.item-photo-controls [hidden],
.item-camera-dialog [hidden] {
    display: none !important;
}

.item-camera-dialog {
    width: min(720px, calc(100vw - 24px));
    border: 0;
    border-radius: 8px;
    padding: 0;
}

.item-camera-inner {
    padding: 18px;
}

.item-camera-inner h2 {
    margin: 0 0 14px;
}

.item-camera-view {
    display: block;
    width: 100%;
    max-height: min(65vh, 640px);
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #111;
}

.item-camera-message {
    min-height: 1.4em;
    margin: 10px 0 0;
    text-align: center;
}

.item-camera-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.item-crop-dialog {
    width: min(540px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    overflow: auto;
    color: var(--text);
    background: var(--panel);
}

.item-crop-dialog::backdrop {
    background: rgba(8, 20, 32, .72);
}

.item-crop-inner {
    padding: 18px;
}

.item-crop-inner h2 {
    margin: 0 0 14px;
}

.item-crop-shapes,
.item-crop-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-crop-shapes {
    margin-bottom: 12px;
}

.item-crop-shapes .selected {
    background: var(--cyan2);
    color: #fff;
    border-color: var(--cyan2);
}

.item-crop-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    overflow: hidden;
    background: #111820;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.item-crop-stage canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: grab;
    touch-action: none;
}

.item-crop-stage canvas:active {
    cursor: grabbing;
}

.item-crop-zoom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-weight: 700;
}

.item-crop-zoom input {
    width: 100%;
}

.item-crop-message {
    min-height: 1.35em;
    margin: 8px 0;
    text-align: center;
}

.item-crop-actions {
    justify-content: flex-end;
}

@media (max-width: 520px) {
    .item-crop-inner {
        padding: 12px;
    }

    .item-crop-stage {
        min-height: 210px;
    }

    .item-crop-actions .button {
        flex: 1 1 auto;
    }
}

.hero-circuit {
    position: absolute;
    top: 50px;
    width: 260px;
    height: 110px;
    opacity: .55;
    background:
        linear-gradient(90deg, transparent 0 18%, var(--cyan) 18% 20%, transparent 20% 100%),
        linear-gradient(45deg, transparent 0 42%, var(--cyan) 42% 44%, transparent 44% 100%),
        linear-gradient(-45deg, transparent 0 42%, var(--cyan) 42% 44%, transparent 44% 100%);
    filter: drop-shadow(0 0 8px var(--cyan));
}

.hero-circuit.left {
    left: 3%;
}

.hero-circuit.right {
    right: 3%;
    transform: scaleX(-1);
}

/* Navigation */
.topnav {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(3, 13, 25, .98), rgba(1, 7, 14, .98));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 0 22px rgba(0, 183, 255, 0.22);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-group {
    position: relative;
    min-width: 160px;
    border-left: 1px solid rgba(0, 183, 255, 0.16);
}

.nav-group:last-child {
    border-right: 1px solid rgba(0, 183, 255, 0.16);
}

.nav-title {
    width: 100%;
    padding: 18px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #dff7ff;
    font-family: "Orbitron", Arial, sans-serif;
    font-size: .92rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0,183,255,.5);
}

.nav-title:hover,
.nav-group:focus-within .nav-title,
.nav-group:hover .nav-title {
    background: linear-gradient(180deg, rgba(0,183,255,.14), rgba(0,110,255,.10));
    box-shadow: inset 0 -2px 0 var(--cyan), 0 0 20px rgba(0,183,255,.35);
}

.nav-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 245px;
    padding: 10px;
    background: rgba(2, 8, 19, .98);
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 0 24px rgba(0, 183, 255, .28), inset 0 0 18px rgba(0,183,255,.08);
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
    display: block;
}

.nav-menu a {
    display: block;
    color: #dff7ff;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.nav-menu a:hover {
    background: rgba(0,183,255,.12);
    border-color: rgba(0,183,255,.4);
    color: var(--cyan2);
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    width: min(1280px, 94vw);
    margin: 28px auto 60px;
}

.grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 24px;
}

.card {
    background:
        linear-gradient(180deg, rgba(8, 25, 45, .95), rgba(3, 12, 24, .95));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow:
        0 0 22px rgba(0, 183, 255, .16),
        0 18px 44px rgba(0,0,0,.4),
        inset 0 0 26px rgba(0,183,255,.05);
}

.card h2,
.card h3 {
    font-family: "Orbitron", Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f2fbff;
    text-shadow: 0 0 12px rgba(0,183,255,.45);
}

/* Keep consecutive top-level page cards visually separate. */
.app-main > .container > .card + .card {
    margin-top: 16px;
}

/* Forms */
input,
select,
textarea,
button {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 183, 255, .42);
    background: rgba(1, 6, 14, .96);
    color: var(--text);
    font-family: "Rajdhani", Arial, sans-serif;
    font-size: 1.05rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan2);
    box-shadow: 0 0 16px rgba(0,183,255,.45);
}

button,
.button {
    background: linear-gradient(180deg, #00b7ff, #0057d9);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(146, 226, 255, .78);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0,0,0,.45);
    box-shadow: 0 0 16px rgba(0, 183, 255, .32);
}

button:hover,
.button:hover {
    filter: brightness(1.16);
    box-shadow: 0 0 24px rgba(0, 183, 255, .55);
}

html .custom-icon-action,
html .button.custom-icon-action {
    color: #172638 !important;
    background: linear-gradient(180deg, #ffc45a, #f08a24) !important;
    border-color: #b55b0b !important;
    text-shadow: none !important;
    box-shadow: 0 0 18px rgba(240, 138, 36, .42) !important;
}

html .custom-icon-action:hover,
html .button.custom-icon-action:hover {
    filter: brightness(1.08);
    box-shadow: 0 0 26px rgba(240, 138, 36, .62) !important;
}

label {
    display: block;
    color: #a9cee1;
    margin-bottom: 6px;
    font-size: .98rem;
    letter-spacing: .03em;
}

.form-row {
    margin-bottom: 16px;
}
.quantity-several-choice,.item-several-choice{display:inline-flex;align-items:center;gap:7px;margin:7px 0 0;font-weight:700}.quantity-several-choice input,.item-several-choice input{width:18px;height:18px;margin:0;flex:0 0 18px}
.quantity-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.quantity-input-row>input{width:100%;min-width:0;margin:0}.quantity-input-row .quantity-several-choice,.quantity-input-row .item-several-choice{min-width:max-content;margin:0;white-space:nowrap}.quantity-input-row .quantity-several-choice input,.quantity-input-row .item-several-choice input{width:18px!important;min-width:18px!important}
.quantity-input-row>input.quantity-not-applicable:disabled{opacity:1;color:color-mix(in srgb,var(--muted) 70%,transparent)!important;-webkit-text-fill-color:color-mix(in srgb,var(--muted) 70%,transparent);background:color-mix(in srgb,var(--panel) 82%,var(--muted) 18%)!important;cursor:not-allowed}

.muted {
    color: var(--muted);
}

/* Results */
.result-item {
    background: rgba(3, 12, 24, .92);
    border: 1px solid rgba(0, 183, 255, .32);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 13px;
    box-shadow: inset 0 0 18px rgba(0,183,255,.04);
}

.result-item h3 {
    margin: 0 0 8px;
    color: #ffffff;
}

.location {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(0, 74, 145, .35);
    color: #bfefff;
    border: 1px solid rgba(0,183,255,.4);
    font-weight: 700;
    font-size: .95rem;
    box-shadow: 0 0 10px rgba(0,183,255,.18);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.tag {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 183, 255, .10);
    border: 1px solid rgba(0, 183, 255, .36);
    color: #c9f3ff;
    font-size: .84rem;
}

.suggestions {
    background: rgba(2, 8, 19, .98);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    margin-top: 4px;
    box-shadow: 0 0 18px rgba(0,183,255,.24);
}

.suggestion {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,183,255,.14);
    cursor: pointer;
}

.suggestion:hover {
    background: rgba(0,183,255,.12);
}

.part-type-heading {
    margin-top: 24px;
    padding: 11px 13px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(0, 110, 255, .28), rgba(0, 183, 255, .10));
    color: #dff7ff;
    border: 1px solid rgba(0,183,255,.38);
}

/* Cabinet / Drawer Grid */
.cabinet {
    background:
        linear-gradient(180deg, rgba(7, 20, 38, .98), rgba(1, 7, 14, .98));
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    box-shadow: inset 0 0 28px rgba(0,183,255,.08), 0 0 22px rgba(0,183,255,.12);
}

.drawer-grid {
    display: grid;
    gap: 10px;
}

.drawer {
    min-height: 76px;
    background: linear-gradient(180deg, rgba(0, 183, 255, .16), rgba(0, 62, 123, .12));
    border: 1px solid rgba(0, 183, 255, .45);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    color: #e6f6ff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 18px rgba(0,183,255,.05);
}

.drawer:hover {
    border-color: var(--cyan2);
    box-shadow: 0 0 20px rgba(0,183,255,.38), inset 0 0 18px rgba(0,183,255,.12);
    transform: translateY(-1px);
}

.drawer.has::after,
.drawer.empty::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.drawer.has::after {
    background: var(--good);
    box-shadow: 0 0 10px var(--good);
}

.drawer.empty::after {
    background: #46566b;
}

.drawer strong {
    font-family: "Orbitron", Arial, sans-serif;
    font-size: 1rem;
}

.drawer span {
    color: #c9f3ff;
    font-size: .82rem;
    margin-top: 4px;
}

.drawer.highlight {
    outline: 3px solid var(--cyan2);
    background: linear-gradient(180deg, rgba(0, 183, 255, .35), rgba(0, 62, 123, .30));
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(240, 248, 255, .08);
    border-radius: 12px;
    overflow: hidden;
}

tbody tr {
    background: rgba(255, 255, 255, .025);
}

tbody tr:nth-child(even) {
    background: rgba(0, 183, 255, .035);
}

tbody tr:hover {
    background: rgba(0, 183, 255, .07);
}

td,
th {
    padding: 11px;
    border-bottom: 1px solid rgba(0,183,255,.18);
    text-align: left;
}

th {
    color: #bfefff;
    font-family: "Orbitron", Arial, sans-serif;
    font-size: .88rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: rgba(0,183,255,.10);
}

/* Warnings and Actions */
.danger {
    background: linear-gradient(180deg, #ff3b5c, #9e1128) !important;
    color: #fff !important;
    border-color: rgba(255, 160, 175, .8) !important;
    box-shadow: 0 0 16px rgba(255, 59, 92, .32) !important;
}

.warning {
    background: linear-gradient(180deg, #ffb020, #b86b00) !important;
    color: #111827 !important;
    border-color: rgba(255, 221, 140, .8) !important;
}

.action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 13px;
}

.inline-form {
    display: inline;
}

.inline-form button {
    width: auto;
}

.notice {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 74, 145, .35);
    border: 1px solid rgba(0,183,255,.65);
    color: #dff7ff;
    margin-bottom: 14px;
}

.error {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(95, 10, 24, .45);
    border: 1px solid rgba(255, 59, 92, .72);
    color: #ffd6dd;
    margin-bottom: 14px;
}

/* Remove Parts */
.remove-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.warning-list {
    margin: 12px 0;
    padding-left: 22px;
}

/* Visual Cabinet Browser */
.visual-browser {
    max-width: 1180px;
    margin: 0 auto;
}

.cabinet-browser-header {
    display: grid;
    grid-template-columns: 90px 1fr 90px;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.cabinet-browser-title {
    text-align: center;
}

.cabinet-browser-title h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin: 0 0 4px;
}

.cabinet-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    border: 1px solid rgba(0,183,255,.65);
    border-radius: 18px;
    text-decoration: none;
    color: #dff7ff;
    font-size: 3rem;
    background: linear-gradient(180deg, rgba(0,183,255,.18), rgba(0,82,160,.14));
    box-shadow: 0 0 20px rgba(0,183,255,.22), inset 0 0 20px rgba(0,183,255,.08);
}

.cabinet-arrow:hover {
    color: white;
    border-color: var(--cyan2);
    box-shadow: 0 0 28px rgba(0,183,255,.48), inset 0 0 24px rgba(0,183,255,.16);
}

.cabinet-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.stat-pill {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,183,255,.42);
    background: rgba(0, 74, 145, .24);
    color: #c9f3ff;
    font-weight: 700;
}

.center-text {
    text-align: center;
}

.visual-cabinet {
    margin-bottom: 28px;
}

.visual-drawer {
    min-height: 92px;
}

.visual-drawer.empty {
    opacity: .58;
    background: linear-gradient(180deg, rgba(70, 86, 107, .18), rgba(30, 41, 59, .12));
    border-color: rgba(136, 169, 189, .25);
}

.visual-drawer.empty:hover {
    opacity: 1;
}

.section-title {
    margin-top: 24px;
    text-align: center;
}

/* Mobile */
@media (max-width: 900px) {
    .grid,
    .remove-grid {
        grid-template-columns: 1fr;
    }

    .topnav {
        position: static;
        flex-direction: column;
        padding: 10px;
    }

    .nav-group {
        width: 100%;
        border: 1px solid rgba(0,183,255,.16);
        margin-bottom: 6px;
    }

    .nav-menu {
        position: static;
        width: 100%;
    }

    .site-hero {
        min-height: 130px;
    }

    .hero-circuit {
        display: none;
    }

    .tech-logo-image img {
        width: min(390px, 80vw);
    }
}

@media (max-width: 700px) {
    .cabinet-browser-header {
        grid-template-columns: 60px 1fr 60px;
        gap: 10px;
    }

    .cabinet-arrow {
        min-height: 80px;
        font-size: 2rem;
    }

    .visual-drawer {
        min-height: 78px;
    }
}


/* V14 Simplified Cabinet View */
.cabinet-simple-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.cabinet-simple-header h2 {
    margin: 0;
}

.cabinet-simple-header .button {
    width: auto;
    white-space: nowrap;
}

.grouped-cabinet {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grouped-section {
    margin: 0;
    padding: 0;
}

.grouped-section + .grouped-section {
    margin-top: 2px;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 700px) {
    .cabinet-simple-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cabinet-simple-header .button {
        width: 100%;
    }
}


/* V15 no-quantity UI refinements */
.delete-cabinet-btn {
    display: inline-block;
    width: auto !important;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
}

.grouped-section + .grouped-section {
    margin-top: 12px;
}


/* V17 direct Search nav link */
.nav-direct {
    display: block;
    text-decoration: none;
    text-align: center;
}

.nav-direct:hover {
    color: #dff7ff;
}


/* V20 drag/drop part ordering */
.draggable-part {
    cursor: grab;
}

.draggable-part.dragging {
    opacity: 0.55;
    border-color: var(--cyan2);
    box-shadow: 0 0 28px rgba(0,183,255,.45);
}

.drag-handle {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 10px;
    border: 1px solid rgba(0,183,255,.36);
    border-radius: 999px;
    color: #c9f3ff;
    background: rgba(0,183,255,.10);
    font-size: .88rem;
    font-weight: 700;
    user-select: none;
}


/* V21 drawer arrow navigation */
.drawer-nav-grid {
    display: grid;
    grid-template-columns: 58px 58px 58px;
    grid-template-rows: 58px 58px 58px;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 18px 0 10px;
}

.drawer-nav-btn,
.drawer-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-radius: 14px;
    border: 1px solid rgba(0,183,255,.55);
    background: linear-gradient(180deg, rgba(0,183,255,.18), rgba(0,82,160,.14));
    color: #dff7ff;
    text-decoration: none;
    font-size: 1.45rem;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(0,183,255,.18), inset 0 0 14px rgba(0,183,255,.08);
}

.drawer-nav-btn:hover {
    border-color: var(--cyan2);
    color: white;
    box-shadow: 0 0 24px rgba(0,183,255,.45), inset 0 0 18px rgba(0,183,255,.16);
}

.drawer-nav-btn.disabled {
    opacity: .28;
    cursor: not-allowed;
    background: rgba(70, 86, 107, .16);
    border-color: rgba(136, 169, 189, .22);
    box-shadow: none;
}

.drawer-nav-center {
    font-family: "Orbitron", Arial, sans-serif;
    font-size: 1.1rem;
    color: #c9f3ff;
    background: rgba(0,74,145,.24);
}


/* V24 compact inline drawer coordinates */
.drawer-coord-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

.drawer-coord-field {
    flex: 0 0 auto;
}

.drawer-coord-field input {
    width: 120px;
}

.drawer-coord-field:first-child input {
    width: 105px;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .drawer-coord-row {
        flex-wrap: wrap;
    }

    .drawer-coord-field input {
        width: 140px;
    }
}


/* V27 drag/drop drawer moving */
.draggable-drawer-slot {
    cursor: grab;
}

.draggable-drawer-slot.dragging-drawer {
    opacity: 0.55;
    border-color: var(--cyan2);
    box-shadow: 0 0 28px rgba(0,183,255,.48), inset 0 0 18px rgba(0,183,255,.16);
}

.drawer-drop-target.drop-hover {
    opacity: 1;
    border-color: var(--cyan2);
    background: linear-gradient(180deg, rgba(0, 183, 255, .28), rgba(0, 62, 123, .24));
    box-shadow: 0 0 24px rgba(0,183,255,.42), inset 0 0 18px rgba(0,183,255,.14);
}


/* V31 drawer navigator center label */
.drawer-nav-center {
    line-height: 1.25;
    text-align: center;
    padding: 6px;
}


/* ========================================================================== */
/* PartPing V34 modern application shell                                      */
/* ========================================================================== */
:root {
    --sidebar-width: 272px;
    --topbar-height: 64px;
}

.app-shell { min-height: 100vh; }
.app-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 100;
    width: var(--sidebar-width); display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(3,12,23,.99), rgba(1,6,13,.99));
    border-right: 1px solid rgba(0,183,255,.25);
    box-shadow: 12px 0 38px rgba(0,0,0,.28), 1px 0 18px rgba(0,183,255,.08);
    transition: width .2s ease, transform .2s ease;
}
.sidebar-brand {
    min-height: 92px; display: flex; align-items: center; gap: 8px;
    padding: 14px 12px 12px 18px; border-bottom: 1px solid rgba(0,183,255,.16);
}
.sidebar-logo { min-width: 0; flex: 1; overflow: hidden; }
.sidebar-logo img { display: block; width: 190px; max-width: none; height: auto; filter: drop-shadow(0 0 10px rgba(0,183,255,.24)); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px 20px; scrollbar-width: thin; }
.sidebar-nav-divider {
    margin: 18px 12px 6px; padding-top: 12px; border-top: 1px solid rgba(142,172,189,.16);
    color: #66899e; font: 700 .68rem "Rajdhani", Arial, sans-serif; letter-spacing: .11em; text-transform: uppercase;
}
.sidebar-section-secondary:not(.open) .sidebar-section-toggle { min-height: 42px; color: #92aab8; font-size: .92rem; }
.sidebar-section-secondary:not(.open) .sidebar-icon { color: #6f91a4; }
.sidebar-section-secondary .sidebar-section-toggle:hover,
.sidebar-section-secondary.open .sidebar-section-toggle { color: #fff; }
.sidebar-direct, .sidebar-section-toggle {
    width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px;
    border: 0; border-radius: 10px; padding: 10px 12px; background: transparent;
    color: #d8edf7; text-decoration: none; font: 600 .98rem "Rajdhani", Arial, sans-serif;
    letter-spacing: .025em; text-align: left; cursor: pointer;
}
.sidebar-section-toggle { justify-content: space-between; }
.sidebar-section-toggle > span:first-child { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sidebar-direct:hover, .sidebar-section-toggle:hover { background: rgba(0,183,255,.07); color: #fff; }
.sidebar-direct.active {
    color: #fff; background: linear-gradient(90deg, rgba(0,183,255,.20), rgba(0,183,255,.055));
    box-shadow: inset 3px 0 0 var(--cyan2);
}
.sidebar-icon { width: 24px; flex: 0 0 24px; text-align: center; color: var(--cyan2); font-size: 1.12rem; }
.sidebar-label { white-space: nowrap; }
.sidebar-chevron { color: #66899e; transition: transform .18s ease; }
.sidebar-section.open .sidebar-chevron { transform: rotate(180deg); }
.sidebar-subnav { display: none; padding: 2px 0 7px 47px; }
.sidebar-section.open .sidebar-subnav { display: block; }
.sidebar-subnav a {
    display: block; position: relative; padding: 8px 10px; margin: 1px 0; border-radius: 8px;
    color: #8eacbd; text-decoration: none; font-size: .91rem; line-height: 1.15;
}
.sidebar-subnav a:hover { color: #e9faff; background: rgba(0,183,255,.07); }
.sidebar-subnav a.active { color: var(--cyan2); background: rgba(0,183,255,.09); }
.sidebar-subnav a.active::before { content: ""; position: absolute; left: -11px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--cyan2); box-shadow: 0 0 8px var(--cyan); }

.app-main { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .2s ease; }
.app-topbar {
    height: var(--topbar-height); position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 14px; padding: 0 28px;
    background: rgba(2,8,19,.88); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,183,255,.18); box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.topbar-title { flex: 1; font-family: "Orbitron", Arial, sans-serif; font-size: .98rem; font-weight: 700; letter-spacing: .075em; color: #eaf9ff; }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar-search, .topbar-scan, .topbar-quick-add-toggle, .topbar-pick-list, .topbar-qr-queue, .mobile-menu-button, .topbar-notification-toggle {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0,183,255,.20); border-radius: 10px; background: rgba(0,183,255,.055);
    color: #bdefff; text-decoration: none; font-size: 1.2rem; cursor: pointer;
}
.topbar-search:hover, .topbar-scan:hover, .topbar-scan.active, .topbar-quick-add-toggle:hover,
.topbar-quick-add-toggle[aria-expanded="true"], .topbar-pick-list:hover, .topbar-pick-list.active,
.topbar-qr-queue:hover, .topbar-qr-queue.active,
.mobile-menu-button:hover, .topbar-notification-toggle:hover, .topbar-notification-toggle[aria-expanded="true"] {
    border-color: rgba(0,183,255,.48); background: rgba(0,183,255,.12); color: #fff;
}
.topbar-search svg, .topbar-scan svg, .topbar-quick-add-toggle svg, .topbar-pick-list > svg, .topbar-qr-queue > svg { width: 20px; height: 20px; }
.quick-add-center { position: relative; }
.topbar-quick-add-toggle { padding: 0; }
.quick-add-menu {
    position: absolute; z-index: 140; top: calc(100% + 10px); right: 0; width: 225px;
    padding: 6px; color: var(--text); background: var(--panel, #071426);
    border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 45px rgba(0,0,0,.34);
}
.quick-add-menu[hidden] { display: none; }
.quick-add-menu-heading { padding: 7px 9px 9px; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.quick-add-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 9px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 700; }
.quick-add-menu a:hover, .quick-add-menu a:focus-visible { color: var(--text); background: color-mix(in srgb, var(--cyan) 11%, transparent); outline: none; }
.quick-add-menu a svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--cyan2); }
.topbar-pick-list { position: relative; }
.topbar-qr-queue { position: relative; }
.topbar-pick-list-count {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
    display: grid; place-items: center; box-sizing: border-box; border: 2px solid var(--panel, #fff);
    border-radius: 999px; color: #fff; background: #1677d2; font-size: .62rem; font-weight: 800; line-height: 1;
}
.topbar-qr-queue-count {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
    display: grid; place-items: center; box-sizing: border-box; border: 2px solid var(--panel, #fff);
    border-radius: 999px; background: #e13e52; color: #fff; font-size: .64rem; font-weight: 900; line-height: 1;
}
.topbar-state-indicator {
    min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px;
    border: 1px solid currentColor; border-radius: 8px; text-decoration: none;
    font-size: .78rem; font-weight: 800; line-height: 1; white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.topbar-state-indicator svg { width: 17px; height: 17px; flex: 0 0 17px; }
.topbar-state-count {
    min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 5px;
    border-radius: 999px; color: #fff; background: currentColor; font-size: .7rem;
}
.topbar-clipboard-state { color: #9a6500; background: color-mix(in srgb, var(--warning) 13%, var(--panel, #071426)); }
.topbar-clipboard-state .topbar-state-count { background: #9a6500; }
.topbar-clipboard-state.is-unavailable { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--panel, #071426)); }
.topbar-clipboard-state.is-unavailable .topbar-state-count { background: var(--danger); }
.topbar-borrowed-state { color: #a21caf; background: color-mix(in srgb, #d946ef 11%, var(--panel, #071426)); }
.topbar-borrowed-state .topbar-state-count { background: #a21caf; }
.topbar-state-indicator:hover { filter: brightness(1.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.12); }
.notification-center { position: relative; }
.topbar-notification-toggle { position: relative; padding: 0; }
.topbar-notification-toggle svg { width: 21px; height: 21px; }
.notification-unread-dot {
    position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%;
    background: #e1263d; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(158,17,40,.32);
}
.notification-panel {
    position: absolute; z-index: 140; top: calc(100% + 10px); right: 0;
    width: min(430px, calc(100vw - 28px)); max-height: min(660px, calc(100vh - 92px)); overflow-y: auto;
    padding: 0; color: var(--text); background: var(--panel, #071426);
    border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 18px 45px rgba(0,0,0,.34);
}
.notification-panel[hidden] { display: none; }
.notification-panel-heading {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 13px 15px; background: var(--panel, #071426); border-bottom: 1px solid var(--line);
}
.notification-panel-heading strong { font-size: 1rem; }
.notification-panel-heading span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.notification-empty { margin: 0; padding: 22px 16px; color: var(--muted); text-align: center; }
.notification-item { padding: 14px 15px; border-left: 5px solid var(--warning); border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.notification-borrowed { border-left-color: #d946ef; }
.notification-item.notification-system-warning { border-left-color: #d99000; }
.notification-item.notification-system-alert { border-left-color: var(--danger); }
.notification-item.is-acknowledged { opacity: .76; }
.notification-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notification-item-heading > strong { color: var(--text); font-size: .95rem; }
.notification-item p { margin: 7px 0 11px; font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; }
.notification-review-actions, .notification-workflow-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.notification-review-actions { flex: 0 0 auto; }
.notification-review-actions form, .notification-workflow-actions form { margin: 0; }
.notification-icon-button {
    width: 28px !important; height: 28px !important; min-width: 28px !important; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--line) 68%, transparent); color: var(--muted);
    background: color-mix(in srgb, var(--panel, #071426) 86%, white 14%); cursor: pointer;
}
.notification-icon-button:hover { color: var(--text); border-color: var(--cyan); }
.notification-icon-button svg { width: 15px; height: 15px; }
.notification-workflow-actions .button { padding: 5px 8px !important; font-size: .8rem !important; }
.mobile-menu-button { display: none; }
.app-main > .container { width: min(1500px, calc(100% - 48px)); margin: 26px auto 60px; }
.sidebar-scrim { display: none; }

/* Retire the former full-width hero/drop-down navigation without affecting old page CSS. */
.site-hero, .topnav { display: none !important; }

@media (max-width: 900px) {
    .app-sidebar { transform: translateX(-100%); width: min(290px, 86vw); }
    .app-main { margin-left: 0; }
    .sidebar-mobile-open .app-sidebar { transform: translateX(0); }
    .sidebar-mobile-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.62); backdrop-filter: blur(2px); }
    .mobile-menu-button { display: inline-flex; }
    .app-topbar { padding: 0 16px; }
    .topbar-state-indicator { width: 44px; padding: 0; justify-content: center; position: relative; }
    .topbar-state-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .topbar-state-count { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid var(--panel, #fff); font-size: .62rem; }
    .notification-panel { position: fixed; top: calc(var(--topbar-height) + 8px); right: 8px; width: calc(100vw - 16px); max-height: calc(100vh - var(--topbar-height) - 16px); }
    .app-main > .container { width: min(100% - 24px, 1500px); margin-top: 18px; }
}

@media (max-width: 560px) {
    .app-topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
    .topbar-tools { gap: 5px; }
    .topbar-search, .topbar-scan, .topbar-quick-add-toggle, .topbar-pick-list, .topbar-qr-queue, .mobile-menu-button, .topbar-notification-toggle, .topbar-state-indicator { width: 44px; height: 44px; }
    .quick-add-menu { position: fixed; top: calc(var(--topbar-height) + 8px); right: 8px; width: min(260px, calc(100vw - 16px)); }
}

@media (max-width: 380px) {
    .app-topbar { gap: 6px; padding-left: 6px; padding-right: 6px; }
    .topbar-tools { gap: 3px; }
}

/* Shared responsive guardrails for forms, cards, dialogs, and data tables. */
.card,
.grid > *,
dialog,
[class$="-table-wrap"] {
    min-width: 0;
    max-width: 100%;
}

[class$="-table-wrap"] {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
    h1, h2, h3, p, td, th { overflow-wrap: anywhere; }

    button,
    .button,
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select {
        min-height: 44px;
    }

    dialog { max-width: calc(100vw - 20px); }

    .mobile-data-table,
    .mobile-data-table tbody,
    .mobile-data-table tr,
    .mobile-data-table td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .mobile-data-table {
        overflow: visible;
        background: transparent;
        border-radius: 0;
    }

    .mobile-data-table thead { display: none; }
    .mobile-data-table tbody { display: grid; gap: 12px; }

    .mobile-data-table tbody tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--panel, rgba(255, 255, 255, .96));
        box-shadow: 0 7px 18px rgba(15, 23, 42, .08);
    }

    .mobile-data-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, .8fr) minmax(0, 1.35fr);
        align-items: start;
        gap: 12px;
        padding: 11px 12px;
        white-space: normal !important;
        border-bottom: 1px solid var(--line);
    }

    .mobile-data-table tbody td:last-child { border-bottom: 0; }

    .mobile-data-table tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .75rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .mobile-data-table tbody td[colspan] { display: block; }
    .mobile-data-table tbody td[colspan]::before { content: none; }
    .mobile-data-table .action-row,
    .mobile-data-table .item-type-actions { margin-top: 0; }
}

/* ========================================================================== */
/* PartPing V36 My Storage visual browser                                     */
/* ========================================================================== */
.my-storage-browser { max-width: 1180px; margin: 0 auto; }
.storage-browser-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
.storage-breadcrumbs { display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--muted); font-size:.94rem; }
.storage-breadcrumbs a { color:var(--muted); text-decoration:none; }
.storage-breadcrumbs a:hover { color:var(--cyan2); }
.storage-crumb-sep { color:rgba(136,169,189,.55); }
.storage-back-link { color:#c9f3ff; text-decoration:none; border:1px solid rgba(0,183,255,.22); border-radius:9px; padding:7px 11px; background:rgba(0,183,255,.04); }
.storage-back-link:hover { border-color:rgba(0,183,255,.5); color:#fff; }
.storage-browser-heading { margin-bottom:20px; }
.storage-browser-heading h1 { margin:2px 0 4px; font:700 clamp(1.55rem,3vw,2.3rem) "Orbitron",Arial,sans-serif; letter-spacing:.055em; }
.storage-browser-heading p { margin:0; color:var(--muted); }
.storage-eyebrow,.storage-type-label { color:var(--cyan2); text-transform:uppercase; letter-spacing:.12em; font-size:.74rem; font-weight:700; }
.storage-object-list { display:flex; flex-direction:column; gap:14px; }
.storage-location-card,.storage-cabinet-card { display:flex; align-items:center; width:100%; color:var(--text); text-decoration:none; border:1px solid rgba(0,183,255,.25); border-radius:16px; background:linear-gradient(180deg,rgba(8,25,45,.76),rgba(3,12,24,.78)); box-shadow:0 12px 28px rgba(0,0,0,.18),inset 0 0 22px rgba(0,183,255,.035); transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.storage-location-card { min-height:92px; padding:16px 20px; gap:16px; }
.storage-location-card:hover,.storage-cabinet-card:hover { transform:translateY(-1px); border-color:rgba(0,183,255,.58); box-shadow:0 14px 32px rgba(0,0,0,.24),0 0 18px rgba(0,183,255,.10); }
.storage-location-icon { width:48px; height:48px; flex:0 0 48px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(0,183,255,.26); border-radius:12px; color:var(--cyan2); background:rgba(0,183,255,.055); font-size:1.35rem; }
.storage-location-copy { display:flex; flex:1; min-width:0; flex-direction:column; }
.storage-location-copy strong,.storage-object-label strong { color:#f3fbff; font:700 1.18rem "Orbitron",Arial,sans-serif; letter-spacing:.04em; }
.storage-location-copy small { margin-top:4px; color:var(--muted); }
.storage-location-arrow { color:var(--cyan2); font-size:2rem; padding:0 6px; }
.storage-cabinet-card { flex-direction:column; align-items:stretch; padding:18px; }
.storage-object-label { display:flex; flex-direction:column; gap:3px; margin-bottom:12px; }
.storage-cabinet-shell { padding:12px; border:1px solid rgba(0,183,255,.28); border-radius:12px; background:linear-gradient(180deg,rgba(1,7,14,.88),rgba(5,17,31,.92)); box-shadow:inset 0 0 20px rgba(0,183,255,.045); }
.storage-mini-drawers { display:grid; grid-template-columns:repeat(auto-fit,minmax(34px,1fr)); gap:5px; }
.storage-mini-drawer { position:relative; min-height:28px; border:1px solid rgba(136,169,189,.24); border-radius:5px; background:rgba(70,86,107,.10); }
.storage-mini-drawer.occupied { border-color:rgba(34,197,94,.30); }
.storage-mini-drawer i { position:absolute; right:5px; top:5px; width:7px; height:7px; border-radius:50%; background:var(--good); box-shadow:0 0 8px rgba(34,197,94,.85); }
.storage-object-hint { align-self:flex-end; margin-top:9px; color:var(--muted); font-size:.88rem; }
.storage-empty-state { padding:46px 24px; text-align:center; border:1px dashed rgba(0,183,255,.25); border-radius:16px; background:rgba(3,12,24,.46); }
.storage-empty-state h2 { margin:7px 0; }
.storage-empty-state p { margin:0; color:var(--muted); }
.storage-empty-icon { color:var(--cyan2); font-size:2rem; }
@media (min-width:900px) { .storage-cabinet-card { padding:20px 22px; } .storage-mini-drawers { grid-template-columns:repeat(12,minmax(24px,1fr)); } }
@media (max-width:600px) { .storage-browser-toolbar { align-items:flex-start; flex-direction:column; } .storage-location-card { min-height:82px; padding:13px 14px; } .storage-location-icon { width:42px;height:42px;flex-basis:42px; } .storage-mini-drawers { grid-template-columns:repeat(8,1fr); } }


/* Inline rename controls: keep primary actions aligned while editor opens below. */
.rename-action-row { align-items: flex-start; }
.rename-details { width: auto; min-width: 0; }
.rename-details > summary { list-style: none; }
.rename-details > summary::-webkit-details-marker { display: none; }
.rename-details[open] > summary,
.rename-action-row:has(.rename-details[open]) > .rename-delete-form,
.rename-action-row.is-renaming > .rename-details > summary,
.rename-action-row.is-renaming > .rename-delete-form { display: none !important; }
.rename-form {
    margin-top: 8px;
    display: grid !important;
    grid-template-columns: minmax(180px, 260px) auto;
    gap: 8px;
    align-items: center;
}
.rename-form input { min-width: 180px; }
.rename-form-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
.rename-form-actions button { width: auto !important; }

@media (max-width: 700px) {
    .mobile-data-table .rename-action-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        width: 100%;
    }

    .mobile-data-table .rename-action-row > *,
    .mobile-data-table .rename-action-row .button,
    .mobile-data-table .rename-action-row button {
        width: 100% !important;
    }

    .mobile-data-table .rename-details[open] {
        grid-column: 1 / -1;
    }

    .mobile-data-table .rename-form {
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
    }

    .mobile-data-table .rename-form input {
        min-width: 0;
    }
}

.sortable-column { cursor: pointer; user-select: none; }
.sortable-column::after { content: ' ↕'; opacity: .45; font-size: .82em; }
.sortable-column.sort-asc::after { content: ' ▲'; opacity: 1; }
.sortable-column.sort-desc::after { content: ' ▼'; opacity: 1; }
.trial-reminder-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 20, 28, .62);
}

.trial-reminder-popover {
    width: min(460px, 100%);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: var(--panel, #17222d);
    color: var(--text, #f5f7f9);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
}

.trial-reminder-popover h2 { margin: 0 0 10px; font-size: 1.35rem; }
.trial-reminder-popover p { margin: 0; line-height: 1.55; }
.trial-reminder-actions { display: flex; gap: 10px; margin-top: 20px; }

.inventory-read-only-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(218, 164, 55, .45);
    background: rgba(218, 164, 55, .14);
    color: var(--text);
}

.inventory-read-only-notice a { color: inherit; font-weight: 800; }
.inventory-read-only form[method="post"] :disabled { cursor: not-allowed; opacity: .55; }

/* Item documents */
.item-attachments { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.item-attachments-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px; }
.item-attachments-heading h3 { margin:0; font-size:1rem; }
.item-attachment-count { color:var(--muted); font-size:.82rem; font-weight:700; white-space:nowrap; }
.item-attachment-list { display:grid; gap:12px; }
.item-attachment-empty { margin:4px 0 10px; }
.item-attachment-row { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:12px; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--panel-alt); }
.item-attachment-info { display:grid; min-width:0; gap:5px; }
.item-attachment-info strong,.item-attachment-info small { display:block; min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.item-attachment-info strong { line-height:1.25; }
.item-attachment-info small { color:var(--muted); line-height:1.35; }
.item-attachment-description,.item-attachment-filename { display:block; min-width:0; overflow-wrap:anywhere; word-break:break-word; line-height:1.35; }
.item-attachment-description { color:var(--text); }
.item-attachment-filename { color:var(--muted); }
.item-attachment-actions { display:flex; min-width:0; flex-wrap:wrap; justify-content:flex-start; gap:7px; }
.item-attachment-actions .button { min-height:34px; padding:6px 9px !important; font-size:.8rem !important; }
.item-attachment-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; align-items:end; margin-top:12px; }
.item-attachment-controls[hidden] { display:none !important; }
.item-attachment-controls label { margin:0; }
.item-attachment-controls [data-attachment-add] { justify-self:start; }
.item-attachment-status { min-height:0; margin:10px 0 0; color:var(--success,#18794e); font-size:.84rem; font-weight:700; }
.item-attachment-status:empty { display:none; }
.item-attachment-status.is-error { color:var(--danger,#dc3545); }
.item-attachments + .storage-edit-actions,.item-attachments + .item-details-actions { margin-top:18px; }
.item-attachment-viewer { width:min(1050px,calc(100vw - 28px)); height:min(820px,calc(100vh - 28px)); padding:0; overflow:hidden; }
.item-attachment-viewer-inner { display:grid; grid-template-rows:auto minmax(0,1fr); height:100%; }
.item-attachment-viewer-header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-bottom:1px solid var(--line); }
.item-attachment-viewer-title { min-width:0; }
.item-attachment-viewer-title h2 { margin:0 0 3px; font-size:1.1rem; overflow-wrap:anywhere; }
.item-attachment-viewer-title p { margin:0; overflow-wrap:anywhere; }
.item-attachment-viewer-actions { display:flex; gap:7px; flex:0 0 auto; }
.item-attachment-viewer-body { min-height:0; overflow:auto; padding:12px; background:color-mix(in srgb,var(--panel,#fff) 94%,black 6%); }
.item-attachment-viewer-body iframe { display:block; width:100%; height:100%; min-height:560px; border:0; background:#fff; }
.item-attachment-viewer-body img { display:block; max-width:100%; max-height:100%; margin:auto; object-fit:contain; }
.item-attachment-viewer-body pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font:14px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; }
.item-attachment-csv-wrap { overflow:auto; }
.item-attachment-csv-wrap table { width:max-content; min-width:100%; border-collapse:collapse; }
.item-attachment-csv-wrap th,.item-attachment-csv-wrap td { padding:7px 9px; border:1px solid var(--line); text-align:left; white-space:nowrap; }
.item-attachment-info-dialog { width:min(560px,calc(100vw - 28px)); padding:0; }
.item-attachment-info-form { display:grid; gap:14px; padding:20px; }
.item-attachment-info-form h2,.item-attachment-info-form p { margin:0; }
.item-attachment-info-form label { display:grid; gap:6px; margin:0; }
.item-attachment-info-actions { display:flex; justify-content:flex-end; gap:8px; }
@media(max-width:700px){
    .item-attachment-row { grid-template-columns:minmax(0,1fr); align-items:stretch; }
    .item-attachment-actions { display:grid; grid-template-columns:1fr 1fr; }
    .item-attachment-actions .button { width:100% !important; }
    .item-attachment-actions .danger:last-child:nth-child(odd) { grid-column:1 / -1; }
    .item-attachment-viewer { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
    .item-attachment-viewer-header { align-items:flex-start; flex-direction:column; }
    .item-attachment-viewer-actions { width:100%; }
    .item-attachment-viewer-actions .button { flex:1; }
    .item-attachment-viewer-body iframe { min-height:calc(100dvh - 145px); }
    .item-attachment-info-actions { display:grid; grid-template-columns:1fr 1fr; }
    .item-attachment-info-actions .button { width:100% !important; }
}
.storage-move-advisory-dialog{width:min(560px,calc(100vw - 32px));padding:24px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--text)}
.storage-move-advisory-dialog::backdrop{background:rgba(0,0,0,.55)}
.storage-move-advisory-dialog h2{margin:0 0 12px;font-size:1.25rem}
.storage-move-advisory-dialog p{overflow-wrap:anywhere}
.storage-move-advisory-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
