/* Lifecycle — calm product UI (Option A) */

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --accent: #16a34a;
    --accent-hover: #15803d;
    --success: #22c55e;
    --error: #dc2626;
    --page-bg: #dde3ea;
    --surface: #ffffff;
    --surface-muted: #f0f3f7;
    --border: #c5cdd8;
    --border-strong: #a8b3c2;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--page-bg);
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem;
    min-width: 0;
}

.container-wide {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem;
    min-width: 0;
}

/* ── Navigation (see static/css/nav.css) ── */

.calendar-info-banner {
    max-width: 960px;
    margin: 0.85rem auto 0;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (max-width: 768px) {
    .calendar-info-banner {
        margin-top: 0.65rem;
        padding: 0 0.75rem;
    }
}

/* ── Typography ── */
h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.125rem;
    margin: 0 0 0.75rem;
    font-weight: 600;
    color: var(--gray-900);
}

.page-lead {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin: 0;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ── Forms & buttons ── */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gray-900);
    font-size: 0.95rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

button, .btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

button:hover, .btn:hover { background: var(--accent-hover); }

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background: var(--surface-muted);
    color: var(--gray-800);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--border-strong);
    color: var(--gray-900);
}

.btn-danger { background: var(--error); }
.btn-danger:hover { background: #b91c1c; }

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

/* ── Surfaces ── */
.card,
.section-card,
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    min-width: 0;
}

.card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.card code {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.section-card { margin-bottom: 1rem; }

.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    background: var(--surface-muted);
}

.section-header-toggle:hover { background: var(--gray-100); }

.section-card:not(.collapsed) .section-header {
    border-bottom-color: var(--border);
}

.section-header-toggle {
    cursor: pointer;
    user-select: none;
}

.section-chevron {
    flex-shrink: 0;
    font-size: 0.65rem;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.section-card.collapsed .section-chevron { transform: rotate(-90deg); }

.section-card.collapsed .section-body { display: none; }

.section-body { padding: 1.25rem; }

.section-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.section-header-actions { margin-left: auto; }

/* ── Page layout (inventory / borrow lists) ── */
.page-wrap {
    margin: 0 -1.5rem;
    padding: 0 1.5rem 1.5rem;
}

.page-header {
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

.inventory-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.borrow-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.sidebar-card { padding: 0.75rem; }

.sidebar-section + .sidebar-section {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.35rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-600);
    text-align: left;
}

.sidebar-section-toggle:hover { color: var(--gray-700); }

.sidebar-section-toggle .chevron {
    font-size: 0.65rem;
    transition: transform 0.2s;
    color: var(--gray-400);
}

.sidebar-section.collapsed .sidebar-section-toggle .chevron { transform: rotate(-90deg); }
.sidebar-section.collapsed .sidebar-section-body { display: none; }
.sidebar-section-body { padding: 0 0.35rem 0.5rem; }

.sidebar-filter-field { margin-bottom: 0.55rem; }

.sidebar-filter-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sidebar-filter-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Category filter tree (inventory / borrow sidebar) ── */
.cat-filter-panel {
    margin-bottom: 0.55rem;
}

.cat-filter-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.cat-filter-label-row .sidebar-filter-label {
    margin-bottom: 0;
}

.cat-filter-selected-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--green-700);
    white-space: nowrap;
}

.cat-filter-hint {
    font-size: 0.72rem;
    color: var(--gray-500);
    margin: 0 0 0.4rem;
    line-height: 1.35;
}

.cat-filter-search {
    margin-bottom: 0.45rem;
}

.cat-filter-tree-scroll {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    padding: 0.35rem 0.25rem;
}

.cat-filter-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-filter-node {
    margin: 0;
    padding: 0;
}

.cat-filter-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.1rem;
    border-radius: 6px;
}

.cat-filter-node.active > .cat-filter-row {
    background: var(--green-100);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.cat-filter-node.active .cat-filter-select {
    color: var(--green-800);
    font-weight: 700;
}

.cat-filter-node.active .cat-filter-select::before {
    content: '✓';
    display: inline-block;
    width: 1rem;
    margin-right: 0.2rem;
    color: var(--accent);
    font-weight: 800;
}

.cat-filter-select[aria-pressed="true"] {
    background: transparent;
}

.cat-filter-toggle,
.cat-filter-toggle-spacer {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 4px;
}

.cat-filter-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cat-filter-select {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.15rem 0.25rem;
    font-size: 0.82rem;
    color: var(--gray-800);
    cursor: pointer;
    border-radius: 4px;
}

.cat-filter-select:hover {
    color: var(--accent);
}

.cat-filter-children {
    list-style: none;
    margin: 0;
    padding-left: 0.85rem;
    border-left: 1px solid var(--border);
    margin-left: 0.55rem;
}

.sidebar-filter-input,
.sidebar-filter-select,
.sidebar-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    background: white;
    color: var(--gray-700);
}

.sidebar-filter-input:focus,
.sidebar-filter-select:focus,
.sidebar-search:focus {
    outline: none;
    border-color: var(--accent);
}

#clear-all-filters,
.clear-filters-link {
    font-size: 0.72rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#clear-all-filters:hover,
.clear-filters-link:hover { text-decoration: underline; }

.inventory-main { flex: 1; min-width: 0; }

.search-bar { margin-bottom: 0.85rem; }

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--gray-700);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* ── Item list cards ── */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inventory-item-card,
.borrow-item-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.inventory-item-card { cursor: grab; }
.inventory-item-card:active { cursor: grabbing; }
.inventory-item-card.dragging { opacity: 0.5; }

.inventory-item-card:hover,
.borrow-item-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.inventory-item-card:hover .item-card-name,
.borrow-item-card:hover .item-card-name { color: var(--accent); }

.item-card-thumb { flex-shrink: 0; }

.item-card-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--gray-100);
    display: block;
}

.item-card-image-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--gray-100);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--gray-300);
}

.item-card-body { flex: 1; min-width: 0; }

.item-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.item-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.item-cat-pill {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: var(--gray-100);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--gray-700);
    white-space: nowrap;
}

.item-card-meta {
    font-size: 0.82rem;
    color: var(--gray-600);
    margin-top: 0.2rem;
}

.item-card-empty-cat {
    font-size: 0.82rem;
    color: var(--gray-400);
}

.item-card-status { flex-shrink: 0; margin-left: auto; }

.item-card-borrow-badges {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.borrow-badge-active-loan { background: #dbeafe; color: #1d4ed8; }
.borrow-badge-reservation { background: #fef3c7; color: #b45309; }
.borrow-badge-pending { background: #ffedd5; color: #c2410c; }

.br-cal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(340px, 36%);
    gap: 1rem;
    align-items: start;
}
.br-cal-main { min-width: 0; }
.br-request-panel {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
    background: #fff;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.br-request-panel-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
}
.br-entry-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}
.br-entry-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
    display: inline-block;
}
.br-panel-entry-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.85rem;
}
@media (max-width: 960px) {
    .br-cal-layout { grid-template-columns: 1fr; }
    .br-request-panel { position: static; max-height: none; }
}

.item-drag-handle {
    flex-shrink: 0;
    color: var(--gray-300);
    font-size: 1.1rem;
    cursor: grab;
    user-select: none;
    padding: 0.15rem;
}

.inventory-item-card:hover .item-drag-handle { color: var(--gray-500); }

.filter-empty-msg,
.empty-state {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem 1rem;
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.6; }

/* ── Item hero (detail pages) ── */
.item-hero {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.item-hero-thumb { flex-shrink: 0; }

.item-hero-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: block;
}

.item-hero-placeholder {
    width: 96px;
    height: 96px;
    border-radius: var(--radius);
    background: var(--gray-100);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-300);
}

.item-hero-body { flex: 1; min-width: 0; }

.item-hero-body h1 { margin: 0 0 0.35rem; }

.item-hero-meta {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.item-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.item-detail-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.item-detail-toolbar-left {
    justify-content: flex-start;
}

.item-detail-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.15s;
}

.item-detail-toolbar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.item-detail-toolbar-btn-danger {
    border-color: #fecaca;
    background: #fff5f5;
    color: #dc2626;
}

.item-detail-toolbar-btn-danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

/* ── Tables & messages ── */
.messages { margin-bottom: 1rem; }

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.message.success {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--green-800);
}

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

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    min-width: 0;
}

.detail-table { width: 100%; border-collapse: collapse; }

.detail-table th {
    text-align: left;
    padding: 0.4rem 1rem 0.4rem 0;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    vertical-align: top;
    width: 36%;
}

.detail-table td {
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ── Status badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge-health-normal { background: var(--green-50); color: var(--green-800); }
.status-badge-health-defect { background: #ffedd5; color: #c2410c; }
.status-badge-health-in_repair { background: #fef3c7; color: #b45309; }
.status-badge-health-end_of_life { background: #fee2e2; color: #b91c1c; }
.status-badge-health-virtual { background: #e0f2fe; color: #0369a1; }
.status-badge-owner-nominal { background: var(--gray-100); color: var(--gray-800); }
.status-badge-owner-lost { background: #fee2e2; color: #b91c1c; }
.status-badge-owner-found { background: #ffedd5; color: #c2410c; }
.status-badge-owner-active_loan { background: #dbeafe; color: #1d4ed8; }
.status-badge-owner-overdue { background: #fee2e2; color: #b91c1c; }

/* ── Calendar (shared) ── */
.cal-wrap { display: flex; flex-direction: column; gap: 0.75rem; }

.cal-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cal-toolbar .btn { padding: 0.35rem 0.65rem; font-size: 0.85rem; }

.cal-nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
}

.cal-nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-500);
    min-width: 2.75rem;
}

.cal-nav-view-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cal-nav-date-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.cal-nav-select {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--gray-800);
    max-width: 100%;
}

.cal-nav-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.cal-nav-week { min-width: 9.5rem; }

.cal-nav-range-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-left: auto;
}

.cal-view-active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

.cal-nav-extra {
    padding-top: 0.15rem;
    border-top: 1px solid var(--border);
}

.cal-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem;
    background: #f8fafc;
}
.cal-list-action-row {
    margin-bottom: 0.15rem;
}
.cal-list-action {
    width: 100%;
    justify-content: center;
    border-style: dashed;
}

.info-item {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
}

.info-item-dismissable {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.info-item-dismissable:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.oc-cal-layout.oc-cal-layout-list:not(.oc-cal-layout-has-panel),
.br-cal-layout.br-cal-layout-list:not(.br-cal-layout-has-panel) {
    grid-template-columns: 1fr;
}
.cal-list-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cal-list-group + .cal-list-group {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--gray-200);
}
.cal-list-group-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: -0.1rem;
}
.cal-list-group-collapsible .cal-list-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    margin: 0 0 -0.1rem;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-align: left;
}
.cal-list-group-collapsible .cal-list-group-toggle:hover {
    color: var(--gray-700);
}
.cal-list-group-chevron {
    display: inline-flex;
    font-size: 0.65rem;
    line-height: 1;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.cal-list-group-collapsible.collapsed .cal-list-group-chevron {
    transform: rotate(-90deg);
}
.cal-list-group-collapsible.collapsed .cal-list-group-body {
    display: none;
}
.cal-list-group-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cal-list-item {
    padding: 0.75rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cal-list-item-interactive {
    cursor: pointer;
}
.cal-list-item-interactive:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
.cal-list-item.deleted {
    background: var(--gray-50);
    border-style: dashed;
}
.cal-list-item-interactive.cal-entry-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22);
}
.cal-main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}
.cal-main-layout.cal-main-layout-list {
    grid-template-columns: minmax(0, 1fr) min(340px, 36%);
}
.cal-list-panel {
    display: none;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
    background: #fff;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.cal-main-layout.cal-main-layout-list .cal-list-panel {
    display: block;
}
.cal-list-panel-empty {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}
.cal-list-panel-meta {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--gray-700);
}
.cal-list-panel-actions {
    margin-top: 0.85rem;
}
.cal-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}
.cal-list-title {
    font-weight: 600;
    color: var(--gray-900);
}
.cal-list-subtitle {
    font-size: 0.88rem;
    color: var(--gray-700);
    margin-top: 0.2rem;
}
.cal-list-period {
    font-size: 0.84rem;
    color: var(--gray-600);
    margin-top: 0.2rem;
}
.cal-list-note {
    font-size: 0.84rem;
    color: var(--gray-600);
    margin-top: 0.2rem;
    white-space: normal;
}
.cal-list-empty {
    padding: 1rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.cal-filters-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.cal-filters-toolbar .cal-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
}

.cal-filters-toolbar .cal-filters input[type="text"] {
    flex: 1 1 12rem;
    min-width: 10rem;
    font: inherit;
    font-size: 0.85rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.cal-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-800);
    margin-right: auto;
}

.cal-sep {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.15rem;
}

.cal-chip {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--gray-700);
    user-select: none;
}

.cal-chip input { accent-color: var(--accent); }

.cal-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cal-month-wrap { user-select: none; }

.cal-dow-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.cal-dow {
    padding: 0.5rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    text-transform: uppercase;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}

.cal-week-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-daycell {
    min-height: 90px;
    min-width: 0;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0.4rem 0.45rem;
    cursor: crosshair;
    background: var(--surface);
}

.cal-daycell.sel {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: var(--green-50);
}

.cal-week-row .cal-daycell:last-child { border-right: none; }

.cal-daynum {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-700);
    line-height: 1.3;
}

.cal-daynum.muted { color: var(--gray-400); font-weight: 600; }

.cal-daycell.cal-today,
.oc-daycell.cal-today,
#calMount .cal-daycell.cal-today,
#brCalMount .cal-daycell.cal-today {
    background: rgba(22, 163, 74, 0.12);
    box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.35);
}

.cal-daycell.cal-today .cal-daynum,
.oc-daycell.cal-today .oc-daynum,
.cal-daynum.cal-today-num,
.oc-daynum.cal-today-num {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cal-tl-head .h.cal-today,
.oc-tl-head.cal-today,
.oc-tl-cell.oc-tl-head.cal-today {
    color: var(--accent);
    font-weight: 800;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.cal-daycol.cal-today,
.oc-daycol.cal-today,
#calMount .cal-daycol.cal-today,
#brCalMount .cal-daycol.cal-today {
    background-color: rgba(22, 163, 74, 0.07);
    box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.28);
}

#calMount .cal-tl-head .h.cal-today,
#brCalMount .cal-tl-head .h.cal-today {
    color: var(--accent);
    font-weight: 800;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.cal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    z-index: 5;
    pointer-events: none;
}

.cal-now-line::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.cal-span-bar,
.oc-span-bar {
    position: relative;
    min-width: 0;
}

.cal-event-block,
.oc-event-block {
    position: absolute;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.cal-span-bar.cal-entry-selected,
.cal-event-block.cal-entry-selected,
.oc-span-bar.cal-entry-selected,
.oc-event-block.cal-entry-selected {
    z-index: 8;
    overflow: visible;
}

.cal-span-bar.cal-entry-selected::after,
.cal-event-block.cal-entry-selected::after,
.oc-span-bar.cal-entry-selected::after,
.oc-event-block.cal-entry-selected::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(255, 255, 255, 0.95);
    border-radius: inherit;
    pointer-events: none;
    z-index: 20;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    animation: cal-entry-ring 1.1s ease-in-out infinite;
}

.cal-event-block.cal-entry-selected::after,
.oc-event-block.cal-entry-selected::after {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: none;
}

@keyframes cal-entry-ring {
    0%, 100% {
        opacity: 1;
        border-color: rgba(255, 255, 255, 0.95);
    }
    50% {
        opacity: 0.55;
        border-color: #fff;
    }
}

.cal-event-block.cal-entry-selected::after,
.oc-event-block.cal-entry-selected::after {
    animation-name: cal-entry-ring-block;
}

@keyframes cal-entry-ring-block {
    0%, 100% {
        opacity: 1;
        border-color: var(--accent);
    }
    50% {
        opacity: 0.55;
        border-color: #22c55e;
    }
}

.cal-event-layer {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    bottom: 3px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: 19px;
    align-content: start;
    pointer-events: none;
    gap: 2px 0;
    z-index: 2;
}

.cal-span-bar {
    position: relative;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    pointer-events: auto;
    cursor: pointer;
    padding: 1px 5px;
    align-self: center;
    height: 17px;
    line-height: 15px;
    box-sizing: border-box;
    min-width: 0;
}

.cal-more {
    font-size: 0.72rem;
    color: var(--gray-500);
    pointer-events: auto;
    grid-column: 1 / -1;
    align-self: center;
    padding: 0 4px;
}

.cal-timeline {
    display: grid;
    grid-template-columns: 70px repeat(var(--days), minmax(0, 1fr));
    width: 100%;
}

.cal-tl-head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}

.cal-tl-head .h {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-700);
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

.cal-tl-head .h:last-child { border-right: none; }

.cal-hour-label {
    height: var(--hourH);
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    color: var(--gray-600);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--gray-200);
    box-sizing: border-box;
}

.cal-daycol {
    position: relative;
    height: calc(24 * var(--hourH));
    border-right: 1px solid var(--border);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px) 0 0 / 100% var(--hourH);
    cursor: crosshair;
}

.cal-daycol:last-child { border-right: none; }

.cal-tl-scroll { max-height: 540px; overflow: auto; }

.cal-event-block {
    position: absolute;
    border-radius: 8px;
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--border);
    overflow: hidden;
    pointer-events: none;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.cal-event-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event-meta {
    font-size: 0.72rem;
    color: var(--gray-600);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kind-loan { background: #dbeafe; }
.kind-loan.past { background: var(--gray-100); }
.kind-other { background: var(--gray-100); cursor: default !important; }
.kind-reservation { background: #fef3c7; }
.kind-block { background: #fee2e2; }

.cal-select {
    position: absolute;
    left: 6px;
    right: 6px;
    border-radius: 8px;
    border: 2px solid var(--accent);
    background: rgba(22, 163, 74, 0.12);
    pointer-events: none;
    z-index: 2;
}

.cal-sel-handle {
    position: absolute;
    left: 0;
    right: 0;
    height: 14px;
    cursor: ns-resize;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.cal-sel-handle-top { top: 0; border-radius: 8px 8px 0 0; }
.cal-sel-handle-bot { bottom: 0; border-radius: 0 0 8px 8px; }

.cal-sel-handle::before {
    content: '';
    display: block;
    width: 26px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 5px 0 var(--accent);
    opacity: 0.75;
}

.cal-pop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.cal-pop.open { display: flex; }

.cal-pop-card {
    width: min(680px, 94vw);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.cal-pop-title { font-weight: 700; font-size: 1rem; margin: 0; }

.cal-pop-sub {
    margin: 0.25rem 0 0;
    color: var(--gray-600);
    font-size: 0.88rem;
}

.cal-pop-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

.text-muted {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.text-error {
    color: var(--error);
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .inventory-layout { flex-direction: column; }
    .borrow-sidebar { width: 100%; }
    .page-wrap { margin: 0; padding: 0; }
    .item-hero { flex-direction: column; align-items: stretch; }
    .item-hero-image,
    .item-hero-placeholder { width: 72px; height: 72px; }
}

@media (max-width: 640px) {
    nav { padding-left: 1rem; padding-right: 1rem; }
    .container, .container-wide { padding-left: 1rem; padding-right: 1rem; }
    h1 { font-size: 1.25rem; }
    .item-card-image,
    .item-card-image-placeholder { width: 56px; height: 56px; }
}

/* ── Misc global (from base) ── */
.choice-buttons { display: flex; flex-direction: column; gap: 0.75rem; }
.choice-buttons a, .choice-buttons button { display: block; text-align: center; padding: 1rem; }

.table-scroll table { min-width: max(100%, 500px); }
.table-scroll.detail-table-wrap table { min-width: 100%; }
.detail-table-wrap { max-width: 100%; min-width: 0; }

@media (max-width: 640px) {
    .detail-table-wrap .detail-table th {
        white-space: normal;
        width: auto;
        max-width: 40%;
    }
    .detail-table-wrap .detail-table td {
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

/* ── Calendar page filters ── */
.cal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.cal-filters input[type="text"] {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.38rem 0.55rem;
    font-size: 0.85rem;
    min-width: 220px;
}

.cal-page .cal-tl-scroll { max-height: calc(100vh - 260px); }

.cal-filter-types,
.cal-filter-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.cal-filter-types label,
.cal-item-picker-list label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    font-size: 0.84rem;
    color: var(--gray-700);
    cursor: pointer;
}

.cal-filter-types input,
.cal-item-picker-list input {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.cal-filter-empty {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin: 0;
}

.cal-filter-group {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
}

.cal-filter-group:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.cal-filter-group-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cal-filter-scope-enable {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    margin: 0;
}

.cal-filter-scope-enable input {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.cal-filter-group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
}

.cal-filter-group-chevron:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.cal-filter-group-chevron .chevron {
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.cal-filter-group.collapsed .cal-filter-group-chevron .chevron {
    transform: rotate(-90deg);
}

.cal-filter-group.collapsed .cal-filter-group-body {
    display: none;
}

.cal-filter-group-body {
    padding-top: 0.55rem;
}

.cal-item-picker {
    margin: 0;
}

.cal-item-picker > summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    user-select: none;
}

.cal-item-picker > summary::-webkit-details-marker {
    display: none;
}

.cal-item-picker > summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.15s ease;
}

.cal-item-picker[open] > summary::before {
    transform: rotate(90deg);
}

.cal-item-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.45rem;
    padding: 0.15rem 0.1rem 0.25rem;
}

.cal-page-layout .inventory-main {
    min-width: 0;
    flex: 1;
}

@media (max-width: 720px) {
    .cal-page .cal-tl-scroll { max-height: none; }
    .cal-page .cal-toolbar { position: sticky; top: 52px; z-index: 10; }
}

#calMount .cal-event-block,
#brCalMount .cal-event-block {
    pointer-events: auto;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    right: auto;
    box-sizing: border-box;
}

/* ── Inventory list — share sidebar ── */
#sidebar-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    gap: 0.4rem;
}

#sidebar-clear-filter {
    font-size: 0.72rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    display: none;
}

#sidebar-clear-filter:hover { text-decoration: underline; }

.sidebar-section-body h4 {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0.6rem 0 0.35rem;
}

.sidebar-section-body h4:first-child { margin-top: 0; }

.sidebar-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0 0 0.6rem;
    line-height: 1.4;
}

.sidebar-empty { font-size: 0.82rem; color: var(--gray-500); padding: 0.25rem 0; }

.drop-target-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.drop-target {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 2px dashed transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
    user-select: none;
}

.drop-target:hover { background: var(--gray-100); }

.drop-target.drag-over {
    background: var(--green-100);
    border-color: var(--accent);
}

.drop-target.active-filter {
    background: var(--green-50);
    border-color: var(--accent);
    border-style: solid;
}

.drop-target.active-filter .drop-target-name { color: var(--accent); font-weight: 600; }

.drop-target-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green-600);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drop-target-avatar.group-avatar {
    background: #6366f1;
    border-radius: 6px;
    font-size: 0.85rem;
}

.drop-target-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.drop-target-badge {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.drop-target-badge.visible { display: block; }

.inventory-item-card.laf-row {
    background: #fff7ed;
    border-color: #fed7aa;
}

.inventory-item-card.laf-row:hover {
    border-color: #fb923c;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.12);
}

.inventory-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inventory-search-clear {
    font-size: 0.82rem;
    color: var(--gray-500);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0.5rem;
}

.inventory-search-clear:hover { color: var(--accent); }

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 1.3rem;
    line-height: 1;
}

/* ── Borrow detail extras ── */
.detail-images { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.detail-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.borrow-doc-list { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.borrow-doc-list a { font-size: 0.9rem; color: var(--accent); }

#borrow-map {
    height: 240px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.log-entries { list-style: none; margin: 0; padding: 0; }

.log-entries li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.log-entries li:last-child { border-bottom: none; }

.log-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.2rem;
}

.qr-preview {
    width: 180px;
    height: 180px;
    display: block;
}

.doc-thumb {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Aliases for legacy class names */
.inventory-page-wrap { margin: 0 -1.5rem; padding: 0 1.5rem 1.5rem; }
.inventory-page-header { padding-top: 0.5rem; margin-bottom: 1rem; }
.inventory-items { display: flex; flex-direction: column; gap: 0.5rem; }
.inventory-search-bar { margin-bottom: 0.85rem; }
.inventory-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--gray-700);
}
.inventory-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
