@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap");

:root {
    --maroon: #7b2732;
    --maroon-dark: #671f29;
    --maroon-deep: #521820;
    --maroon-soft: #f7eeee;
    --maroon-soft-2: #fbf7f7;
    --maroon-border: #dfc8cc;

    --ink: #292527;
    --muted: #756e71;
    --surface: #ffffff;
    --surface-soft: #faf8f8;
    --page-background: #f5f4f5;
    --line: #e7e2e4;

    --success: #23613d;
    --success-soft: #eef7f1;
    --success-border: #cbe3d3;

    --warning: #725b17;
    --warning-soft: #fff8df;
    --warning-border: #eadba2;

    --danger: #8a2c35;
    --danger-soft: #fbefef;
    --danger-border: #e8c7ca;

    --sidebar-width: 252px;
    --topbar-height: 68px;

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;

    --shadow-sm: 0 3px 12px rgba(45, 29, 34, .035);
    --shadow: 0 9px 26px rgba(45, 29, 34, .055);
    --shadow-lg: 0 22px 60px rgba(45, 29, 34, .16);
}

/* =====================================================
   RESET DAN DASAR
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-background);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

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

h1,
h2,
h3,
h4,
strong {
    font-weight: 600;
}

code,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

a,
button,
.form-control,
.accordion-button,
.upload-zone,
.scan-card,
.input-tool,
.app-card,
.info-card,
.sidebar-link,
.copy-button {
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease,
        opacity .2s ease;
}

/* =====================================================
   LOADER
===================================================== */

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #ffffff;
    transition: opacity .25s ease, visibility .25s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: var(--maroon);
    border-radius: 12px;
    font-size: 18px;
    box-shadow: var(--shadow);
    animation: loaderPulse 1s ease-in-out infinite alternate;
}

/* =====================================================
   LAYOUT
===================================================== */

.app-shell {
    min-height: 100vh;
    background: var(--page-background);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    width: var(--sidebar-width);
    padding: 23px 18px;
    flex-direction: column;
    color: #ffffff;
    background: var(--maroon-deep);
    box-shadow: 6px 0 24px rgba(45, 15, 20, .08);
}

.app-main {
    display: flex;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    flex-direction: column;
    background: var(--page-background);
}

.app-content {
    flex: 1;
    padding: 26px 30px 36px;
    background: var(--page-background);
}

.content-container {
    width: min(1260px, 100%);
    margin: 0 auto;
}

.app-footer {
    padding: 16px 30px;
    color: var(--muted);
    background: var(--page-background);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    color: #ffffff;
    text-decoration: none;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--maroon);
    background: #ffffff;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 0 6px 18px rgba(30, 0, 5, .12);
}

.brand-link strong,
.brand-link small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-link strong {
    font-size: 15px;
    font-weight: 600;
}

.brand-link small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .62);
    font-size: 10.5px;
    font-weight: 400;
}

.sidebar-close,
.topbar-menu {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border-radius: 10px;
}

.sidebar-close {
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, .17);
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    min-height: 46px;
    padding: 0 14px;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .72);
    border-radius: 11px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.sidebar-link i {
    width: 19px;
    text-align: center;
    font-size: 17px;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
}

.sidebar-link.active {
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, .92);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    background: rgba(25, 10, 14, .48);
    backdrop-filter: blur(2px);
}

/* =====================================================
   HEADER — BATIK HANYA DI SINI
===================================================== */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    min-height: var(--topbar-height);
    padding: 0 30px;
    align-items: center;
    color: #ffffff;
    background-color: var(--maroon);
    background-image:
        linear-gradient(
            90deg,
            rgba(82, 24, 32, .36),
            rgba(123, 39, 50, .10),
            rgba(82, 24, 32, .30)
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.075' stroke-width='1.15'%3E%3Cellipse cx='40' cy='20' rx='13' ry='22'/%3E%3Cellipse cx='40' cy='60' rx='13' ry='22'/%3E%3Cellipse cx='20' cy='40' rx='22' ry='13'/%3E%3Cellipse cx='60' cy='40' rx='22' ry='13'/%3E%3Ccircle cx='40' cy='40' r='4'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: auto, 80px 80px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 5px 18px rgba(45, 15, 20, .11);
}

.app-topbar > * {
    position: relative;
    z-index: 1;
}

.topbar-menu {
    color: #ffffff;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 19px;
}

.topbar-menu:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .17);
}

.topbar-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.01em;
}

/* =====================================================
   KARTU DAN BAGIAN UMUM
===================================================== */

.app-card,
.info-card,
.page-note,
.instruction-bar,
.docs-section,
.api-summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.app-card {
    padding: 24px;
}

.app-card:hover,
.info-card:hover {
    box-shadow:
        0 2px 4px rgba(45, 29, 34, .025),
        0 11px 30px rgba(45, 29, 34, .065);
}

.card-heading,
.result-heading,
.amount-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-heading,
.section-head {
    margin-bottom: 19px;
}

.card-heading h2,
.result-heading h2,
.info-card h2,
.result-placeholder h2,
.setup-state h2,
.notice-card h2,
.docs-section h3,
.api-summary h2,
.section-title {
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.45;
}

.card-heading p,
.result-heading p,
.amount-heading p,
.info-card p,
.result-placeholder p,
.setup-state p,
.api-summary p,
.docs-section > p,
.modal-subtitle,
.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

/* =====================================================
   PETUNJUK
===================================================== */

.usage-note {
    display: flex;
    min-height: 48px;
    margin-bottom: 18px;
    padding: 12px 15px;
    align-items: center;
    gap: 10px;
    color: #554d51;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-sm);
}

.usage-note > i {
    flex: 0 0 auto;
    color: var(--maroon);
    font-size: 16px;
}

.usage-note-title,
.usage-note-text {
    font-size: 12px;
}

.usage-note-title {
    margin-right: 6px;
    color: var(--ink);
    font-weight: 600;
}

.usage-note-text {
    color: var(--muted);
}

.instruction-bar {
    display: grid;
    margin-bottom: 18px;
    padding: 15px 17px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.instruction-item {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 11px;
}

.instruction-item > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    background: var(--maroon);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.instruction-item p,
.instruction-item strong,
.instruction-item small {
    display: block;
    margin: 0;
}

.instruction-item strong {
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 600;
}

.instruction-item small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.page-note {
    display: flex;
    margin-bottom: 18px;
    padding: 14px 16px;
    align-items: flex-start;
    gap: 10px;
    color: #51474b;
}

.page-note i {
    color: var(--maroon);
    font-size: 15px;
}

.page-note p {
    margin: 0;
    font-size: 11.5px;
}

/* =====================================================
   FORM
===================================================== */

.form-label {
    margin-bottom: 7px;
    color: #403a3d;
    font-size: 12.5px;
    font-weight: 600;
}

.form-control,
.input-group-text {
    min-height: 47px;
    border-color: var(--line);
    font-size: 13.5px;
}

.form-control {
    color: var(--ink);
    background: #ffffff;
    border-radius: 11px;
}

.form-control::placeholder {
    color: #aaa3a6;
}

.form-control:focus {
    color: var(--ink);
    background: #ffffff;
    border-color: var(--maroon);
    box-shadow: 0 0 0 .18rem rgba(123, 39, 50, .10);
}

.input-group > .form-control {
    border-radius: 0 11px 11px 0;
}

.input-group-text {
    min-width: 54px;
    color: #ffffff;
    background: var(--maroon);
    border-color: var(--maroon);
    border-radius: 11px 0 0 11px;
    justify-content: center;
    font-weight: 600;
}

.qris-textarea {
    min-height: 138px;
    padding: 15px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.7;
    resize: vertical;
}

.form-hint {
    display: flex;
    margin-top: 8px;
    color: var(--muted);
    justify-content: space-between;
    gap: 10px;
    font-size: 10.5px;
}

.single-hint {
    display: block;
}

/* =====================================================
   INPUT QRIS, UPLOAD, KAMERA
===================================================== */

.input-tools,
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-tool,
.upload-zone,
.scan-card {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 74px;
    padding: 13px 15px;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    background: var(--maroon-soft-2);
    border: 1px solid var(--maroon-border);
    border-radius: 11px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
}

.input-tool {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
}

.input-tool > i,
.upload-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    grid-row: 1 / 3;
    place-items: center;
    color: #ffffff;
    background: var(--maroon);
    border-radius: 9px;
    font-size: 15px;
}

.input-tool > span:not(.upload-progress),
.upload-zone strong,
.scan-card strong {
    align-self: end;
    font-size: 12px;
    font-weight: 600;
}

.input-tool > small,
.upload-zone small,
.scan-card small {
    align-self: start;
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px;
}

.upload-zone strong,
.upload-zone small,
.scan-card strong,
.scan-card small {
    display: block;
}

.input-tool:hover,
.input-tool:focus,
.upload-zone:hover,
.upload-zone.is-dragging,
.scan-card:hover {
    color: var(--maroon);
    background: var(--maroon-soft);
    border-color: var(--maroon);
    outline: none;
    transform: translateY(-1px);
}

.upload-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--maroon);
    transform: scaleX(0);
    transform-origin: left;
}

.upload-zone.is-loading .upload-progress,
.input-tool.is-loading .upload-progress {
    animation: uploadProgress 1.2s ease-in-out infinite;
}

.scanner-status {
    margin-top: -4px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 10.5px;
}

.scanner-status.success {
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid var(--success-border);
}

.scanner-status.error {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
}

/* =====================================================
   NOMINAL
===================================================== */

.amount-panel {
    padding: 17px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.amount-heading {
    margin-bottom: 12px;
    align-items: center;
}

.amount-heading p {
    font-size: 11.5px;
}

.amount-preview {
    display: inline-flex;
    min-width: 92px;
    padding: 8px 12px;
    justify-content: center;
    color: var(--maroon);
    background: #ffffff;
    border: 1px solid var(--maroon-border);
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
}

.amount-input {
    font-size: 14.5px;
    font-weight: 500;
}

/* =====================================================
   TOMBOL
===================================================== */

.btn {
    min-height: 46px;
    padding: 10px 17px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
}

.btn-maroon {
    color: #ffffff;
    background: var(--maroon);
    border-color: var(--maroon);
}

.btn-maroon:hover,
.btn-maroon:focus {
    color: #ffffff;
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
}

.btn-outline-maroon {
    color: var(--maroon);
    background: #ffffff;
    border-color: var(--maroon-border);
}

.btn-outline-maroon:hover,
.btn-outline-maroon:focus {
    color: #ffffff;
    background: var(--maroon);
    border-color: var(--maroon);
}

.btn-soft-maroon {
    color: var(--maroon);
    background: var(--maroon-soft);
    border-color: var(--maroon-soft);
}

.btn-soft-maroon:hover {
    color: var(--maroon-dark);
    background: #f0e0e3;
    border-color: #f0e0e3;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, .35);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple .6s ease-out;
    pointer-events: none;
}

.button-loading {
    display: none;
}

.is-submitting .button-content {
    display: none;
}

.is-submitting .button-loading {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* =====================================================
   HASIL QRIS
===================================================== */

.result-card {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
}

.result-heading {
    margin-bottom: 17px;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    padding: 7px 10px;
    align-items: center;
    gap: 5px;
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid var(--success-border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.merchant-summary {
    display: grid;
    margin-bottom: 14px;
    padding: 14px;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.merchant-summary small,
.merchant-summary strong {
    display: block;
}

.merchant-summary small {
    color: var(--muted);
    font-size: 10px;
}

.merchant-summary strong {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.qr-stage {
    position: relative;
    display: grid;
    min-height: 318px;
    margin-bottom: 14px;
    padding: 18px;
    place-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
}

#generatedQr img,
#generatedQr canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

.scan-line,
.camera-scan-line {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 1px;
    background: rgba(123, 39, 50, .48);
    box-shadow: 0 0 8px rgba(123, 39, 50, .28);
    animation: scanLine 3s ease-in-out infinite;
    pointer-events: none;
}

.result-amount {
    display: flex;
    margin-bottom: 14px;
    padding: 13px 15px;
    align-items: center;
    justify-content: space-between;
    background: var(--maroon-soft);
    border-radius: 11px;
}

.result-amount small {
    color: var(--muted);
    font-size: 10.5px;
}

.result-amount strong {
    color: var(--maroon);
    font-size: 15.5px;
    font-weight: 600;
}

.payload-details {
    padding: 11px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.payload-details summary {
    color: var(--maroon);
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 600;
}

.payload-details code {
    display: block;
    max-height: 120px;
    margin-top: 10px;
    padding: 10px;
    overflow: auto;
    color: #4c4548;
    background: #ffffff;
    border-radius: 8px;
    font-size: 9.5px;
    overflow-wrap: anywhere;
}

.result-placeholder {
    display: grid;
    min-height: 238px;
    padding: 28px 22px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.placeholder-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 11px;
    place-items: center;
    color: var(--maroon);
    background: var(--maroon-soft);
    border-radius: 12px;
    font-size: 18px;
}

.result-placeholder p {
    max-width: 320px;
    font-size: 12px;
}

/* =====================================================
   MODAL KAMERA
===================================================== */

.camera-modal {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 19px 19px 13px;
}

.modal-title {
    margin: 0 0 2px;
    font-size: 15.5px;
    font-weight: 600;
}

.camera-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #171012;
    border-radius: 13px;
}

.camera-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-guide {
    position: absolute;
    inset: 14%;
}

.camera-guide span {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: #ffffff;
    border-style: solid;
}

.camera-guide span:nth-child(1) {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.camera-guide span:nth-child(2) {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.camera-guide span:nth-child(3) {
    right: 0;
    bottom: 0;
    border-width: 0 2px 2px 0;
}

.camera-guide span:nth-child(4) {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}

.camera-message {
    margin-top: 11px;
    color: var(--muted);
    text-align: center;
    font-size: 10.5px;
}

/* =====================================================
   INFORMATION
===================================================== */

.info-card {
    display: flex;
    height: 100%;
    padding: 20px;
    gap: 14px;
}

.info-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--maroon);
    background: var(--maroon-soft);
    border-radius: 11px;
    font-size: 17px;
}

.conversion-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.timeline-item {
    display: flex;
    padding: 13px;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.timeline-item > span {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    background: var(--maroon);
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 600;
}

.timeline-item strong,
.timeline-item small {
    display: block;
}

.timeline-item strong {
    font-size: 11px;
    font-weight: 600;
}

.timeline-item small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.5;
}

/* =====================================================
   ACCORDION
===================================================== */

.app-accordion .accordion-item {
    border-color: var(--line);
}

.app-accordion .accordion-button {
    padding: 14px 15px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: none;
    font-size: 11.5px;
    font-weight: 600;
}

.app-accordion .accordion-button:not(.collapsed) {
    color: var(--maroon);
    background: var(--maroon-soft);
}

.app-accordion .accordion-button:focus {
    box-shadow: 0 0 0 .16rem rgba(123, 39, 50, .08);
}

.app-accordion .accordion-body {
    color: var(--muted);
    font-size: 11px;
}

/* =====================================================
   NOTICE
===================================================== */

.notice-card {
    height: 100%;
    padding: 21px;
    color: #ffffff;
    background: var(--maroon);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.notice-card h2 {
    color: #ffffff;
    font-size: 15.5px;
}

.notice-card ul {
    margin: 13px 0 18px;
    padding-left: 18px;
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
}

.notice-card li + li {
    margin-top: 6px;
}

/* =====================================================
   API DOCS
===================================================== */

.api-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.api-base-url {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.api-base-url span {
    color: var(--muted);
    font-size: 9.5px;
    white-space: nowrap;
}

.api-base-url code {
    min-width: 0;
    color: var(--maroon);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-nav {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
    display: grid;
    padding: 13px;
    gap: 4px;
}

.docs-nav-title {
    padding: 5px 8px 8px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.docs-nav a {
    padding: 9px 10px;
    color: #5a5255;
    border-radius: 8px;
    text-decoration: none;
    font-size: 10.5px;
}

.docs-nav a:hover,
.docs-nav a.active {
    color: var(--maroon);
    background: var(--maroon-soft);
}

.docs-content {
    display: grid;
    gap: 13px;
}

.docs-section {
    scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.endpoint-heading {
    display: flex;
    margin-bottom: 13px;
    align-items: center;
    gap: 8px;
}

.endpoint-heading code {
    color: #51494c;
    font-size: 10.5px;
}

.method-badge {
    display: inline-flex;
    padding: 5px 8px;
    color: #ffffff;
    background: var(--maroon);
    border-radius: 6px;
    font-size: 8.5px;
    font-weight: 600;
}

.docs-table {
    margin-bottom: 15px;
    font-size: 10px;
}

.docs-table th {
    color: #554d50;
    background: var(--surface-soft);
    font-weight: 600;
}

.docs-table td,
.docs-table th {
    padding: 10px;
    border-color: var(--line);
}

.code-shell {
    overflow: hidden;
    background: #1d181a;
    border-radius: 11px;
}

.code-toolbar {
    display: flex;
    min-height: 38px;
    padding: 0 11px;
    align-items: center;
    justify-content: space-between;
    color: #cfc5c8;
    background: #282124;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: 9.5px;
}

.code-shell pre {
    max-height: 380px;
    margin: 0;
    padding: 14px;
    overflow: auto;
}

.code-shell code {
    color: #f4edef;
    font-size: 9.5px;
    line-height: 1.68;
}

.copy-button {
    display: inline-flex;
    min-width: 32px;
    min-height: 29px;
    padding: 5px 8px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--maroon);
    background: #ffffff;
    border: 1px solid var(--maroon-border);
    border-radius: 7px;
    font-size: 9px;
}

.code-toolbar .copy-button {
    color: #ffffff;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .08);
}

.copy-button:hover {
    color: #ffffff;
    background: var(--maroon);
    border-color: var(--maroon);
}

.code-tab-buttons {
    display: flex;
    margin-bottom: 9px;
    gap: 6px;
}

.code-tab-buttons button {
    padding: 7px 10px;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 9.5px;
}

.code-tab-buttons button.active {
    color: #ffffff;
    background: var(--maroon);
    border-color: var(--maroon);
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

.docs-note {
    display: flex;
    padding: 10px 11px;
    align-items: center;
    gap: 8px;
    color: var(--warning);
    background: var(--warning-soft);
    border: 1px solid var(--warning-border);
    border-radius: 8px;
    font-size: 9.5px;
}

.error-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.error-grid div {
    padding: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.error-grid strong,
.error-grid span {
    display: block;
}

.error-grid strong {
    color: var(--maroon);
    font-size: 13px;
    font-weight: 600;
}

.error-grid span {
    color: var(--muted);
    font-size: 9px;
}

/* =====================================================
   SETUP, ALERT, TOAST
===================================================== */

.setup-state {
    padding: 9px 0;
    text-align: center;
}

.setup-state .code-shell {
    margin-top: 15px;
}

.artisan-command {
    display: inline-block;
    margin-top: 13px;
    padding: 8px 10px;
    color: var(--maroon);
    background: var(--maroon-soft);
    border-radius: 7px;
    font-size: 9.5px;
}

.app-alert {
    margin-bottom: 15px;
    border-radius: 11px;
    font-size: 10.5px;
}

.toast {
    color: #ffffff;
    background: var(--maroon);
    border-radius: 10px;
    font-size: 10.5px;
}

/* =====================================================
   ANIMASI
===================================================== */

.reveal {
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity .38s ease var(--reveal-delay, 0ms),
        transform .38s ease var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes loaderPulse {
    from {
        transform: scale(.92);
        opacity: .7;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes uploadProgress {
    0% {
        transform: scaleX(0);
    }

    50% {
        transform: scaleX(.72);
    }

    100% {
        transform: scaleX(1);
    }
}

@keyframes scanLine {
    0%,
    100% {
        top: 17%;
        opacity: .22;
    }

    50% {
        top: 82%;
        opacity: .7;
    }
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(22);
        opacity: 0;
    }
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1199.98px) {
    .result-card,
    .docs-nav {
        position: static;
    }

    .conversion-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    body {
        font-size: 13.5px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .app-topbar {
        min-height: 64px;
        padding: 0 20px;
        background-size: auto, 70px 70px;
    }

    .topbar-title {
        font-size: 17px;
    }

    .app-content {
        padding: 20px;
    }

    .app-footer {
        padding: 15px 20px;
    }

    .app-card {
        padding: 21px;
    }

    .instruction-bar {
        grid-template-columns: 1fr;
    }

    .api-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .api-base-url {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    :root {
        --topbar-height: 60px;
    }

    body {
        font-size: 13px;
    }

    .app-topbar {
        padding: 0 14px;
    }

    .topbar-title {
        font-size: 16px;
    }

    .app-content {
        padding: 14px 12px 22px;
    }

    .app-card {
        padding: 18px;
    }

    .card-heading h2,
    .result-heading h2,
    .section-title {
        font-size: 15.5px;
    }

    .form-control,
    .input-group-text {
        min-height: 45px;
        font-size: 13px;
    }

    .qris-textarea {
        min-height: 124px;
    }

    .input-tools,
    .upload-grid,
    .merchant-summary,
    .conversion-timeline,
    .error-grid {
        grid-template-columns: 1fr;
    }

    .form-hint {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .amount-heading,
    .result-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .amount-preview {
        min-width: 0;
    }

    .btn {
        min-height: 44px;
        font-size: 12px;
    }

    .qr-stage {
        min-height: 278px;
    }

    .usage-note {
        align-items: flex-start;
    }

    .usage-note-title,
    .usage-note-text {
        display: block;
    }

    .usage-note-title {
        margin-bottom: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}