:root {
    --navy: #102a43;
    --accent: #d9a441;
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #1d2939;
    --muted: #667085;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --success: #167447;
    --warning: #b54708;
    --danger: #b42318;
    --radius: 22px;
    --shadow: 0 18px 48px rgba(16, 42, 67, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(217,164,65,.10), transparent 32rem),
        linear-gradient(180deg, #fff 0%, var(--bg) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(229,231,235,.90);
    backdrop-filter: blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--navy); color: #fff;
    font-weight: 900; letter-spacing: -.04em;
    box-shadow: 0 12px 26px rgba(16,42,67,.16);
}
.brand-logo { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
.brand-logo img { max-width: 176px; max-height: 54px; object-fit: contain; display: block; }
.brand-text { display: grid; gap: 2px; min-width: 0; }
.brand-text strong { color: var(--navy); font-size: 18px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-nav a { color: var(--navy); background: #f2f4f7; border: 1px solid #e5e7eb; border-radius: 999px; padding: 9px 13px; font-weight: 800; font-size: 13px; }
.admin-nav a:hover { text-decoration: none; background: #fff; border-color: var(--accent); }
.main { padding: 34px 0 58px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-size: 12px; font-weight: 900; margin-bottom: 12px; }
h1 { margin: 0 0 14px; color: var(--navy); font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -.04em; line-height: 1.02; }
h2 { margin: 0 0 10px; color: var(--navy); font-size: 22px; letter-spacing: -.02em; }
p { line-height: 1.7; }
.muted { color: var(--muted); }
.public-hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: stretch; margin-bottom: 22px; }
.public-hero-content { padding: clamp(28px, 5vw, 54px); border-radius: 30px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.public-hero-content p { max-width: 720px; font-size: 18px; color: #475467; margin-bottom: 0; }
.notice-box { margin-top: 24px; padding: 16px 18px; border: 1px solid rgba(217,164,65,.38); border-radius: 18px; background: rgba(217,164,65,.10); color: #594011; font-weight: 700; }
.brand-panel { padding: 28px; display: grid; align-content: center; gap: 20px; background: linear-gradient(145deg, var(--navy), #163b5c); color: #fff; overflow: hidden; position: relative; }
.brand-panel:after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); right: -70px; bottom: -90px; }
.brand-panel .brand { color: #fff; position: relative; z-index: 1; }
.brand-panel .brand-text strong { color: #fff; }
.brand-panel .brand-text small { color: rgba(255,255,255,.72); }
.brand-panel .brand-mark { background: var(--accent); color: var(--navy); box-shadow: none; }
.brand-panel p { color: rgba(255,255,255,.78); margin: 0; position: relative; z-index: 1; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.info-card { padding: 26px; box-shadow: none; }
.step { display: inline-flex; width: 40px; height: 40px; border-radius: 14px; align-items: center; justify-content: center; background: rgba(217,164,65,.12); color: var(--accent); font-weight: 900; margin-bottom: 18px; }
.customer-note { padding: 28px; box-shadow: none; }
.contact-line { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.contact-line span { padding: 9px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; }
.vehicle-cover { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 34px; margin-bottom: 16px; align-items: center; overflow: hidden; position: relative; }
.vehicle-cover:before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.vehicle-name { margin: 0 0 8px; color: #475467; font-size: 19px; font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.summary-grid div { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.summary-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.summary-grid strong { color: var(--navy); font-size: 18px; }
.sync-note { padding: 16px 18px; color: var(--muted); font-size: 14px; margin-bottom: 18px; box-shadow: none; }
.timeline { display: grid; gap: 18px; }
.service-card { padding: 28px; }
.service-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.date-chip { display: inline-flex; background: var(--navy); color: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 900; margin-bottom: 12px; }
.service-status { text-align: right; display: grid; gap: 8px; justify-items: end; }
.service-status small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; background: #eef4fb; color: var(--navy); font-weight: 900; font-size: 12px; }
.badge-success { background: #ecfdf3; color: var(--success); }
.badge-warning { background: #fffaeb; color: var(--warning); }
.item-list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.item-row { display: flex; justify-content: space-between; gap: 18px; padding: 15px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.item-row:last-child { border-bottom: none; }
.item-row:nth-child(even) { background: #fcfcfd; }
.item-type { display: block; font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.item-qty { text-align: right; min-width: 96px; display: grid; gap: 3px; }
.item-qty span { color: var(--muted); }
.total-line { text-align: right; margin-top: 14px; color: var(--navy); font-size: 18px; }
.empty, .error-card, .auth-card { padding: 34px; }
.auth-card { max-width: 520px; margin: 0 auto; }
.alert { padding: 14px 16px; border-radius: 14px; margin: 14px 0; font-weight: 800; }
.alert.success { background: #ecfdf3; color: var(--success); border: 1px solid #abefc6; }
.alert.error { background: #fff0ed; color: var(--danger); border: 1px solid #fecdca; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 12px 18px; border-radius: 14px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 8px 18px rgba(16,42,67,.10); }
.btn-primary { background: var(--accent); color: var(--navy); border-color: var(--accent); }
.btn-ghost { background: #f2f4f7; border-color: #e4e7ec; }
.btn-small { padding: 8px 11px; border-radius: 10px; min-height: 34px; font-size: 13px; }
.btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.button-row.compact { margin-top: 0; }
.admin-section { padding: 28px; margin-bottom: 22px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid label { display: grid; gap: 7px; color: var(--navy); font-weight: 900; font-size: 13px; }
.form-grid input, .form-grid textarea, .form-grid select { width: 100%; padding: 12px 13px; border: 1px solid #d0d5dd; border-radius: 12px; font: inherit; color: var(--text); background: #fff; }
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { outline: 3px solid rgba(217,164,65,.22); border-color: var(--accent); }
.form-grid .check { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 12px 0; }
.form-grid .check input { width: auto; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: end; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline-flex; margin: 0; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { background: #f8fafc; color: var(--navy); text-align: left; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:nth-child(even) { background: #fcfcfd; }
tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; white-space: nowrap; }
.sync-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: center; margin: 18px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.sync-strip div, .sync-summary div { display: flex; flex-direction: column; gap: 4px; }
.sync-strip span, .sync-summary span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.sync-strip strong, .sync-summary strong { color: var(--navy); }
.api-box { margin-top: 22px; padding: 18px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); }
.api-box code { display: block; margin: 6px 0 14px; padding: 12px; border-radius: 12px; background: var(--navy); color: #fff; overflow-x: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; padding: 30px; margin-bottom: 22px; align-items: center; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; place-items: center; }
.qr-box img { max-width: 240px; width: 100%; height: auto; }
.record-admin { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 10px; background: #fbfdff; }
.preview-box { display: grid; gap: 16px; padding: 22px; border-radius: 18px; background: var(--soft); border: 1px dashed #d0d5dd; }
.design-form input[type="color"] { padding: 5px; min-height: 44px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 22px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media print {
    .site-header, .footer, .admin-section, .button-row { display: none !important; }
    .card { box-shadow: none; }
    body { background: #fff; }
}
@media (max-width: 900px) {
    .public-hero, .vehicle-cover, .detail-grid { grid-template-columns: 1fr; }
    .info-grid, .summary-grid, .form-grid, .sync-strip { grid-template-columns: 1fr; }
    .public-hero-content, .vehicle-cover, .service-card { padding: 24px; }
    .service-head { flex-direction: column; }
    .service-status { text-align: left; justify-items: start; }
    .section-head { flex-direction: column; }
    .header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
    .admin-nav { width: 100%; }
    .admin-nav a { flex: 1 1 auto; text-align: center; }
    .brand-logo img { max-width: 150px; }
}
@media (max-width: 560px) {
    .container { width: min(100% - 22px, 1120px); }
    .main { padding-top: 20px; }
    h1 { font-size: 34px; }
    .item-row { align-items: flex-start; flex-direction: column; }
    .item-qty { text-align: left; min-width: 0; }
    .brand-text strong { max-width: 220px; }
}
