/* Scoped layout for the Nippon Paint base-cost catalog and tint cost calculator. */
.nippon-heading { align-items: flex-start; }
.nippon-heading .page-description { max-width: 760px; }
.nippon-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.nippon-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nippon-panel, .nippon-calculator { min-width: 0; }
.nippon-toolbar .search-box { flex: 1 1 360px; min-width: min(100%, 260px); }
.nippon-table { width: 100%; min-width: 1040px; table-layout: fixed; }
.nippon-table th, .nippon-table td { vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
.nippon-table th:nth-child(1) { width: 28%; }
.nippon-table th:nth-child(2) { width: 16%; }
.nippon-table th:nth-child(3) { width: 18%; }
.nippon-table th:nth-child(4) { width: 21%; }
.nippon-table th:nth-child(5) { width: 17%; }
.nippon-table th:nth-child(1), .nippon-table td:nth-child(1),
.nippon-table th:nth-child(2), .nippon-table td:nth-child(2) { text-align: left; }
.nippon-table td:nth-child(1) strong { display: block; overflow-wrap: anywhere; }
.nippon-table .nippon-money { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.nippon-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nippon-row-actions .btn { padding: 7px 10px; white-space: nowrap; }
.nippon-calculator { padding: clamp(18px, 2.4vw, 28px); }
.nippon-section-heading { padding-bottom: 16px; border-bottom: 1px solid var(--border, #e2e8f0); }
.nippon-section-heading h3 { margin: 0 0 7px; font-size: 1.18rem; }
.nippon-section-heading p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted, #64748b); line-height: 1.55; }
.nippon-calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.nippon-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.nippon-field > span { color: var(--text-muted, #64748b); font-size: .86rem; font-weight: 600; line-height: 1.4; }
.nippon-field input, .nippon-field select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border, #dbe2ea); border-radius: 10px; background: var(--surface, #fff); color: inherit; font: inherit; }
.nippon-field input:focus, .nippon-field select:focus { outline: 3px solid rgba(11, 63, 136, .14); border-color: var(--primary, #0b3f88); }
.nippon-calc-result { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1.2fr); align-items: stretch; gap: 12px; margin-top: 22px; padding: 0; border: 0; background: transparent; }
.nippon-calc-result > div { display: grid; align-content: center; gap: 8px; min-width: 0; min-height: 96px; padding: 16px 18px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; background: var(--surface, #fff); box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.nippon-calc-result span { color: var(--text-muted, #64748b); font-size: .84rem; line-height: 1.4; }
.nippon-calc-result strong { font-size: clamp(1rem, 1.5vw, 1.2rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nippon-calc-result .nippon-calc-plus, .nippon-calc-result .nippon-calc-equals { display: grid; place-items: center; align-self: stretch; color: var(--text-muted, #64748b); font-size: 1.35rem; font-weight: 700; }
.nippon-calc-result .nippon-calc-total { border-color: rgba(11, 63, 136, .2); background: #f1f6fd; }
.nippon-calc-result .nippon-calc-total span { color: var(--primary, #0b3f88); font-weight: 600; }
.nippon-calc-result .nippon-calc-total strong { color: var(--primary, #0b3f88); font-size: clamp(1.08rem, 1.7vw, 1.35rem); }
.nippon-calc-note { margin: 12px 0 0; color: var(--text-muted, #64748b); font-size: .84rem; line-height: 1.55; }
.nippon-editor-panel { width: min(540px, calc(100vw - 28px)); max-height: 90vh; overflow: auto; }
.nippon-editor-form { display: grid; gap: 14px; }
.nippon-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.nippon-form-error { margin: 0; padding: 10px 12px; border-radius: 8px; color: #9b1c1c; background: #fff0f0; }
.nippon-product-card { display: grid; gap: 12px; margin: 10px; padding: 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; }
.nippon-product-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nippon-product-card-title strong { min-width: 0; overflow-wrap: anywhere; }
.nippon-product-card-title span { flex: 0 0 auto; color: var(--text-muted, #64748b); }
.nippon-product-card-cost { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.nippon-product-card-cost span, .nippon-product-card small { color: var(--text-muted, #64748b); }
.nippon-product-card-cost strong { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.nippon-product-card .nippon-row-actions { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .nippon-heading { flex-direction: column; }
  .nippon-heading-actions { width: 100%; }
  .nippon-calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nippon-calc-grid .nippon-field:first-child { grid-column: 1 / -1; }
  .nippon-calc-result { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 10px; }
  .nippon-calc-result > div:first-child { grid-column: 1; grid-row: 1; }
  .nippon-calc-result .nippon-calc-plus { grid-column: 2; grid-row: 1; }
  .nippon-calc-result > div:nth-of-type(2) { grid-column: 3; grid-row: 1; }
  .nippon-calc-result .nippon-calc-equals { grid-column: 2; grid-row: 2; }
  .nippon-calc-result .nippon-calc-total { grid-column: 1 / -1; grid-row: 3; min-height: 78px; }
}
@media (max-width: 760px) {
  .nippon-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .nippon-heading-actions .btn { width: 100%; }
  .nippon-summary { grid-template-columns: 1fr 1fr; }
  .nippon-toolbar .search-box { flex-basis: 100%; }
  .nippon-table-wrap { display: none; }
  .nippon-calc-grid { grid-template-columns: 1fr; gap: 13px; }
  .nippon-calc-grid .nippon-field:first-child { grid-column: auto; }
  .nippon-calc-result { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nippon-calc-result > div:first-child,
  .nippon-calc-result > div:nth-of-type(2),
  .nippon-calc-result .nippon-calc-total { grid-column: 1; grid-row: auto; }
  .nippon-calc-result > div { min-height: 72px; padding: 13px 15px; }
  .nippon-calc-result .nippon-calc-plus,
  .nippon-calc-result .nippon-calc-equals { min-height: 18px; font-size: 1.1rem; }
  .nippon-calc-result .nippon-calc-total { min-height: 76px; }
}
@media (max-width: 420px) {
  .nippon-heading-actions { grid-template-columns: 1fr; }
  .nippon-summary { gap: 8px; }
  .nippon-summary .summary-card { padding: 12px; }
}
/* Cache state badge follows the Hutang Supplier status convention. */
.nippon-summary .nippon-data-status{display:inline-flex;align-items:center;width:fit-content;min-height:24px;margin-top:7px;padding:4px 10px;border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:750;line-height:1.2;letter-spacing:.01em;font-variant-numeric:tabular-nums}
.nippon-data-status[data-state="current"]{color:#067647;background:#ecfdf3;border-color:#abefc6}
.nippon-data-status[data-state="refreshing"]{color:#1849a9;background:#eff8ff;border-color:#b2ddff}
.nippon-data-status[data-state="cache"]{color:#93370d;background:#fffaeb;border-color:#fedf89}
.nippon-data-status[data-state="error"]{color:#b42318;background:#fef3f2;border-color:#fecdca}
.nippon-data-status[data-state="idle"]{color:#667085;background:#f2f4f7;border-color:#eaecf0}
.nippon-summary #nippon-updated{line-height:1.45;overflow-wrap:anywhere}
