body {
    background: #f4f6fa;
    color: #17243b;
    font-family: system-ui, sans-serif;
}
:root { --garage-navy: #142540; --garage-accent: #165dce; }
a { color: var(--garage-accent); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(rgba(11, 20, 36, .55), rgba(11, 20, 36, .72)), url('/images/login-bg.svg') center / cover no-repeat fixed; }
.auth-card { width: 100%; max-width: 460px; background: rgba(255, 255, 255, .94); padding: 2.5rem; border-radius: 1.25rem; box-shadow: 0 18px 60px #050b1855; backdrop-filter: blur(6px); }
.brand { font-size: 1.35rem; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .7rem; background: #2273ec; color: white; margin-right: .6rem; }
.app-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.sidebar { background: var(--garage-navy); color: white; padding: 1.5rem 1rem; position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 1040; transform: translateX(-100%); transition: transform .25s ease; }
.sidebar.is-open { transform: translateX(0); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: #00000050; z-index: 1030; }
.sidebar-overlay.is-visible { display: block; }
.sidebar-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; padding: 8px; border: 1px solid #d0d8e4; border-radius: .45rem; background: transparent; cursor: pointer; flex-shrink: 0; }
.sidebar-toggle:hover { background: #f0f3f8; }
.sidebar-toggle-bar { display: block; width: 100%; height: 2px; background: #3a4a64; border-radius: 2px; }
.sidebar a { color: #d3deef; text-decoration: none; display: flex; align-items: center; gap: .65rem; padding: .55rem .8rem; border-radius: .45rem; }
.sidebar a:hover, .sidebar a.active { color: white; background: #ffffff18; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; flex-shrink: 0; opacity: .85; }
.nav-icon svg { width: 100%; height: 100%; }
.sidebar a:hover .nav-icon, .sidebar a.active .nav-icon { opacity: 1; }
.sidebar nav > a + a { margin-top: .15rem; }
.sidebar .brand { color: white; padding: 0 .5rem 1.8rem; }
.app-header { background: white; border-bottom: 1px solid #e4e9f1; padding: 1rem 2rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.app-header form.search { flex: 1; min-width: 180px; }
.app-content { padding: 2rem; max-width: 1600px; }
.page-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
h1 { font-size: 1.8rem; font-weight: 750; }
.panel { background: white; padding: 1.5rem; border: 1px solid #e4e9f1; border-radius: .8rem; }
.metric { font-size: 2rem; font-weight: 750; }
.metric-card { display: flex; align-items: center; gap: 1rem; }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; flex-shrink: 0; border-radius: .8rem; background: #edf4ff; color: #165dce; }
.metric-icon svg { width: 1.75rem; height: 1.75rem; }
.metric-card:hover .metric-icon { background: #dbe8ff; }
.table { --bs-table-bg: transparent; vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; color: #52627a; }
.flash-message { margin: 0; border-radius: 0; }
.form-panel { max-width: 900px; }
.record-grid { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: .7rem 1.5rem; }
.record-grid dt { color: #627086; font-weight: 500; }
.record-grid dd { overflow-wrap: anywhere; white-space: pre-line; }
.collection > div { border: 1px solid #dce4ef; padding: 1rem; border-radius: .5rem; margin-bottom: 1rem; }
.catalog-toolbar, .catalog-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.catalog-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; font-size: .9rem; }
.catalog-section-heading h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.part-card { display: flex; flex-direction: column; min-width: 0; padding: 1.3rem; border: 1px solid #e1e8f2; border-radius: .9rem; background: #fff; color: #17243b; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.part-card:hover, .part-card.is-selected { color: #17243b; border-color: #165dce; box-shadow: 0 6px 24px #165dce12; }
.part-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 3.5rem; height: 3.5rem; border-radius: .9rem; background: #edf4ff; color: #165dce; margin-bottom: 1rem; }
.part-icon svg { width: 2.25rem; height: 2.25rem; }
.part-card:nth-child(4n+2) .part-icon { color: #13796a; background: #eaf7f3; }
.part-card:nth-child(4n+3) .part-icon { color: #916200; background: #fff6df; }
.part-card:nth-child(4n+4) .part-icon { color: #7254b4; background: #f3effc; }
.part-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; margin: 0 0 .4rem; }
.part-card-description { color: #61728a; font-size: .8rem; margin-bottom: .8rem; }
.part-card-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: 1rem; color: #596b84; font-size: .85rem; }
.part-card-footer strong { color: #17243b; font-size: 1.2rem; }
.part-card-footer small { display: block; margin-top: .2rem; }
.part-card-arrow { font-size: 1.4rem; color: #165dce; }
.catalog-hint { text-align: center; color: #61728a; padding: 1.5rem .5rem .5rem; margin: 0; }
.part-icon-small { width: 2.6rem; height: 2.6rem; margin: 0; }
.part-icon-small svg { width: 1.8rem; height: 1.8rem; }
.part-inline-icon { display: inline-flex; width: 1.4rem; height: 1.4rem; flex-shrink: 0; color: #61728a; }
.subcategory-settings { list-style: none; padding: 0; margin: 0; }
.subcategory-settings li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 0; border-top: 1px solid #e4e9f1; }
@media (max-width: 600px) { .page-heading { flex-wrap: wrap; } .parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .part-card { padding: .85rem; } .panel { padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { .part-card { transition: none; } }
:focus-visible { outline: 3px solid #76aafa; outline-offset: 2px; }
.skip-link { position: absolute; top: -100px; }
.skip-link:focus { top: 0; background: white; z-index: 100; padding: 1rem; }
@media (max-width: 800px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { padding: .75rem; }
    .sidebar nav { display: flex; flex-wrap: wrap; gap: .2rem; }
    .sidebar .brand { padding-bottom: .5rem; }
    .app-header, .app-content { padding: 1rem; }
    .record-grid { grid-template-columns: 1fr; gap: .2rem; }
}
