/*
 * IEUM9 디자인 시스템 — Design system .italia 기준.
 * 값은 공식 토큰(design-tokens-italia 1.3.3, dist/css/variables.css)에서 가져왔다.
 *   파랑 #0066cc(blue-40) / hover #004d99(blue-30) / active #003366(blue-20)
 *   슬레이트 #5c6f82(slate-44) · 본문 #1a1a1a(gray-10) · 보조 텍스트 #2f475e(slate-28)
 *   경계선 #c5c7c9(slate-78) · 옅은 면 #f2f7fc(blue-97) · 반경 4px(radius-smooth)
 *   Titillium Web / Lora / Roboto Mono · 간격 4px 배수, 섹션 96px
 * 두 앱(사용자·관리자)이 같은 토큰을 쓴다.
 */

:root {
    /* 파랑 (primary) */
    --ieum-primary: #0066cc;
    --ieum-primary-hover: #004d99;
    --ieum-primary-active: #003366;
    --ieum-primary-light: #bfdfff;
    --ieum-primary-lighter: #f2f7fc;

    /* 슬레이트 (secondary) */
    --ieum-secondary: #5c6f82;
    --ieum-secondary-hover: #2f475e;
    --ieum-secondary-active: #17324d;
    --ieum-secondary-light: #a3adb7;
    --ieum-secondary-lighter: #d9dadb;

    /* 표면 */
    --ieum-canvas: #ffffff;
    --ieum-surface: #f2f7fc;
    --ieum-surface-neutral: #ebeced;
    --ieum-surface-dark: #17324d;

    /* 경계선 */
    --ieum-border: #c5c7c9;
    --ieum-border-light: #ebeced;

    /* 텍스트 */
    --ieum-text: #1a1a1a;
    --ieum-text-secondary: #2f475e;
    --ieum-text-muted: #5c6f82;
    --ieum-text-inverse: #ffffff;
    --ieum-text-inverse-muted: rgba(255, 255, 255, .8);

    /* 상태 */
    --ieum-success: #008055;
    --ieum-success-light: #c8f6e7;
    --ieum-warning: #995c00;
    --ieum-warning-light: #f6e4c8;
    --ieum-danger: #cc334d;
    --ieum-danger-light: #fbeff1;
    --ieum-focus: #0066cc;

    /* 형태 */
    --ieum-r: 4px;                 /* radius-smooth */
    --ieum-r-rounded: 40px;        /* chip, avatar */
    --ieum-b: 1px;                 /* border-base */
    --ieum-b-double: 2px;
    --ieum-b-thick: 4px;

    /* 간격 (4px 배수) */
    --ieum-s-1: 4px;
    --ieum-s-2: 8px;
    --ieum-s-3: 12px;
    --ieum-s-4: 16px;
    --ieum-s-5: 20px;
    --ieum-s-6: 24px;
    --ieum-s-8: 32px;
    --ieum-s-10: 40px;
    --ieum-s-12: 48px;
    --ieum-s-16: 64px;
    --ieum-s-24: 96px;

    /* 타이포 */
    --ieum-sans: "Titillium Web", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
    --ieum-serif: "Lora", Georgia, serif;
    --ieum-mono: "Roboto Mono", Menlo, monospace;

    /* 그림자 (shadow offset/blur 토큰) */
    --ieum-shadow-s: 0 4px 4px rgba(0, 0, 0, .05);
    --ieum-shadow-m: 0 8px 16px rgba(0, 0, 0, .1);
}

/* ---------- 기본 ---------- */

body {
    background: var(--ieum-canvas);
    color: var(--ieum-text);
    font-family: var(--ieum-sans);
    font-size: 1rem;          /* font-size-3 */
    font-weight: 400;
    line-height: 1.5;         /* leading-5 */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ieum-secondary-active);
    font-family: var(--ieum-sans);
    font-weight: 700;
    letter-spacing: 0;
}

h1, .h1 { font-size: 2.5rem; line-height: 1.2; }     /* 40px */
h2, .h2 { font-size: 2rem; line-height: 1.2; }       /* 32px */
h3, .h3 { font-size: 1.75rem; line-height: 1.3; }    /* 28px */
h4, .h4 { font-size: 1.5rem; line-height: 1.3; }     /* 24px */
h5, .h5 { font-size: 1.25rem; line-height: 1.4; }    /* 20px */
h6, .h6 { font-size: 1.125rem; line-height: 1.4; }   /* 18px */

a {
    color: var(--ieum-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover { color: var(--ieum-primary-hover); }

hr { border-color: var(--ieum-border); opacity: 1; }

code, pre, .font-monospace { font-family: var(--ieum-mono); }

::selection { background: var(--ieum-primary-light); color: var(--ieum-secondary-active); }

:focus-visible {
    outline: var(--ieum-b-double) solid var(--ieum-focus);
    outline-offset: 2px;
}

main > section, .section-rhythm { margin-bottom: var(--ieum-s-16); }

.eyebrow {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--ieum-text-muted);
}

.micro-cap {
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
}

.body-marketing { font-size: 1.25rem; font-weight: 300; line-height: 1.4; }

.text-secondary { color: var(--ieum-text-secondary) !important; }

.text-primary { color: var(--ieum-primary) !important; }

.text-success { color: var(--ieum-success) !important; }

.text-danger { color: var(--ieum-danger) !important; }

.text-dark { color: var(--ieum-text) !important; }

.bg-light { background-color: var(--ieum-surface) !important; }

.bg-white { background-color: var(--ieum-canvas) !important; }

/* ---------- 버튼 ---------- */

.btn {
    font-family: var(--ieum-sans);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    border-radius: var(--ieum-r);
    border-width: var(--ieum-b);
    /* 입력과 같은 눈금. 세로 패딩 대신 min-height 로 잡아 변형 조합에서도 흔들리지 않는다 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--ieum-s-6);
    white-space: nowrap;
}

.btn-sm { font-size: .875rem; padding: 0 var(--ieum-s-4); }

.btn-lg { font-size: 1.125rem; padding: 0 var(--ieum-s-8); min-height: 52px; }

.btn-primary {
    --bs-btn-bg: var(--ieum-primary);
    --bs-btn-border-color: var(--ieum-primary);
    --bs-btn-color: var(--ieum-text-inverse);
    --bs-btn-hover-bg: var(--ieum-primary-hover);
    --bs-btn-hover-border-color: var(--ieum-primary-hover);
    --bs-btn-hover-color: var(--ieum-text-inverse);
    --bs-btn-active-bg: var(--ieum-primary-active);
    --bs-btn-active-border-color: var(--ieum-primary-active);
    --bs-btn-disabled-bg: var(--ieum-secondary-lighter);
    --bs-btn-disabled-border-color: var(--ieum-secondary-lighter);
    --bs-btn-disabled-color: var(--ieum-text-muted);
}

.btn-outline-primary {
    --bs-btn-color: var(--ieum-primary);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--ieum-primary);
    --bs-btn-hover-bg: var(--ieum-primary);
    --bs-btn-hover-border-color: var(--ieum-primary);
    --bs-btn-hover-color: var(--ieum-text-inverse);
    --bs-btn-active-bg: var(--ieum-primary-active);
    --bs-btn-active-border-color: var(--ieum-primary-active);
    border-width: var(--ieum-b-double);
}

.btn-outline-secondary, .btn-outline-dark {
    --bs-btn-color: var(--ieum-secondary-hover);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--ieum-secondary);
    --bs-btn-hover-bg: var(--ieum-secondary-hover);
    --bs-btn-hover-border-color: var(--ieum-secondary-hover);
    --bs-btn-hover-color: var(--ieum-text-inverse);
    --bs-btn-active-bg: var(--ieum-secondary-active);
    border-width: var(--ieum-b-double);
}

.btn-secondary, .btn-dark {
    --bs-btn-bg: var(--ieum-secondary);
    --bs-btn-border-color: var(--ieum-secondary);
    --bs-btn-color: var(--ieum-text-inverse);
    --bs-btn-hover-bg: var(--ieum-secondary-hover);
    --bs-btn-hover-border-color: var(--ieum-secondary-hover);
}

.btn-outline-danger {
    --bs-btn-color: var(--ieum-danger);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--ieum-danger);
    --bs-btn-hover-bg: var(--ieum-danger);
    --bs-btn-hover-border-color: var(--ieum-danger);
    --bs-btn-hover-color: var(--ieum-text-inverse);
    border-width: var(--ieum-b-double);
}

.btn-outline-warning {
    --bs-btn-color: var(--ieum-warning);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--ieum-warning);
    --bs-btn-hover-bg: var(--ieum-warning);
    --bs-btn-hover-border-color: var(--ieum-warning);
    --bs-btn-hover-color: var(--ieum-text-inverse);
    border-width: var(--ieum-b-double);
}

/* 어두운 면 위의 보조 버튼 */
.hero .btn-outline-primary,
.hero .btn-outline-secondary,
.hero .btn-outline-light,
.site-header .btn-outline-primary,
.site-header .btn-outline-secondary {
    --bs-btn-color: var(--ieum-text-inverse);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--ieum-text-inverse);
    --bs-btn-hover-bg: var(--ieum-text-inverse);
    --bs-btn-hover-border-color: var(--ieum-text-inverse);
    --bs-btn-hover-color: var(--ieum-primary-active);
}

.btn-link {
    --bs-btn-color: var(--ieum-primary);
    --bs-btn-hover-color: var(--ieum-primary-hover);
    display: inline;
    min-height: 0;
    padding: 0;
    text-decoration: underline;
}

/* ---------- 카드 ---------- */

.card {
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    color: var(--ieum-text);
    box-shadow: var(--ieum-shadow-s);
}

.card-body { padding: var(--ieum-s-6); }

.card-header, .card-footer {
    background: transparent;
    border-color: var(--ieum-border-light);
}

/* 강조 카드 상단 띠 (Italia 카드 관례) */
.card-highlight { border-top: var(--ieum-b-thick) solid var(--ieum-primary); }

/* ---------- 표 ---------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ieum-text);
    --bs-table-border-color: var(--ieum-border-light);
    --bs-table-striped-bg: var(--ieum-primary-lighter);
    --bs-table-hover-bg: var(--ieum-primary-lighter);
    --bs-table-hover-color: var(--ieum-text);
    margin-bottom: 0;
    font-size: .875rem;
}

.table > thead {
    color: var(--ieum-secondary-active);
    font-size: .875rem;
    font-weight: 700;
}

.table > thead th {
    background: var(--ieum-surface-neutral);
    border-bottom: var(--ieum-b-double) solid var(--ieum-border);
    padding: var(--ieum-s-3) var(--ieum-s-2);
}

.table > tbody td {
    border-color: var(--ieum-border-light);
    vertical-align: middle;
    padding: var(--ieum-s-3) var(--ieum-s-2);
}

.table a { color: var(--ieum-primary); }

/* ---------- 입력 ---------- */

.form-control, .form-select, .input-group-text {
    background: var(--ieum-canvas);
    color: var(--ieum-text);
    border: var(--ieum-b) solid var(--ieum-secondary);
    border-radius: var(--ieum-r);
    padding: 0 var(--ieum-s-3);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    height: 44px;
    min-height: 44px;
}

/* 여러 줄·파일 입력은 내용에 따라 늘어난다 */
textarea.form-control {
    height: auto;
    min-height: 88px;
    padding: var(--ieum-s-3);
}

.form-control[type="file"] { height: auto; padding: 10px var(--ieum-s-3); }

.form-control[size], select.form-select[size], select.form-select[multiple] {
    height: auto;
    padding: var(--ieum-s-3);
}

.form-control:focus, .form-select:focus {
    background: var(--ieum-canvas);
    border-color: var(--ieum-primary);
    box-shadow: inset 0 0 0 1px var(--ieum-primary);
    color: var(--ieum-text);
}

.form-control::placeholder { color: var(--ieum-text-muted); }

.form-control:disabled, .form-select:disabled {
    background: var(--ieum-surface-neutral);
    color: var(--ieum-text-muted);
}

.form-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--ieum-secondary-hover);
}

.form-text { color: var(--ieum-text-muted); font-size: .75rem; }

.form-check-input {
    border: var(--ieum-b) solid var(--ieum-secondary);
    border-radius: var(--ieum-r);
}

.form-check-input:checked {
    background-color: var(--ieum-primary);
    border-color: var(--ieum-primary);
}

.form-check-input:focus {
    border-color: var(--ieum-primary);
    box-shadow: 0 0 0 2px var(--ieum-primary-light);
}

/* ---------- 배지·칩 ---------- */

.badge {
    border-radius: var(--ieum-r);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    padding: var(--ieum-s-1) var(--ieum-s-2);
}

.badge.text-bg-light, .badge.text-bg-secondary {
    background: var(--ieum-surface-neutral) !important;
    color: var(--ieum-secondary-hover) !important;
}

.badge.text-bg-dark, .badge.text-bg-primary {
    background: var(--ieum-primary) !important;
    color: var(--ieum-text-inverse) !important;
}

.badge.text-bg-success { background: var(--ieum-success-light) !important; color: var(--ieum-success) !important; }

.badge.text-bg-danger { background: var(--ieum-danger-light) !important; color: var(--ieum-danger) !important; }

.badge.text-bg-warning { background: var(--ieum-warning-light) !important; color: var(--ieum-warning) !important; }

/* ---------- 알림 ---------- */

.alert {
    border-radius: var(--ieum-r);
    border-width: var(--ieum-b);
    border-left-width: var(--ieum-b-thick);
    font-size: .9375rem;
}

.alert-primary {
    background: var(--ieum-primary-lighter);
    border-color: var(--ieum-primary-light);
    border-left-color: var(--ieum-primary);
    color: var(--ieum-secondary-active);
}

.alert-secondary {
    background: var(--ieum-surface-neutral);
    border-color: var(--ieum-border-light);
    border-left-color: var(--ieum-secondary);
    color: var(--ieum-text-secondary);
}

.alert-danger {
    background: var(--ieum-danger-light);
    border-color: var(--ieum-danger);
    border-left-color: var(--ieum-danger);
    color: #7a1f2e;
}

.alert-warning {
    background: var(--ieum-warning-light);
    border-color: var(--ieum-warning);
    border-left-color: var(--ieum-warning);
    color: #663d00;
}

.alert-success {
    background: var(--ieum-success-light);
    border-color: var(--ieum-success);
    border-left-color: var(--ieum-success);
    color: #006644;
}

/* ---------- 그 밖의 부트스트랩 조각 ---------- */

.accordion {
    --bs-accordion-bg: var(--ieum-canvas);
    --bs-accordion-color: var(--ieum-text);
    --bs-accordion-border-color: var(--ieum-border-light);
    --bs-accordion-btn-color: var(--ieum-primary);
    --bs-accordion-btn-bg: var(--ieum-canvas);
    --bs-accordion-active-bg: var(--ieum-primary-lighter);
    --bs-accordion-active-color: var(--ieum-primary-active);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 2px var(--ieum-primary-light);
    --bs-accordion-border-radius: var(--ieum-r);
}

.pagination {
    --bs-pagination-bg: var(--ieum-canvas);
    --bs-pagination-color: var(--ieum-primary);
    --bs-pagination-border-color: var(--ieum-border-light);
    --bs-pagination-hover-bg: var(--ieum-primary-lighter);
    --bs-pagination-hover-color: var(--ieum-primary-hover);
    --bs-pagination-active-bg: var(--ieum-primary);
    --bs-pagination-active-border-color: var(--ieum-primary);
    --bs-pagination-disabled-color: var(--ieum-text-muted);
    --bs-pagination-border-radius: var(--ieum-r);
}

.dropdown-menu {
    --bs-dropdown-bg: var(--ieum-canvas);
    --bs-dropdown-border-color: var(--ieum-border-light);
    --bs-dropdown-link-color: var(--ieum-text);
    --bs-dropdown-link-hover-bg: var(--ieum-primary-lighter);
    --bs-dropdown-border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-m);
}

.modal-content {
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-m);
}

/* ---------- 헤더 ---------- */

.site-header {
    background: var(--ieum-secondary-active);
    color: var(--ieum-text-inverse);
    border-bottom: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: 0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.site-header > .container {
    min-height: 64px;
    padding-top: var(--ieum-s-2) !important;
    padding-bottom: var(--ieum-s-2) !important;
}

.brand-logo {
    font-family: var(--ieum-sans);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--ieum-text-inverse);
    letter-spacing: 0;
    text-decoration: none;
}

.brand-logo span { color: var(--ieum-primary-light); }

.primary-nav a {
    color: var(--ieum-text-inverse);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.primary-nav a:hover { color: var(--ieum-primary-light); text-decoration: underline; }

.site-header .text-secondary { color: var(--ieum-text-inverse-muted) !important; }

.site-header .btn-link { --bs-btn-color: var(--ieum-text-inverse-muted); }

.subnav-strip {
    background: var(--ieum-surface-neutral);
    border-bottom: var(--ieum-b) solid var(--ieum-border);
    font-size: .875rem;
    font-weight: 600;
    color: var(--ieum-text-secondary);
}

/* ---------- 푸터 ---------- */

footer, footer.bg-light {
    background: var(--ieum-secondary-active) !important;
    border-top: var(--ieum-b-thick) solid var(--ieum-primary) !important;
    border-radius: 0;
    color: var(--ieum-text-inverse-muted);
    padding: var(--ieum-s-12) 0 var(--ieum-s-8) !important;
    font-size: .875rem;
}

footer a { color: var(--ieum-text-inverse); text-decoration: none; }

footer a:hover { color: var(--ieum-primary-light); text-decoration: underline; }

footer p { color: var(--ieum-text-inverse-muted); }

footer .container > div:first-child {
    border-bottom: var(--ieum-b) solid rgba(255, 255, 255, .25);
    padding-bottom: var(--ieum-s-6);
    margin-bottom: var(--ieum-s-6);
}

/* ---------- 히어로 (primary 섹션) ---------- */

.hero {
    background: var(--ieum-primary);
    color: var(--ieum-text-inverse);
    border: none;
    border-radius: 0;
    padding: var(--ieum-s-16) var(--ieum-s-6);
    margin-bottom: var(--ieum-s-16);
    position: relative;
}

.hero-bleed {
    margin-top: -1.5rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50% + var(--ieum-s-6));
    padding-right: calc(50vw - 50% + var(--ieum-s-6));
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ieum-text-inverse);
}

.hero .eyebrow { color: var(--ieum-primary-light); }

.hero .text-secondary { color: var(--ieum-text-inverse-muted) !important; }

.hero .form-label { color: var(--ieum-text-inverse); }

.cta-strip {
    background: var(--ieum-surface);
    color: var(--ieum-secondary-active);
    border-left: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-8);
}

/* ---------- 메인 ---------- */

.action-card {
    display: block;
    height: 100%;
    padding: var(--ieum-s-6);
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-top: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-s);
    text-decoration: none;
    color: var(--ieum-text);
}

.action-card:hover {
    box-shadow: var(--ieum-shadow-m);
    color: var(--ieum-text);
}

.action-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--ieum-secondary-active); }

.main-search {
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-6);
    box-shadow: var(--ieum-shadow-s);
}

.hero .main-search { border-color: transparent; }

.banner-card {
    display: block;
    overflow: hidden;
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-s);
    text-decoration: none;
    color: var(--ieum-text);
}

.banner-card:hover { box-shadow: var(--ieum-shadow-m); }

.banner-card img { width: 100%; height: 160px; object-fit: cover; display: block; }

.banner-card .banner-body { padding: var(--ieum-s-6); }

.banner-card.owner img { height: 120px; }

/* ---------- 인증 ---------- */

.auth-container { max-width: 480px; padding: var(--ieum-s-8) 0 var(--ieum-s-16); }

.auth-card {
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-top: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-8);
    box-shadow: var(--ieum-shadow-s);
}

.signup-steps, .vehicle-steps, .booking-steps {
    display: flex;
    gap: var(--ieum-s-2);
    list-style: none;
    padding: 0;
    margin-bottom: var(--ieum-s-6);
    font-size: .75rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.signup-steps li, .vehicle-steps li, .booking-steps li {
    padding: var(--ieum-s-1) var(--ieum-s-3);
    border: var(--ieum-b) solid var(--ieum-border);
    border-radius: var(--ieum-r-rounded);
    color: var(--ieum-text-muted);
    background: var(--ieum-canvas);
}

.signup-steps li.done, .vehicle-steps li.done, .booking-steps li.done {
    background: var(--ieum-primary);
    border-color: var(--ieum-primary);
    color: var(--ieum-text-inverse);
}

.vehicle-steps li a, .booking-steps li a { color: inherit; text-decoration: none; }

.signup-choice {
    display: block;
    padding: var(--ieum-s-6);
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-secondary);
    border-radius: var(--ieum-r);
    cursor: pointer;
}

.signup-choice:has(input:checked) {
    border: var(--ieum-b-double) solid var(--ieum-primary);
    background: var(--ieum-primary-lighter);
    padding: 23px;
}

.policy-body { white-space: pre-wrap; line-height: 1.5; color: var(--ieum-text); }

/* ---------- 마이페이지 ---------- */

.my-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--ieum-s-6);
}

.my-content { min-width: 0; }

.my-sidebar .sidebar-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ieum-secondary-active);
    margin-bottom: var(--ieum-s-2);
}

.sidebar-nav { display: flex; flex-direction: column; }

.sidebar-nav a, .sidebar-nav span {
    padding: var(--ieum-s-2) var(--ieum-s-3);
    border-left: var(--ieum-b-thick) solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ieum-primary);
    text-decoration: none;
}

.sidebar-nav a:hover { background: var(--ieum-primary-lighter); }

.sidebar-nav a.active {
    border-left-color: var(--ieum-primary);
    background: var(--ieum-primary-lighter);
    color: var(--ieum-primary-active);
}

.sidebar-nav span.disabled { color: var(--ieum-text-muted); font-weight: 400; }

.status-chip {
    display: flex;
    flex-direction: column;
    gap: var(--ieum-s-1);
    padding: var(--ieum-s-3);
    background: var(--ieum-surface);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    font-size: .75rem;
    font-weight: 600;
    color: var(--ieum-text-muted);
}

.status-chip strong { font-size: 1rem; font-weight: 700; color: var(--ieum-secondary-active); }

.status-chip.ok strong { color: var(--ieum-success); }

/* ---------- 관리자 ---------- */

.admin-body { background: var(--ieum-canvas); }

.admin-topbar {
    background: var(--ieum-secondary-active);
    border-bottom: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: 0;
    min-height: 56px;
    --bs-navbar-padding-y: .25rem;
}

.admin-topbar .navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ieum-text-inverse);
}

.admin-topbar .navbar-brand span { color: var(--ieum-primary-light); }

.admin-shell {
    display: grid;
    grid-template-columns: 232px 1fr;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    background: var(--ieum-surface);
    border-right: var(--ieum-b) solid var(--ieum-border-light);
    padding: var(--ieum-s-6) var(--ieum-s-4);
}

.admin-sidebar .sidebar-nav a, .admin-sidebar .sidebar-nav span {
    font-size: .9375rem;
    padding: var(--ieum-s-2) var(--ieum-s-3);
}

.admin-sidebar .sidebar-note {
    margin-top: var(--ieum-s-6);
    font-size: .75rem;
    line-height: 1.4;
    color: var(--ieum-text-muted);
}

.admin-content { padding: var(--ieum-s-6) var(--ieum-s-8); min-width: 0; }

.kpi-card {
    display: block;
    padding: var(--ieum-s-4);
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-top: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-s);
    color: var(--ieum-text);
    text-decoration: none;
}

a.kpi-card:hover { box-shadow: var(--ieum-shadow-m); color: var(--ieum-text); }

.kpi-card .kpi-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ieum-text-muted);
    margin-bottom: var(--ieum-s-1);
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ieum-primary);
}

.kpi-card.disabled { opacity: .5; }

.kpi-card.disabled .kpi-value { color: var(--ieum-text-muted); }

.admin-login-body {
    background: var(--ieum-surface);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.admin-login-card {
    max-width: 380px;
    margin: 0 auto;
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-top: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-8);
    box-shadow: var(--ieum-shadow-m);
}

.admin-login-card .brand-logo { color: var(--ieum-secondary-active); font-size: 1.75rem; }

.admin-login-card .brand-logo span { color: var(--ieum-primary); }

/* ---------- 검색 ---------- */

.search-layout {
    display: grid;
    grid-template-columns: 264px 1fr;
    gap: var(--ieum-s-6);
}

.search-results { min-width: 0; }

.search-filter {
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-6);
    box-shadow: var(--ieum-shadow-s);
}

.search-filter .form-label, .search-filter h2, .search-filter h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ieum-secondary-active);
}

.sort-tabs { display: flex; gap: var(--ieum-s-2); align-items: center; }

.sort-tabs a {
    color: var(--ieum-primary);
    font-size: .875rem;
    font-weight: 600;
    padding: var(--ieum-s-2) var(--ieum-s-3);
    border-radius: var(--ieum-r);
    text-decoration: none;
}

.sort-tabs a:hover { background: var(--ieum-primary-lighter); }

.sort-tabs a.active {
    background: var(--ieum-primary);
    color: var(--ieum-text-inverse);
}

/* ---------- 차량 카드 ---------- */

.vehicle-card {
    display: block;
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-radius: var(--ieum-r);
    box-shadow: var(--ieum-shadow-s);
    overflow: hidden;
    text-decoration: none;
    color: var(--ieum-text);
}

.vehicle-card:hover { box-shadow: var(--ieum-shadow-m); }

.vehicle-card-thumb {
    /* a 태그다. inline 이면 aspect-ratio 가 무시되어 폭이 0 이 된다 */
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ieum-surface-neutral);
    overflow: hidden;
}

/*
 * 비율 컨테이너 안의 사진은 absolute 로 채운다.
 * height:100% 로 두면 "부모 높이 <- 비율 <- 자식 높이" 순환이 생겨
 * 브라우저가 사진 자연 크기를 쓰고 카드가 늘어난다.
 */
.vehicle-card-thumb img,
.gallery-main img,
.gallery-side a img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--ieum-text-muted);
    font-size: .875rem;
    font-weight: 600;
}

.vehicle-card-body { padding: var(--ieum-s-4); }

.vehicle-card-body .card-title, .vehicle-card-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ieum-secondary-active);
}

.favorite-btn { color: var(--ieum-text-muted); border: none; background: transparent; }

.favorite-btn.on { color: var(--ieum-danger); }

/* ---------- 상세 ---------- */

.detail-gallery {
    display: grid;
    /* minmax(0,...) 가 없으면 트랙 최소폭이 사진 자연폭(1600px)이 되어 사이드 열이 0px 로 눌린다 */
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--ieum-s-2);
    border-radius: var(--ieum-r);
}

.detail-gallery > * { min-width: 0; overflow: hidden; }

.detail-gallery .gallery-more { grid-column: 1 / -1; }

.detail-gallery .gallery-main {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ieum-surface-neutral);
    overflow: hidden;
    border-radius: var(--ieum-r);
}

/* 템플릿은 대표 1장 + 사이드 최대 4장을 넣는다 (설계서 5분할 갤러리) */
.detail-gallery .gallery-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--ieum-s-2);
    min-width: 0;
}

.detail-gallery .gallery-side a {
    position: relative;
    display: block;
    background: var(--ieum-surface-neutral);
    border-radius: var(--ieum-r);
    overflow: hidden;
    min-width: 0;
}

.detail-gallery .gallery-more {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--ieum-s-8);
    align-items: start;
}

.detail-main { min-width: 0; }

.booking-card {
    position: sticky;
    top: 88px;
    background: var(--ieum-canvas);
    border: var(--ieum-b) solid var(--ieum-border-light);
    border-top: var(--ieum-b-thick) solid var(--ieum-primary);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-6);
    box-shadow: var(--ieum-shadow-s);
}

.price-box {
    background: var(--ieum-primary-lighter);
    border: var(--ieum-b) solid var(--ieum-primary-light);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-4);
}

/* ---------- 별점 ---------- */

.rating-stars span { color: var(--ieum-border); }

.rating-stars span.on { color: var(--ieum-warning); }

.rating-input label { font-size: .9375rem; font-weight: 600; cursor: pointer; }

/* ---------- 증빙 사진 ---------- */

.handover-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--ieum-r);
    border: var(--ieum-b) solid var(--ieum-border-light);
}

/* ---------- 코드 블록 ---------- */

pre, .code-block {
    background: var(--ieum-secondary-active);
    color: var(--ieum-text-inverse);
    border-radius: var(--ieum-r);
    padding: var(--ieum-s-4);
    font-family: var(--ieum-mono);
    font-size: .875rem;
    overflow-x: auto;
}

/* ---------- 반응형 ---------- */

@media (max-width: 1151px) {
    .admin-content { padding: var(--ieum-s-4); }
}

@media (max-width: 991px) {
    .my-layout, .search-layout, .detail-layout, .admin-shell { grid-template-columns: 1fr; }

    .booking-card { position: static; }

    .admin-sidebar { border-right: none; border-bottom: var(--ieum-b) solid var(--ieum-border-light); }

    .hero { padding: var(--ieum-s-12) var(--ieum-s-4); }
}

@media (max-width: 767px) {
    h1, .h1 { font-size: 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: var(--ieum-s-8) var(--ieum-s-4); margin-bottom: var(--ieum-s-8); }
    .detail-gallery { grid-template-columns: 1fr; }
    .brand-logo { font-size: 1.5rem; }
    main > section, .section-rhythm { margin-bottom: var(--ieum-s-8); }
}
