/* ===== Reset & dasar ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #f0f4f9 0%, #f7f9fc 100%);
    color: #1f2933;
    line-height: 1.55;
    min-height: 100vh;
}
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

/* ===== Layout dua kolom ===== */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: start;
}
.col { min-width: 0; }

/* ===== Kartu ===== */
.col-form,
.col-result > .result {
    background: #ffffff;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    padding: 26px 26px 22px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}
.col-result > .result { padding: 26px; }

/* ===== Header form ===== */
.page-header h1 {
    font-size: 1.45rem;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.subtitle { color: #5b6773; margin: 0 0 20px; font-size: 0.95rem; }

/* ===== Field ===== */
.field { margin-bottom: 14px; }
label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #3a4551;
    margin-bottom: 6px;
}
input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    font-size: 0.98rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    color: #1f2933;
}
input:focus, select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ===== Fieldset harga ===== */
fieldset.prices {
    border: 1px solid #e4e9f0;
    border-radius: 10px;
    padding: 12px 16px 6px;
    margin: 18px 0 20px;
    background: #fafcff;
}
fieldset.prices legend {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a73e8;
    padding: 0 6px;
    background: #fff;
    border-radius: 4px;
}

/* ===== Tombol ===== */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #1a73e8;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn:hover { background: #1558b0; }
.btn:active { transform: translateY(1px); }

/* ===== Alert ===== */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.92rem;
}
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }

/* ===== Result ===== */
.result h2 {
    font-size: 1.25rem;
    margin: 0 0 6px;
    color: #0f172a;
}
.result h3 {
    font-size: 1.02rem;
    margin: 22px 0 8px;
    color: #0f172a;
}
.note { color: #5b6773; font-size: 0.88rem; margin: 0 0 14px; }

/* ===== Tabel ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 14px;
    font-size: 0.92rem;
}
.table th, .table td {
    text-align: left;
    padding: 9px 8px;
    border-bottom: 1px solid #eef1f5;
}
.table th {
    background: #f7f9fc;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5b6773;
    font-weight: 600;
}
.table td:last-child, .table th:last-child { text-align: right; }
.table tr:last-child td { border-bottom: none; }

.total-row td {
    background: #eef5ff;
    border-top: 2px solid #1a73e8;
    font-size: 1rem;
}

/* ===== Placeholder ===== */
.result-empty .placeholder-text {
    color: #5b6773;
    font-size: 0.95rem;
    margin: 8px 0 14px;
}
.placeholder-list {
    margin: 0;
    padding-left: 20px;
    color: #3a4551;
    font-size: 0.92rem;
}
.placeholder-list li { margin-bottom: 6px; }

/* ===== Disclaimer ===== */
.disclaimer {
    font-size: 0.84rem;
    color: #5b6773;
    background: #f7f9fc;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid #1a73e8;
    margin: 16px 0 0;
}

/* ===== Responsif ===== */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .container { padding: 22px 14px 32px; }
    .col-form, .col-result > .result { padding: 20px 18px; }
}
@media (max-width: 480px) {
    .page-header h1 { font-size: 1.25rem; }
    .btn { font-size: 0.95rem; padding: 11px 16px; }
}

/* ===== Tombol sekunder & aksi ===== */
.btn-secondary {
    background: #eef5ff;
    color: #1a73e8;
    border: 1px solid #cfe2ff;
}
.btn-secondary:hover { background: #dbeaff; }

.btn-ghost {
    background: transparent;
    color: #3a4551;
    border: 1px solid #cfd8e3;
}
.btn-ghost:hover { background: #f3f6fa; }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.inline-form { display: inline; margin: 0; }
.actions .btn { width: auto; }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 0.9rem; color: #5b6773; margin: 0 0 16px; }
.breadcrumb a { color: #1a73e8; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== Link ===== */
.link { color: #1a73e8; text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ===== Alert sukses ===== */
.alert-success { background: #e7f6ec; color: #1e7a3f; border: 1px solid #c3e8d1; }

/* ===== Pagination ===== */
.pagination { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.page {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cfd8e3;
    color: #3a4551;
    text-decoration: none;
    font-size: 0.88rem;
}
.page:hover { background: #f3f6fa; }
.page.current { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* ===== Print ===== */
@media print {
    body { background: #fff; }
    .container { max-width: none; padding: 0; }
    .no-print, .col-form, .breadcrumb, .actions, header.page-header { display: none !important; }
    .layout { display: block; }
    .col-result > .result {
        box-shadow: none;
        border: 0;
        padding: 0;
    }
    .table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .total-row td { background: #eef5ff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
}