:root {
    --primary: #0b62c4;
    --primary-dark: #094f9e;
    --danger: #d93025;
    --warn: #e8a33d;
    --ok: #188a42;
    --bg: #f2f5f9;
    --line: #e2e8f0;
    --text: #1f2937;
    --muted: #6b7280;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
.page { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.topbar h1 { font-size: 22px; margin: 0; }
.admin-link { color: var(--primary); text-decoration: none; font-size: 13px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 40, 80, .06);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
textarea#quoteText {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}
textarea#quoteText:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 98, 196, .12); }
.btn-row { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.text-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 14px;
    transition: all .15s;
}
.text-link:hover { border-color: var(--primary); background: rgba(22,119,255,.06); }
.btn {
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-plain { background: #eef2f7; color: var(--text); }
.btn-plain:hover { background: #dfe6ef; }
.btn-large { font-size: 16px; padding: 12px 44px; font-weight: 600; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-del { background: #fdecea; color: var(--danger); padding: 5px 12px; border-radius: 6px; font-size: 13px; }
.btn-del:hover { background: #facbc8; }

.summary { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; }
.summary.ok { background: #eaf7ee; color: var(--ok); border: 1px solid #bfe6cc; }
.summary.warn { background: #fef6e9; color: #8a5a13; border: 1px solid #f3ddb0; }
.hidden { display: none; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}
.form-grid label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 6px; }
.form-grid select, .form-grid input {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
    background: #fff;
    outline: none;
}
.form-grid select:focus, .form-grid input:focus { border-color: var(--primary); }
.field-error { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(217, 48, 37, .12); }
.hint { margin-top: 10px; font-size: 13px; color: #a05a00; }

.items-table { width: 100%; border-collapse: collapse; }
.items-table th, .items-table td {
    border-bottom: 1px solid var(--line);
    padding: 7px 4px;
    text-align: center;
    font-size: 13px;
}
.items-table th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.items-table td input {
    width: 100%;
    max-width: 96px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
    outline: none;
}
.items-table td input:focus { border-color: var(--primary); }
.cbm-cell { color: var(--muted); font-size: 12px; }

.result { margin-top: 16px; }
.result h3 { margin: 0 0 8px; font-size: 16px; }
.quote-text {
    background: #eef6ff;
    border-left: 4px solid var(--primary);
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.8;
}
.detail-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.detail-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-table td.lbl { color: var(--muted); width: 150px; }
.detail-table td.val { text-align: right; }
.detail-table td.val b { color: var(--danger); }
.foot-note { margin-top: 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
    .items-table td { padding: 5px 2px; }
    .items-table td input { max-width: 100%; font-size: 12px; height: 32px; padding: 0 4px; }
}

.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.nav { display: flex; gap: 6px; }
.nav a {
    text-decoration: none;
    font-size: 14px;
    color: var(--text);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    white-space: nowrap;
}
.nav a.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.nav a:hover { border-color: var(--primary); }
.lang-switch {
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 8px;
    font-size: 13px;
    background: #fff;
    outline: none;
}
.lang-switch:focus { border-color: var(--primary); }

.price-wrap { margin-top: 12px; overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.price-table th, .price-table td {
    border: 1px solid var(--line);
    padding: 9px 10px;
    font-size: 13px;
    text-align: center;
}
.price-table thead th {
    background: #f5f8fc;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.price-table tbody tr:nth-child(even) { background: #fafcff; }
.price-table td.ch { text-align: left; white-space: nowrap; }
.price-table td.num { font-variant-numeric: tabular-nums; }
.price-table .muted { color: var(--muted); font-size: 12px; }