:root {
    --green-900: #064c31;
    --green-700: #087a45;
    --green-600: #0a8f50;
    --green-100: #dff4e9;
    --green-50: #f0faf5;
    --ink: #15231c;
    --muted: #66736d;
    --line: #dfe5e1;
    --surface: #fff;
    --canvas: #f5f7f5;
    --danger: #bd3030;
    --warning: #9a6508;
    --shadow: 0 16px 45px rgba(20, 52, 36, .08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; letter-spacing: 0; }
a { color: var(--green-700); }
.app-container { max-width: 1180px; }
.app-navbar { min-height: 72px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); }
.navbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.12rem; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; color: #fff; background: var(--green-700); border-radius: 8px; }
.navbar-toggler { width: 42px; height: 42px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--green-100); }
.nav-link { position: relative; margin: 0 3px; padding: 10px 12px !important; color: var(--muted); font-size: .92rem; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: var(--green-700); }
.nav-link.active::after { content: ""; position: absolute; right: 12px; bottom: 2px; left: 12px; height: 2px; background: var(--green-700); }
.nav-account { margin-left: 12px; }
.account-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--ink); background: var(--green-50); border: 1px solid var(--green-100); border-radius: 8px; font-size: .84rem; font-weight: 600; }
.btn-logout { width: 38px; height: 38px; display: inline-grid; place-items: center; margin-left: 5px; color: var(--muted); border: 1px solid var(--line); }
.btn-logout:hover { color: var(--danger); border-color: #efcaca; }
.app-main { flex: 1; padding: 42px 0 56px; }
.app-footer { padding: 20px 0; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); font-size: .82rem; }
.app-footer .container { display: flex; justify-content: space-between; gap: 20px; }
.footer-status { display: inline-flex; align-items: center; gap: 7px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 7px; font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 700; }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-body { padding: 28px; }
.btn { min-height: 42px; border-radius: 7px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--green-700); --bs-btn-border-color: var(--green-700); --bs-btn-hover-bg: var(--green-900); --bs-btn-hover-border-color: var(--green-900); --bs-btn-active-bg: var(--green-900); --bs-btn-active-border-color: var(--green-900); }
.btn-outline-primary { --bs-btn-color: var(--green-700); --bs-btn-border-color: var(--green-700); --bs-btn-hover-bg: var(--green-700); --bs-btn-hover-border-color: var(--green-700); }
.form-label { margin-bottom: 7px; color: #34443b; font-size: .88rem; font-weight: 600; }
.form-control, .input-group-text { min-height: 48px; border-color: #ced8d2; border-radius: 7px; }
.form-control:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.input-group-text { color: var(--muted); background: #f8faf8; }
.form-text { color: var(--muted); }
.alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-left: 4px solid currentColor; border-radius: 6px; }
.flash-stack { margin-bottom: 24px; }
.flash-stack .alert:last-child { margin-bottom: 0; }
.login-layout { min-height: 560px; display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.78fr); overflow: hidden; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff; background: var(--green-900); }
.login-intro h1 { max-width: 520px; margin: 20px 0 16px; font-size: clamp(2rem,4vw,3.25rem); line-height: 1.08; font-weight: 700; }
.login-intro p { max-width: 480px; color: #d7ebe1; font-size: 1.02rem; }
.login-intro .eyebrow { color: #8fd0ae; font-size: .78rem; }
.login-security { display: flex; gap: 24px; color: #d7ebe1; font-size: .85rem; }
.login-security span { display: inline-flex; align-items: center; gap: 8px; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.login-form h2 { margin-bottom: 8px; font-size: 1.55rem; font-weight: 700; }
.login-form > p { margin-bottom: 28px; color: var(--muted); }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.6fr); gap: 22px; }
.welcome-panel { padding: 34px; background: var(--green-900); color: #fff; }
.welcome-panel .eyebrow { color: #b7dac8; }
.welcome-panel h1 { max-width: 620px; margin: 12px 0; font-size: clamp(1.8rem,4vw,2.65rem); font-weight: 700; }
.welcome-panel p { max-width: 600px; margin-bottom: 26px; color: #d7ebe1; }
.eyebrow { margin: 0; color: var(--green-700); font-size: .76rem; font-weight: 700; text-transform: uppercase; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn-light { color: var(--green-900); }
.account-panel { padding: 26px; }
.panel-title { margin: 0 0 20px; font-size: 1rem; font-weight: 700; }
.detail-list { display: grid; gap: 18px; margin: 0; }
.detail-list div { min-width: 0; }
.detail-list dt { margin-bottom: 4px; color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.detail-list code { color: var(--green-900); font-size: .82rem; }
.payment-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 22px; align-items: start; }
.form-section { padding: 30px; }
.payment-summary { padding: 25px; }
.payment-paybill { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; }
.payment-paybill div { padding: 12px; background: var(--green-50); border: 1px solid var(--green-100); border-radius: 7px; }
.payment-paybill dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.payment-paybill dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.summary-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; color: var(--green-700); background: var(--green-100); border-radius: 8px; }
.steps { display: grid; gap: 16px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 32px; padding-left: 42px; color: var(--muted); font-size: .87rem; counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; left: 0; top: -4px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--green-900); background: var(--green-50); border: 1px solid var(--green-100); border-radius: 50%; font-weight: 700; }
.status-hero { display: flex; align-items: flex-start; gap: 18px; padding: 28px; border-bottom: 1px solid var(--line); }
.payment-progress { display: grid; grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 20px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.progress-step { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.progress-step > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; background: #edf0ee; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.progress-step strong, .progress-step small { display: block; white-space: nowrap; }
.progress-step strong { color: var(--ink); font-size: .82rem; }
.progress-step small { margin-top: 2px; font-size: .68rem; }
.progress-step.active > span { color: #fff; background: var(--warning); }
.progress-step.complete > span { color: #fff; background: var(--green-700); }
.progress-line { height: 2px; background: var(--line); }
.progress-line.complete { background: var(--green-700); }
.status-icon { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-size: 1.2rem; }
.status-icon.success { color: var(--green-700); background: var(--green-100); }
.status-icon.pending { color: var(--warning); background: #fff3d6; }
.status-icon.failed { color: var(--danger); background: #fde8e8; }
.status-hero h2 { margin: 2px 0 4px; font-size: 1.3rem; font-weight: 700; }
.status-hero p { margin: 0; color: var(--muted); }
.status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 6px 28px 28px; }
.status-group { padding: 22px 0 0; }
.status-group:nth-child(even) { padding-left: 26px; border-left: 1px solid var(--line); }
.status-actions { display: flex; gap: 10px; padding: 0 28px 28px; }
.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.record-count { color: var(--muted); font-size: .86rem; }
.table-responsive { max-width: 100%; }
.payments-table { margin: 0; min-width: 1020px; font-size: .84rem; }
.payments-table th { padding: 13px 16px; color: var(--muted); background: #f8faf8; border-bottom-width: 1px; font-size: .72rem; text-transform: uppercase; white-space: nowrap; }
.payments-table td { padding: 15px 16px; vertical-align: middle; border-color: #edf0ee; }
.payments-table code { color: #425149; font-size: .78rem; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.status-badge.success { color: #08683c; background: var(--green-100); }
.status-badge.pending { color: #865b0b; background: #fff3d6; }
.status-badge.failed { color: #a12626; background: #fde8e8; }
.empty-state { padding: 70px 24px; text-align: center; }
.empty-state i { margin-bottom: 16px; color: #a7b3ac; font-size: 2rem; }
.empty-state h3 { font-size: 1.12rem; font-weight: 700; }
.empty-state p { color: var(--muted); }
.empty-state.compact { padding: 38px 24px; }
.auth-status { max-width: 650px; margin: 40px auto; text-align: center; }
.auth-status .status-icon { margin: 0 auto 18px; }
.page-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 34px; color: #fff; background: var(--green-900); }
.dashboard-hero .eyebrow { color: #8fd0ae; }
.dashboard-hero h1 { margin: 8px 0; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 700; }
.dashboard-hero p:last-child { max-width: 630px; margin: 0; color: #d7ebe1; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.metric { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 20px; box-shadow: none; }
.metric-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; }
.metric-icon.green { color: var(--green-700); background: var(--green-100); }
.metric-icon.blue { color: #236e9a; background: #e1f1fa; }
.metric-icon.amber { color: #946208; background: #fff1d1; }
.metric div { min-width: 0; }
.metric span:not(.metric-icon) { display: block; color: var(--muted); font-size: .76rem; }
.metric strong { display: block; overflow: hidden; margin-top: 2px; font-size: 1.2rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr); gap: 20px; align-items: start; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 16px; align-items: center; gap: 13px; padding: 16px 22px; color: var(--ink); border-bottom: 1px solid #edf0ee; text-decoration: none; }
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: #fafcfb; }
.activity-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 50%; }
.activity-main, .activity-amount { min-width: 0; }
.activity-main strong, .activity-main small, .activity-amount strong, .activity-amount small { display: block; }
.activity-main small, .activity-amount small { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.activity-amount { text-align: right; }
.activity-amount .state-completed { color: var(--green-700); }
.activity-amount .state-failed { color: var(--danger); }
.activity-amount .state-pending { color: var(--warning); }
.activity-arrow { color: #a3afa8; font-size: .72rem; }
.detail-amount { color: var(--green-900); font-size: 1.25rem; }
.transaction-code { color: var(--green-900); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }
.description-cell { max-width: 280px; color: var(--muted); }
.row-action { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-700); border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
.row-action:hover { color: #fff; background: var(--green-700); }
.receipt-toolbar { display: flex; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto 18px; }
.receipt { max-width: 760px; margin: 0 auto; overflow: hidden; }
.receipt-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 30px; border-bottom: 1px solid var(--line); }
.receipt-brand { display: flex; align-items: center; gap: 12px; }
.receipt-brand strong, .receipt-brand small { display: block; }
.receipt-brand small { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.receipt-amount { padding: 34px 30px 24px; text-align: center; }
.receipt-amount span, .receipt-amount small, .receipt-code span, .receipt-code small { display: block; color: var(--muted); }
.receipt-amount strong { display: block; margin: 5px 0; color: var(--green-900); font-size: 2.35rem; }
.receipt-code { margin: 0 30px; padding: 22px; text-align: center; background: var(--green-50); border: 1px solid var(--green-100); border-radius: 8px; }
.receipt-code strong { display: block; margin: 7px 0; color: var(--green-900); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.65rem; letter-spacing: 0; }
.receipt-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 30px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.receipt-details div { min-width: 0; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.receipt-details dt { margin-bottom: 5px; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.receipt-details dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.receipt-details code { color: #425149; font-size: .75rem; }
.receipt-footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 30px; color: var(--muted); background: #f8faf8; font-size: .76rem; }
@media (max-width: 991.98px) {
    .navbar-collapse { padding: 14px 0 6px; }
    .nav-link { margin: 2px 0; }
    .nav-link.active::after { right: auto; bottom: 8px; left: 0; width: 3px; height: 24px; }
    .nav-account { margin: 8px 0; }
    .btn-logout { margin: 0; }
    .overview-grid, .payment-layout, .dashboard-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payment-summary { order: -1; }
}
@media (max-width: 767.98px) {
    .app-main { padding: 24px 0 38px; }
    .page-heading-row, .dashboard-hero { align-items: stretch; flex-direction: column; }
    .dashboard-hero .btn { align-self: flex-start; }
    .login-layout { min-height: 0; grid-template-columns: 1fr; }
    .login-intro, .login-form { padding: 30px 24px; }
    .login-intro h1 { font-size: 2rem; }
    .login-security { margin-top: 28px; flex-direction: column; gap: 8px; }
    .welcome-panel, .account-panel, .form-section, .payment-summary { padding: 24px; }
    .status-grid { grid-template-columns: 1fr; }
    .status-group:nth-child(even) { padding-left: 0; border-left: 0; }
    .status-actions { flex-direction: column; }
    .payment-progress { grid-template-columns: 30px 1fr; gap: 8px 12px; }
    .progress-step { display: contents; }
    .progress-step > span { grid-column: 1; }
    .progress-step > div { grid-column: 2; }
    .progress-line { grid-column: 1; width: 2px; height: 18px; margin: -3px auto; }
    .receipt-details { grid-template-columns: 1fr; }
    .receipt-footer { flex-direction: column; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric { padding: 16px; }
    .activity-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 14px 16px; }
    .activity-arrow { display: none; }
    .app-footer .container { flex-direction: column; gap: 6px; }
}
@media print {
    body { background: #fff; }
    .app-navbar, .app-footer, .receipt-toolbar, .flash-stack { display: none !important; }
    .app-main { padding: 0; }
    .receipt { max-width: none; border: 0; box-shadow: none; }
}
@media (max-width: 430px) {
    .metric-grid { grid-template-columns: 1fr; }
    .activity-amount strong { font-size: .85rem; }
    .payment-paybill { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
