/* Container Inspector — shared design system.
   Reskins Bootstrap 5.3 via its CSS custom properties instead of
   fighting it with one-off overrides on every page.
   Palette and layout modelled on iicl.org: blue sidebar action
   blocks over a grey nav list, blue/white/grey elsewhere. */

:root {
    --bs-primary: #1c6ea4;
    --bs-primary-rgb: 28, 110, 164;
    --bs-secondary: #5c7387;
    --bs-secondary-rgb: 92, 115, 135;
    --bs-success: #2a9d8f;
    --bs-success-rgb: 42, 157, 143;
    --bs-warning: #e9a23b;
    --bs-warning-rgb: 233, 162, 59;
    --bs-danger: #c0392b;
    --bs-danger-rgb: 192, 57, 43;
    --bs-link-color: var(--bs-primary);
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-link-hover-color: #154f79;
    --bs-body-bg: #eef1f3;
    --bs-body-color: #1c2a36;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.35rem;
    --bs-border-radius-lg: 0.75rem;

    --ci-surface: #ffffff;
    --ci-muted-bg: #eef1f3;
    --ci-line: #dde2e6;
    --ci-blue: #1c6ea4;
    --ci-blue-mid: #2a7fb8;
    --ci-blue-dark: #154f79;

    --ci-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ci-font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    min-height: 100vh;
    font-family: var(--ci-font-body);
}

h1, h2, h3, h4, h5, h6,
.btn,
.logo-block .word {
    font-family: var(--ci-font-display);
    font-weight: 600;
}

/* ---- App shell: fixed left sidebar + main content, like iicl.org ---- */
.shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--ci-surface);
    border-right: 1px solid var(--ci-line);
}

@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}

.logo-block {
    display: block;
    padding: 6px 4px 20px;
    text-decoration: none;
    color: inherit;
}

.logo-block .word {
    display: block;
    font-size: 20px;
    color: var(--ci-blue-dark);
    letter-spacing: 0.01em;
}

.logo-block .word .bi {
    color: var(--bs-warning);
    margin-right: 0.35rem;
}

.logo-block .sub {
    display: block;
    font-size: 11px;
    color: var(--bs-secondary);
    margin-top: 2px;
    font-family: var(--ci-font-body);
}

.sidebar-toggle {
    border: 1px solid var(--ci-line);
    background: #fff;
    border-radius: var(--bs-border-radius-sm);
    padding: 6px 10px;
    font-size: 18px;
    color: var(--ci-blue-dark);
    margin-bottom: 20px;
}

.quicklinks a {
    display: block;
    padding: 16px 20px;
    background: var(--ci-blue);
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.quicklinks a:hover {
    background: var(--ci-blue-mid);
}

.quicklinks a .verb {
    display: block;
    font-family: var(--ci-font-display);
    font-weight: 600;
    font-size: 15px;
}

.quicklinks a .obj {
    display: block;
    font-size: 13px;
    color: #dceaf3;
    margin-top: 1px;
    font-family: var(--ci-font-body);
}

.navlist {
    background: var(--ci-muted-bg);
    flex: 1;
    padding: 14px 0 24px;
}

.navlist a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    text-decoration: none;
    color: var(--bs-body-color);
    font-size: 14.5px;
}

.navlist a::before {
    content: "\25B8";
    font-size: 10px;
    color: #9aa7b1;
}

.navlist a:hover {
    color: var(--ci-blue);
}

.navlist a.on {
    color: var(--ci-blue);
    font-weight: 600;
}

.navlist a.on::before {
    color: var(--ci-blue);
}

main {
    flex: 1;
    min-width: 0;
    padding-bottom: 3rem;
}

main > .container {
    padding-top: 2rem;
}

@media (max-width: 991.98px) {
    .shell {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--ci-line);
    }
    .sidebar-top {
        padding: 14px 16px 0;
    }
    .logo-block {
        padding: 4px 4px 14px;
    }
}

/* ---- Page shell ---- */
.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.page-card {
    background: var(--ci-surface);
    border: 1px solid var(--ci-line);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: 0 1px 3px rgba(23, 34, 51, 0.05);
    padding: 1.75rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* ---- Home / index hero, modelled on iicl.org's photo hero ---- */
.parts-hero {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    background: #0f2335;
}

.parts-hero svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.parts-hero .scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15, 35, 53, 0.86) 0%, rgba(15, 35, 53, 0.55) 45%, rgba(15, 35, 53, 0.15) 75%);
}

.parts-hero .copy {
    position: relative;
    padding: 40px;
    color: #fff;
    max-width: 620px;
}

.parts-hero h1 {
    font-size: 30px;
    line-height: 1.2;
    margin: 0;
}

.parts-hero p {
    font-size: 14.5px;
    color: #d9e6ee;
    margin-top: 12px;
    line-height: 1.6;
    max-width: 480px;
    font-family: var(--ci-font-body);
}

/* ---- Feature strip, modelled on iicl.org's "Become Certified / Inspector
   Directory" row directly under the hero ---- */
.parts-features {
    background: var(--ci-surface);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--ci-line);
}

.parts-features .f {
    padding: 28px 32px;
    border-right: 1px solid var(--ci-line);
}

.parts-features .f:last-child {
    border-right: none;
}

.parts-features .f h2 {
    font-size: 16px;
    margin: 0 0 8px;
    color: var(--ci-blue-dark);
}

.parts-features .f p {
    font-size: 13.5px;
    color: var(--bs-secondary);
    line-height: 1.6;
    margin: 0 0 10px;
    font-family: var(--ci-font-body);
}

.parts-features .f a {
    font-size: 13px;
    font-weight: 600;
    color: var(--ci-blue);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .parts-features {
        grid-template-columns: 1fr;
    }
    .parts-features .f {
        border-right: none;
        border-bottom: 1px solid var(--ci-line);
    }
}

/* ---- Wizard step indicator ---- */
.step-indicator {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.step-indicator li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--bs-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--ci-muted-bg);
}

.step-indicator li .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: rgba(92, 115, 135, 0.18);
    font-weight: 600;
    font-size: 0.75rem;
}

.step-indicator li.is-done {
    color: var(--bs-success);
    background: rgba(42, 157, 143, 0.1);
}

.step-indicator li.is-done .step-num {
    background: var(--bs-success);
    color: #fff;
}

.step-indicator li.is-current {
    color: var(--ci-blue);
    background: rgba(28, 110, 164, 0.1);
    font-weight: 600;
}

.step-indicator li.is-current .step-num {
    background: var(--ci-blue);
    color: #fff;
}

/* ---- Empty states ---- */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--bs-secondary);
}

.empty-state .bi {
    font-size: 2rem;
    color: rgba(92, 115, 135, 0.5);
    margin-bottom: 0.5rem;
    display: block;
}

/* ---- Misc component polish ---- */
.card {
    border-radius: var(--bs-border-radius-lg);
}

.table {
    --bs-table-bg: transparent;
}

.btn {
    font-weight: 600;
}

.part-tile {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    font-family: var(--ci-font-display);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 992px) {
    .part-viewer-col {
        position: sticky;
        top: 1.5rem;
    }
}

.part-viewer {
    width: 100%;
    height: 70vh;
    min-height: 420px;
}

@media (min-width: 992px) {
    .part-viewer {
        height: calc(100vh - 180px);
        min-height: 520px;
    }
}

.part-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(23, 34, 51, 0.1);
    color: var(--ci-blue) !important;
    border-color: var(--ci-blue);
}
