:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --primary: #175cd3;
  --primary-dark: #1849a9;
  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;
  --soft-blue: #eff4ff;
  --soft-green: #ecfdf3;
  --soft-yellow: #fffaeb;
  --soft-red: #fef3f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.topbar,
.hero,
.panel,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 38px;
  display: grid;
  place-items: center;
}

.brand img {
  max-width: 48px;
  max-height: 34px;
  object-fit: contain;
}

.brand > span:last-child {
  display: grid;
  gap: 1px;
}

.brand b { font-size: 16px; }
.brand small { color: var(--muted); font-size: 12px; }

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar nav a,
.link-btn,
.secondary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #344054;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 700;
}

.topbar nav a:hover,
.link-btn:hover,
.secondary:hover { background: var(--surface-subtle); }

.topbar nav .nav-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.8fr);
  gap: 44px;
  align-items: center;
  padding: 32px;
  margin-bottom: 16px;
  border-top: 3px solid var(--primary);
}

.hero-copy { max-width: 620px; }

.eyebrow,
.label {
  display: block;
  margin: 0 0 7px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 9px;
  letter-spacing: 0;
}

h2 { font-size: 19px; margin-bottom: 10px; }
h3 { font-size: 15px; margin-bottom: 3px; }
.muted { color: var(--muted); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.trust-row span::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--success);
}

.search {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.search label,
.pay-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #344054;
}

.search small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.1);
}

button,
.primary {
  min-height: 44px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover,
.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.grid { display: grid; gap: 14px; }

.summary-grid,
.detail-grid {
  grid-template-columns: minmax(0, 1fr) 310px;
  margin-bottom: 14px;
}

.pay-grid { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); }
.compliance-grid {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}
.panel { padding: 20px; }

.invoice-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin: 6px 0 28px;
}

.invoice-page-head h1 {
  margin-bottom: 2px;
  font-size: 22px;
}

.invoice-page-head p { margin-bottom: 0; }

.invoice-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-toolbar button.secondary {
  margin: 0;
}

.invoice-toolbar button:disabled {
  opacity: .6;
  cursor: wait;
}

.invoice-summary-panel {
  margin-bottom: 48px;
}

.invoice-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.invoice-info-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invoice-info-card span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.invoice-info-card strong {
  color: #000;
  font-size: 14px;
  line-height: 1.35;
}

.invoice-info-card small {
  color: #000;
  font-size: 13px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invoice-pay-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
}

.invoice-items-panel {
  overflow: hidden;
}

.invoice-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #c7d7f7;
  border-radius: 7px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

.invoice-table th,
.invoice-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #d8e2f3;
  text-align: left;
  vertical-align: middle;
}

.invoice-table th {
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.invoice-table tr:last-child td { border-bottom: 0; }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-table .strong { font-weight: 900; color: #000; }

.invoice-total-box {
  width: min(420px, 100%);
  margin-left: auto;
  padding-top: 14px;
}

.invoice-total-box div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-total-box span { color: #101828; }
.invoice-total-box strong { color: #000; }
.invoice-total-box .grand {
  border-bottom: 0;
  font-size: 16px;
  font-weight: 900;
}

.checkout-panel {
  position: sticky;
  top: 16px;
}

.checkout-amount {
  display: grid;
  gap: 2px;
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.checkout-amount span {
  color: #d0d5dd;
  font-size: 12px;
  font-weight: 800;
}

.checkout-amount strong {
  font-size: 26px;
  line-height: 1.2;
}

.review-panel {
  margin-bottom: 14px;
  border-top: 3px solid var(--success);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.review-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.review-card h3 { margin-bottom: 0; }
.review-card p { margin-bottom: 0; }
.full-btn { width: 100%; margin-top: 4px; }

.amount-panel {
  display: grid;
  align-content: center;
  gap: 5px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.amount-panel .label,
.amount-panel small { color: #d0d5dd; }
.amount-panel strong { font-size: 30px; line-height: 1.2; }

.settled-note,
.security-note {
  width: fit-content;
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.kv {
  display: grid;
  gap: 0;
  margin: 0;
}

.kv div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f0f2f5;
}

.kv dt,
.kv dd { margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 700; overflow-wrap: anywhere; }
.kv.compact div { padding: 8px 0; }

.product-list {
  display: grid;
  gap: 10px;
}

.product-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}

.product-list span { color: #344054; }
.product-list b {
  color: var(--primary);
  white-space: nowrap;
}

.small-note {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 12px;
}

.section-head,
.invoice-main,
.invoice-actions,
.items div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invoice-section { padding: 0; overflow: hidden; }
.invoice-section > .section-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.invoice-section > .invoice-list { padding: 12px; }

.invoice-list { display: grid; gap: 9px; }

.invoice-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: #fff;
}

.invoice-card:hover { border-color: #b2ccff; }

.invoice-main {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 170px;
}

.invoice-identity { display: flex; align-items: center; gap: 12px; }

.invoice-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 7px;
  background: var(--soft-blue);
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.invoice-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-meta b { color: var(--ink); font-size: 13px; }

.invoice-total {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.invoice-total strong { font-size: 19px; }

.badge {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.is-paid { background: var(--soft-green); color: var(--success); }
.is-pending, .is-due { background: var(--soft-yellow); color: var(--warning); }
.is-muted { background: var(--soft-red); color: var(--danger); }

.items {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f2f5;
}

.items div { align-items: flex-start; }
.items span { display: grid; gap: 2px; color: #344054; }
.items small { color: var(--muted); }
.items b { white-space: nowrap; }
.items.large { gap: 0; }
.items.large div { padding: 12px 0; border-bottom: 1px solid #f0f2f5; }

.invoice-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.primary,
.secondary,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notice {
  padding: 13px 15px;
  margin-bottom: 14px;
  font-weight: 700;
}

.notice.is-warning { background: var(--soft-yellow); color: var(--warning); }
.notice.is-success { background: var(--soft-green); color: var(--success); }

.empty-state {
  margin: 20px;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-subtle);
}

.empty-state b { display: block; margin-bottom: 5px; color: var(--ink); }
.empty-state p { margin: 0; }

.bank-info {
  white-space: pre-wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  color: #344054;
  font: inherit;
  line-height: 1.6;
}

.pay-form { display: grid; gap: 10px; margin-top: 14px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer > div { display: grid; gap: 3px; }
.footer-links { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px !important; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 840px) {
  .shell { width: min(100% - 18px, 1180px); padding-top: 9px; }
  .topbar { align-items: flex-start; }
  .topbar,
  .section-head,
  .site-footer { flex-direction: column; }
  .topbar nav { width: 100%; }
  .topbar nav a { flex: 1; }
  .invoice-page-head,
  .invoice-toolbar { align-items: stretch; }
  .invoice-toolbar a,
  .invoice-toolbar button { flex: 1; }
  .hero,
  .summary-grid,
  .detail-grid,
  .compliance-grid,
  .review-grid,
  .pay-grid,
  .invoice-summary-cards,
  .invoice-main { grid-template-columns: 1fr; }
  .hero { gap: 22px; padding: 22px; }
  h1 { font-size: 26px; }
  .invoice-main { align-items: start; }
  .invoice-total { justify-items: start; }
  .invoice-actions { justify-content: stretch; }
  .invoice-actions a { flex: 1; }
  .invoice-summary-panel { margin-bottom: 18px; }
  .checkout-panel { position: static; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .search-row { grid-template-columns: 1fr; }
  .trust-row { display: grid; }
  .kv div { grid-template-columns: 1fr; gap: 3px; }
  .panel { padding: 16px; }
  .invoice-section > .section-head { padding: 16px; }
  .invoice-section > .invoice-list { padding: 8px; }
  .product-list div { flex-direction: column; gap: 4px; }
  .invoice-actions { flex-direction: column; }
  .invoice-actions a { width: 100%; }
}



/* =========================================================
   MTN BAYAR DESKTOP UI FIX - 2026-08-31
   ========================================================= */

@media (min-width: 992px) {

    /* Main desktop width */
    .container,
    .page-container,
    .main-container,
    main {
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Hero/search area */
    .hero,
    .billing-hero,
    .lookup-section,
    .search-section {
        align-items: center;
    }

    /* Form pencarian jangan terlalu sempit */
    .lookup-box,
    .search-box,
    .billing-search,
    .lookup-form-wrap {
        min-width: 440px;
    }

    /* Label form */
    .lookup-box label,
    .search-box label,
    .billing-search label,
    .lookup-form-wrap label {
        display: block;
        margin-bottom: 8px;
        line-height: 1.35;
    }

    /* Input + button sejajar */
    .lookup-form,
    .search-form,
    .billing-search-form {
        display: flex;
        align-items: stretch;
        gap: 10px;
    }

    .lookup-form input,
    .search-form input,
    .billing-search-form input {
        flex: 1 1 auto;
        min-width: 0;
    }

    .lookup-form button,
    .search-form button,
    .billing-search-form button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Support card lebih proporsional di desktop */
    .support-card,
    .contact-card,
    .contact-support {
        max-width: 560px;
    }

    /* Rapikan spacing row support */
    .support-card .row,
    .contact-card .row,
    .contact-support .row,
    .support-row {
        min-height: 40px;
        align-items: center;
    }

    /* Footer lebih bersih */
    footer,
    .footer {
        margin-top: 24px;
    }
}

/* Jangan sisakan blok kosong dari teks helper yang dihapus */
.form-hint:empty,
.help-text:empty,
.hint:empty,
.support-title:empty,
.footer-note:empty,
small:empty,
p:empty {
    display: none;
}

