* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Biar konten ga ketutup tombol bawah */
body {
    padding-bottom: 80px;
}

/* Floating order bar */
/* Floating order bar */
.order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;                 /* full width layar */
    background: linear-gradient(
        to top,
        rgba(2,6,23,0.95),
        rgba(2,6,23,0.8)
    );
    padding: 12px 16px;
    border-top: 1px solid #1e293b;
    z-index: 100;
    display: flex;
    justify-content: center;     /* center button */
}

/* Button */
.btn-view-order {
    width: 100%;
    max-width: 480px;            /* batas lebar */
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #E1D9BC;
    color: #020617;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-view-order:active {
    transform: scale(0.98);
}

body.dark {
    background: #0f172a;
    color: #e5e7eb;
}

.app {
    max-width: 480px;   /* mobile focus */
    margin: auto;
    min-height: 100vh;
    background: #0f172a;
}

/* HEADER */
.header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

.resto-info h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.resto-info p {
    font-size: 14px;
    color: #F0F0DB;
}

.meja {
    background: #1e293b;
    padding: 8px 14px;
    border-radius: 8px;
}

/* KATEGORI */
.kategori-bar {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    background: #020617;
}

.kategori {
    padding: 8px 14px;
    border-radius: 20px;
    background: #1e293b;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    white-space: nowrap;
}

.kategori.active {
    background: #997cee;
    color: #020617;
}

/* PRODUK GRID */
.produk-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.produk-card {
    background: #020617;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
}

.produk-img {
    width: 100%;
    aspect-ratio: 5 / 4;
    /* border-radius: 14px; */
    overflow: hidden;
    background: #020617;
    display: flex;
}

.produk-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produk-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.produk-body h3 {
    font-size: 16px;
}

.kategori-text {
    font-size: 12px;
    color: #94a3b8;
}

.harga {
    font-size: 15px;
    font-weight: bold;
    margin-top: 4px;
}

.btn-order {
    margin-top: auto;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #ACBAC4;
    color: #022c22;
    font-weight: bold;
    cursor: pointer;
}

.btn-order:hover {
    background: #F0F0DB;
}

.search-bar {
    padding: 0 16px 12px;
    background: #020617;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: #64748b;
}

.detail-img img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

.detail-body {
    padding: 16px;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.qty-box button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #1e293b;
    color: #e5e7eb;
    font-size: 20px;
}

.qty-box span {
    font-size: 18px;
    width: 30px;
    text-align: center;
}

.total {
    margin-bottom: 12px;
    font-size: 16px;
}

textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;

    font-size: 16px;      /* 🔥 ini kuncinya */
    line-height: 1.4;
    resize: none;         /* biar ga aneh di mobile */
}

.btn-order {
    text-align: center;
    text-decoration: none;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
}

.cart-info {
    flex: 1;
}

.cart-right {
    text-align: right;
    margin-left: 12px;
}

.cart-price {
    font-weight: bold;
    margin-bottom: 6px;
}

.btn-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}

.btn-remove:hover {
    color: #f87171;
}

.cart-note {
    font-size: 13px;
    color: #94a3b8;
}

.cart-price {
    font-weight: bold;
}

.btn-view-order {
    text-align: center;
    text-decoration: none;
    display: block;
}

.customer-info {
    margin: 16px 0 20px;
    padding: 12px;
    border-radius: 12px;
    background: #020617;
    border: 1px solid #1e293b;
}

.customer-info input {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;
    font-size: 16px; /* biar nyaman di mobile */
}

.customer-info input::placeholder {
    color: #64748b;
}

.info-text {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

.need-scan {
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.need-scan-card {
    width: 100%;
    max-width: 480px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.need-scan-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.need-scan-card h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.need-scan-text {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 14px;
}

.need-scan-hint {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    margin-bottom: 14px;
}

.hint-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.hint-text {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

.need-scan-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    background: #38bdf8;
    color: #020617;
}

.cart-badge {
    background: #30364F;
    color: #F0F0DB;
    font-size: 12px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 4px;
    font-weight: bold;
}

.history-btn {
    display: block;
    background: #30364F;
    color: #dccfbd;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    /* font-weight: bold; */
    margin: 12px 0;
    text-align: center;
}

.payment-info {
    background: #1f1f1f;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.qris-box {
    display: flex;
    flex-direction: column;   /* ⬅️ KUNCI */
    align-items: center;      /* center horizontal */
    margin: 16px 0;
}

.qris-box img {
    width: 240px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

.expired-text {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    margin-top: 8px;
}

.payment-hint {
    font-size: 13px;
    color: #ccc;
    text-align: center;
    margin-top: 12px;
}

.payment-page .btn-secondary {
    display: block;
    margin-top: 10px;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    background: #2a2a2a;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.payment-note {
    font-size: 12px;
    color: #bbb;
    margin-top: 6px;
}

.qris-logo {
    width: 100px;
    margin-bottom: 12px;
    opacity: 0.95;
}

.qris-box img:last-child {
    width: 240px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}


.order-number {
    margin-bottom: 18px;
    font-size: 14px;
}

.status-text {
    margin: 20px 0 10px;
    font-size: 18px;
}

.status-paid {
    color: #4caf50;
}

.status-expired {
    color: #f44336;
}

.status-pending {
    color: #ff9800;
}

.status-desc {
    margin-bottom: 22px;
    font-size: 14px;
    color: #ccc;
}

.total-text {
    margin-top: 26px;
    font-size: 15px;
}

.history-card {
    background: #1e1e1e;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.badge.paid {
    background: #4caf50;
    color: #000;
}

.badge.pending {
    background: #ff9800;
    color: #000;
}

.badge.expired {
    background: #f44336;
    color: #fff;
}

.history-total {
    margin: 8px 0;
}

.history-page .btn-secondary {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.order-detail-page .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-detail-page .item-note {
    font-size: 13px;
    color: #aaa;
}

.order-detail-page .item-price {
    font-weight: bold;
}

/* ===== ORDER DETAIL SPACING ===== */

.order-detail-page .page-title {
    margin-bottom: 20px;
}

.order-detail-page .order-info p {
    margin: 6px 0;
    font-size: 14px;
}

.order-detail-page hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #333;
}

.order-detail-page h3 {
    margin-bottom: 14px;
}

/* item list */
.order-detail-page .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.order-detail-page .item-note {
    margin-top: 4px;
    font-size: 13px;
    color: #aaa;
}

/* total */
.order-detail-page .total-text {
    margin-top: 24px;
    text-align: right;
    font-size: 16px;
}

.order-detail-page .total-text strong {
    font-size: 20px;
}

.produk-placeholder {
    width: 100%;
    height: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8271f1, #081b70);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.placeholder-name {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    color: #e5e7eb;
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    /* standar (future-proof) */
    display: box;
    line-clamp: 3;

    overflow: hidden;
}

.placeholder-kategori {
    font-size: 12px;
    color: #94a3b8;
    opacity: 0.9;
}

/* ==============================
   DETAIL PRODUCT PLACEHOLDER
   ============================== */

.detail-img {
    width: 100%;
    aspect-ratio: 5 / 4;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* override hanya saat di detail */
.detail-img .produk-placeholder {
    padding: 20px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #111827;
    width: 90%;
    max-width: 420px;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.modal-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 14px;
    color: #cbd5f5;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    background: #334155;
    color: #fff;
    border: none;
    font-weight: bold;
}

.btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    background: #9687f5;
    color: #000;
    border: none;
    font-weight: bold;
}

.form-error {
    margin-top: -10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #3b0d0d;
    color: #fecaca;
    border-radius: 8px;
    font-size: 13px;
}

.app-footer {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    opacity: 0.7;
    padding: 16px 0 80px; /* aman dari order bar */
}

.btn-confirm {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-confirm[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
