/* ===== Reset & Dasar ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #e9e1e0;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
    background-color: white;
    border-bottom: 1px solid #dcd3d2;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.24s ease, opacity 0.24s ease;
    will-change: transform;
}

.navbar.navbar-hidden {
    transform: translateY(-110%);
    opacity: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h2 {
    color: #2c3e50;
}

.navbar-menu a {
    margin-left: 30px;
    color: #34495e;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-menu a:hover {
    color: #2c3e50;
}

.btn-login {
    background-color: #2c3e50;
    color: white !important;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #2c3e50;
}

.btn-login:hover {
    background-color: #1e2b37;
}

/* ===== Hero Section ===== */
.hero {
    padding: 60px 0;
    background-color: #f9f5f4;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 400px;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #2c3e50;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    border: 1px solid #2c3e50;
    transition: 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #1e2b37;
}

/* Atribut hidden berasal dari stylesheet bawaan browser, sehingga kalah oleh
   rule penulis mana pun yang menyetel display (mis. .btn-secondary di bawah).
   Akibatnya tombol yang di-hidden lewat JS tetap terlihat. Rule ini
   mengembalikan hidden sebagai penentu akhir. */
[hidden] {
    display: none !important;
}

.btn-secondary {
    background-color: white;
    color: #2c3e50;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    border: 1px solid #dcd3d2;
    transition: 0.2s;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #f0eae9;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2500;
}

.confirm-dialog {
    width: min(420px, 100%);
    background: #ffffff;
    border: 1px solid #dcd3d2;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
}

.confirm-dialog h3 {
    margin: 0 0 6px;
    color: #2c3e50;
    font-size: 1.15rem;
}

.confirm-dialog p {
    margin: 0;
    color: #5f6c74;
}

.confirm-field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: #2c3e50;
    font-weight: 800;
}

.confirm-field input {
    width: 100%;
    border: 1px solid #dcd3d2;
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    color: #2c3e50;
    background: #ffffff;
}

.confirm-field input:focus {
    outline: 3px solid rgba(42, 61, 80, 0.14);
    border-color: #2c3e50;
}

.confirm-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2400;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    display: grid;
    grid-template-columns: 26px 1fr 28px;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #dcd3d2;
    border-left: 5px solid #7f8c8d;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    color: #2c3e50;
    pointer-events: auto;
    animation: toastIn 0.2s ease-out;
}

.app-toast.closing {
    animation: toastOut 0.18s ease-in forwards;
}

.app-toast > i {
    margin-top: 2px;
    color: #7f8c8d;
    font-size: 1.05rem;
}

.app-toast.success {
    border-left-color: #0f766e;
}

.app-toast.success > i {
    color: #0f766e;
}

.app-toast.failed {
    border-left-color: #b91c1c;
}

.app-toast.failed > i {
    color: #b91c1c;
}

.app-toast.warning {
    border-left-color: #d97706;
}

.app-toast.warning > i {
    color: #d97706;
}

.app-toast.info {
    border-left-color: #2c3e50;
}

.app-toast.info > i {
    color: #2c3e50;
}

.app-toast-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.app-toast-body strong {
    font-size: 0.98rem;
    line-height: 1.25;
}

.app-toast-body span {
    color: #65727a;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.app-toast-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #7f8c8d;
    cursor: pointer;
}

.app-toast-close:hover {
    background: #f4eeee;
    color: #2c3e50;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .toast-container {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .app-toast {
        grid-template-columns: 24px 1fr 28px;
        padding: 12px;
        border-radius: 10px;
    }
}

.hero-image {
    flex: 1 1 300px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* ===== Section Umum ===== */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 40px;
}

/* ===== Legal Pages ===== */
.legal-page {
    background: #f9f5f4;
    min-height: 100vh;
}

.legal-section {
    padding: 42px 0 56px;
}

.legal-card {
    background: #fff;
    border: 1px solid #dcd3d2;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
    padding: 26px 24px;
}

.legal-meta {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-top: -18px;
    margin-bottom: 18px;
}

.legal-card h2 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 18px 0 8px;
}

.legal-card p {
    color: #475866;
    margin-bottom: 10px;
}

.legal-card ul {
    list-style: disc;
    margin: 0 0 12px 20px;
    color: #475866;
}

.legal-card li {
    margin-bottom: 6px;
}

.legal-highlight {
    border: 1px solid #d6e8e4;
    border-radius: 12px;
    background: #f5fbf8;
    padding: 16px 18px;
    margin: 14px 0;
}

.legal-highlight h3 {
    color: #1f3f48;
    font-size: 1rem;
    margin: 0 0 8px;
}

.legal-highlight h3:not(:first-child) {
    margin-top: 14px;
}

.legal-highlight ul {
    margin-bottom: 0;
}

/* ===== Layanan ===== */
.services {
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: #f9f5f4;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: 0.2s;
    border: 1px solid #dcd3d2;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.service-item i {
    font-size: 2.5rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.service-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.service-item p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* ===== Produk Populer ===== */
.products {
    background-color: #f9f5f4;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.products-grid.landing-products-grouped {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.landing-product-type-group {
    background: rgba(255, 253, 247, 0.72);
}

.landing-product-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.landing-products-status {
    color: #6b7885;
    margin-bottom: 16px;
}

.landing-promo-banner {
    margin-bottom: 22px;
}

.landing-promo-banner.promo-empty {
    padding: 20px;
    border-radius: 12px;
    box-shadow: none;
}

.landing-promo-banner.promo-empty .promo-badge {
    padding: 8px 15px;
    font-size: 0.95rem;
}

.landing-promo-banner.promo-empty .promo-copy h3 {
    font-size: 1.35rem;
    margin: 14px 0 10px;
}

.landing-promo-banner.promo-empty .promo-copy p {
    font-size: 1.02rem;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #dcd3d2;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.product-card.promo-active {
    border-color: #f5d58d;
}

.landing-product-promo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-card img {
    max-width: 80px;
    margin-bottom: 15px;
}

.product-card h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-card-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: #f0eae9;
    border: 1px solid #dcd3d2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-icon.has-brand-logo {
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.product-card-icon i {
    font-size: 1.55rem;
    color: #7f8c8d;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.price.promo-card-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.price-old {
    color: #7f8c8d;
    font-size: 0.86rem;
    text-decoration: line-through;
    font-weight: 600;
}

.price-new {
    color: #145c49;
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-product {
    display: inline-block;
    background-color: #e9e1e0;
    color: #2c3e50;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    border: 1px solid #dcd3d2;
    transition: 0.2s;
}

.btn-product:hover {
    background-color: #dcd3d2;
}

/* ===== Testimoni ===== */
.testimonials {
    background-color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: #f9f5f4;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #dcd3d2;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.testimonial-header i {
    font-size: 2.5rem;
    color: #7f8c8d;
}

.testimonial-header h4 {
    color: #2c3e50;
}

.testimonial-header span {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.testimonial-card p {
    font-style: italic;
    color: #34495e;
}

/* ===== Footer ===== */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3,
.footer-links h4,
.footer-contact h4 {
    margin-bottom: 15px;
    color: #e9e1e0;
}

.footer-about p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #bdc3c7;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 8px;
    color: #bdc3c7;
}

.footer-contact i {
    margin-right: 8px;
    color: #e9e1e0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* ===== Login Page ===== */
.login-page {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08) 0 24%, transparent 24% 100%),
        linear-gradient(215deg, rgba(239, 111, 94, 0.1) 0 18%, transparent 18% 100%),
        linear-gradient(180deg, #fffdf7 0%, #edf6f0 52%, #f7fbff 100%);
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
    color: #171b20;
}

.login-container {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.78fr);
    align-items: stretch;
    gap: 18px;
}

.login-brand-panel,
.login-card {
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 8px;
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.12);
}

.login-brand-panel {
    min-height: 680px;
    background:
        linear-gradient(145deg, rgba(16, 20, 24, 0.96), rgba(15, 118, 110, 0.88)),
        radial-gradient(circle at 82% 18%, rgba(200, 238, 74, 0.24), transparent 34%);
    color: #ffffff;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

.login-brand,
.login-card-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.login-brand .brand-mark,
.login-card-brand .brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #101418, #0f766e);
    font-weight: 800;
}

.login-brand .brand-mark {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.login-brand .brand-mark-logo,
.login-card-brand .brand-mark-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.login-brand .brand-mark-logo img,
.login-card-brand .brand-mark-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.login-brand .brand-copy,
.login-card-brand {
    display: grid;
    line-height: 1.1;
}

.login-brand .brand-copy strong,
.login-card-brand span:last-child {
    color: inherit;
    font-size: 0.98rem;
    font-weight: 900;
}

.login-brand .brand-copy small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    margin-top: 3px;
}

.login-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #c8ee4a;
    font-weight: 900;
    font-size: 0.86rem;
}

.login-brand-copy h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.login-brand-copy p:not(.login-eyebrow) {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.04rem;
    max-width: 520px;
}

.login-feature-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.login-feature-grid div {
    min-height: 86px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 14px;
}

.login-feature-grid i {
    color: #c8ee4a;
    font-size: 1.2rem;
}

.login-feature-grid span {
    font-weight: 850;
}

.login-card {
    background: rgba(255, 253, 247, 0.92);
    backdrop-filter: blur(16px);
    padding: 28px;
    overflow-y: auto;
    max-height: calc(100vh - 56px);
}

.login-header {
    text-align: left;
    margin-bottom: 22px;
}

.login-card-brand {
    color: #171b20;
    margin-bottom: 22px;
}

.login-header h2 {
    color: #171b20;
    margin-bottom: 6px;
    font-size: 1.75rem;
    line-height: 1.1;
}

.login-header p {
    color: #68727d;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #171b20;
    font-weight: 800;
    font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(23, 27, 32, 0.14);
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.2s;
    background: #ffffff;
    color: #171b20;
}

.form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: auto;
    bottom: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transform: none;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #68727d;
    cursor: pointer;
}

.password-toggle:hover {
    background: rgba(15, 118, 110, 0.08);
    color: #171b20;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 10px;
    background: #f3f7f3;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.captcha-box strong {
    color: #171b20;
    font-size: 1.2rem;
    letter-spacing: 0.16em;
}

.captcha-code {
    font-family: Consolas, 'Courier New', monospace;
    user-select: none;
}

.captcha-refresh {
    flex: 0 0 auto;
}

.turnstile-box {
    min-height: 68px;
    display: flex;
    align-items: center;
}

.turnstile-box iframe {
    max-width: 100%;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px;
    color: #343d46;
    font-size: 0.92rem;
    line-height: 1.45;
}

.consent-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #2c3e50;
    flex: 0 0 auto;
}

.consent-check a {
    color: #0f766e;
    font-weight: 600;
}

.consent-check a:hover {
    color: #101418;
}

.btn-login-submit {
    width: 100%;
    min-height: 48px;
    background-color: #101418;
    color: white;
    border: 1px solid #101418;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 850;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 14px 28px rgba(16, 20, 24, 0.16);
}

.btn-login-submit:hover {
    background-color: #0f766e;
    border-color: #0f766e;
    transform: translateY(-1px);
}

.google-auth-section {
    margin-top: 16px;
}

.google-auth-section[hidden],
.google-web-button[hidden],
.btn-google-native[hidden] {
    display: none !important;
}

.google-auth-section.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #7b858d;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: #e4dbda;
}

.google-web-button {
    width: 100%;
    min-height: 44px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.google-web-button > div,
.google-web-button iframe {
    max-width: 100% !important;
}

.btn-google-native {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #d7d0ce;
    border-radius: 8px;
    background: #ffffff;
    color: #202124;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.btn-google-native:hover {
    border-color: #aeb8b6;
    background: #f8faf8;
}

.btn-google-native i {
    color: #4285f4;
    font-size: 1.05rem;
}

/* Login dari Telegram Mini App. */
.auth-telegram-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #b9dcef;
    border-radius: 8px;
    background: #eef7fc;
    color: #1f3b4d;
    font-size: 0.88rem;
}

.auth-telegram-box[hidden],
.btn-telegram-login[hidden] {
    display: none !important;
}

.auth-telegram-box p {
    margin: 0;
}

.btn-telegram-login {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 8px;
    background: #229ed9;
    color: #ffffff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.btn-telegram-login:hover {
    background: #1d8bc0;
}

.login-note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #95a5a6;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #edf6f0;
    border: 1px solid rgba(23, 27, 32, 0.1);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 18px;
}

.auth-tab {
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #68727d;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab.active {
    background: white;
    color: #171b20;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.auth-view {
    display: none;
}

.auth-view.active {
    display: block;
}

.auth-message {
    min-height: 22px;
    margin-bottom: 14px;
    color: #68727d;
    font-size: 0.92rem;
}

.auth-dev-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #f4d3a5;
    border-radius: 10px;
    background: #fff8ed;
    color: #7c4a03;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Admin push notification workspace */
.admin-push-workspace {
    overflow: hidden;
}

.admin-push-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 22px;
    border-top: 1px solid #dfe6e3;
    border-bottom: 1px solid #dfe6e3;
}

.admin-push-metrics > div {
    min-width: 0;
    padding: 18px;
    border-right: 1px solid #dfe6e3;
}

.admin-push-metrics > div:last-child {
    border-right: 0;
}

.admin-push-metrics span,
.admin-push-section-heading span,
.admin-push-device span {
    display: block;
    margin-bottom: 5px;
    color: #74817f;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-push-metrics strong {
    display: block;
    color: #17211f;
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.admin-push-device {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid #b9d8d2;
    border-radius: 8px;
    background: #f4fbf9;
}

.admin-push-device[hidden] {
    display: none;
}

.admin-push-device strong {
    color: #173b35;
}

.admin-push-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 0;
    border-top: 1px solid #dfe6e3;
}

.admin-push-compose,
.admin-push-history {
    min-width: 0;
    padding-top: 22px;
}

.admin-push-compose {
    padding-right: 28px;
    border-right: 1px solid #dfe6e3;
}

.admin-push-history {
    padding-left: 28px;
}

.admin-push-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-push-section-heading h3 {
    margin: 0;
    color: #17211f;
    font-size: 1.2rem;
}

.admin-push-section-heading .btn-secondary {
    flex: 0 0 auto;
    min-height: 42px;
}

#adminPushBroadcastForm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr);
    gap: 14px;
    align-items: end;
}

#adminPushBroadcastForm .form-group {
    min-width: 0;
    margin: 0;
}

#adminPushBroadcastForm .form-group:nth-child(2) {
    grid-column: 1 / -1;
}

#adminPushBroadcastForm input,
#adminPushBroadcastForm select,
#adminPushBroadcastForm textarea {
    width: 100%;
}

#adminPushBroadcastForm textarea {
    min-height: 112px;
    resize: vertical;
}

#sendAdminPushBroadcastBtn {
    min-height: 48px;
    justify-content: center;
}

#adminPushSendInfo {
    margin-top: 14px;
}

.admin-push-history-list {
    min-height: 150px;
}

.admin-push-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #e4e9e7;
}

.admin-push-history-item:first-child {
    padding-top: 0;
}

.admin-push-history-item:last-child {
    border-bottom: 0;
}

.admin-push-history-item strong,
.admin-push-history-item p {
    overflow-wrap: anywhere;
}

.admin-push-history-item strong {
    color: #17211f;
}

.admin-push-history-item p {
    margin: 4px 0 0;
    color: #687572;
    line-height: 1.45;
}

.admin-push-history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    color: #74817f;
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .admin-push-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-push-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .admin-push-metrics > div:nth-child(-n + 2) {
        border-bottom: 1px solid #dfe6e3;
    }

    .admin-push-actions {
        grid-template-columns: 1fr;
    }

    .admin-push-compose {
        padding-right: 0;
        padding-bottom: 24px;
        border-right: 0;
        border-bottom: 1px solid #dfe6e3;
    }

    .admin-push-history {
        padding-left: 0;
    }
}

@media (max-width: 600px) {
    .admin-push-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .admin-push-metrics > div {
        padding: 14px 10px;
    }

    .admin-push-metrics strong {
        font-size: 1.08rem;
    }

    .admin-push-device,
    .admin-push-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-push-device .btn-secondary,
    .admin-push-section-heading .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    #adminPushBroadcastForm {
        grid-template-columns: 1fr;
    }

    #adminPushBroadcastForm .form-group:nth-child(2) {
        grid-column: auto;
    }

    .admin-push-history-item {
        grid-template-columns: 1fr;
    }

    .admin-push-history-meta {
        align-items: flex-start;
        white-space: normal;
    }
}

.auth-dev-banner[hidden] {
    display: none !important;
}

.auth-dev-banner i {
    margin-top: 2px;
    color: #b45309;
}

.auth-message.success {
    color: #0f766e;
    font-weight: 700;
}

.auth-message.failed {
    color: #b91c1c;
    font-weight: 700;
}

.auth-link-btn {
    border: none;
    background: transparent;
    color: #0f766e;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin: -6px 0 14px;
    padding: 0;
    text-align: left;
}

.auth-link-btn:hover {
    text-decoration: underline;
}

.btn-login-submit:disabled {
    cursor: wait;
    opacity: 0.75;
}

.btn-auth-secondary {
    width: 100%;
    background: white;
    color: #171b20;
    border: 1px solid rgba(23, 27, 32, 0.14);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-auth-secondary:hover {
    background: #f0eae9;
}

.otp-target {
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 8px;
    background: #f3f7f3;
    padding: 14px;
    margin-bottom: 18px;
}

.otp-target span {
    display: block;
    color: #68727d;
    font-size: 0.86rem;
    margin-bottom: 4px;
}

.otp-target strong {
    color: #171b20;
    overflow-wrap: anywhere;
}

/* ===== Dashboard (dari kode sebelumnya) ===== */
.dashboard {
    background-color: #e9e1e0;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    border-right: 1px solid #dcd3d2;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e9e1e0;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.sidebar-header p {
    color: #95a5a6;
    font-size: 0.9rem;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul li {
    margin: 5px 0;
}

.sidebar-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: #34495e;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: 0.2s;
}

.sidebar-nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #95a5a6;
}

.sidebar-nav ul li.active a,
.sidebar-nav ul li a:hover {
    background-color: #f5f0ef;
    border-left-color: #7f8c8d;
    color: #2c3e50;
}

.sidebar-nav ul li.active a i,
.sidebar-nav ul li a:hover i {
    color: #2c3e50;
}

.mobile-only-nav {
    display: none;
}

@keyframes mobileNavIconSpin {
    0% {
        transform: translateX(6px) rotate(14deg);
    }
    100% {
        transform: translateX(0) rotate(0deg);
    }
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e9e1e0;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e74c3c;
    font-weight: 500;
}

.main-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dcd3d2;
}

.header-left h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 600;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.user-info i {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.dashboard-view {
    display: none;
}

.dashboard-view.active {
    display: block;
}

body.dashboard:not(.user-dashboard) {
    color: #171b20;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08) 0 24%, transparent 24% 100%),
        linear-gradient(180deg, #fffdf7 0%, #edf6f0 100%);
}

body.dashboard:not(.user-dashboard) .sidebar {
    background: rgba(255, 253, 247, 0.92);
    border-right-color: rgba(23, 27, 32, 0.12);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.06);
}

body.dashboard:not(.user-dashboard) .sidebar-header h2,
body.dashboard:not(.user-dashboard) .header-left h1,
body.dashboard:not(.user-dashboard) .admin-section-header h2,
body.dashboard:not(.user-dashboard) .recent-transactions h2,
body.dashboard:not(.user-dashboard) .topup-panel h3 {
    color: #171b20;
    font-weight: 900;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li a {
    margin: 0 10px;
    border-left: 0;
    border-radius: 8px;
    color: #4b5864;
    display: flex;
    align-items: center;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li.active a,
body.dashboard:not(.user-dashboard) .sidebar-nav ul li a:hover {
    color: #171b20;
    background: rgba(15, 118, 110, 0.1);
    border-left-color: transparent;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li.active a i,
body.dashboard:not(.user-dashboard) .sidebar-nav ul li a:hover i {
    color: #0f766e;
}

body.dashboard:not(.user-dashboard) .main-content {
    padding: 24px;
}

body.dashboard:not(.user-dashboard) .dashboard-header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -24px -24px 24px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(23, 27, 32, 0.1);
    background: rgba(255, 253, 247, 0.82);
    backdrop-filter: blur(16px);
}

body.dashboard:not(.user-dashboard) .admin-products,
body.dashboard:not(.user-dashboard) .recent-transactions,
body.dashboard:not(.user-dashboard) .topup-panel,
body.dashboard:not(.user-dashboard) .account-section,
body.dashboard:not(.user-dashboard) .admin-monitoring {
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 12px;
    background: rgba(255, 253, 247, 0.86);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

body.dashboard:not(.user-dashboard) .stat-card {
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 12px;
    background: rgba(255, 253, 247, 0.88);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

body.dashboard:not(.user-dashboard) .stat-card i,
body.dashboard:not(.user-dashboard) .monitor-icon {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
}

.admin-monitoring {
    padding: 22px;
}

.monitoring-header {
    margin-bottom: 18px;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.monitor-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 10px;
    background: #fffdf7;
    padding: 14px;
}

.monitor-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.monitor-card small,
.monitoring-metrics span {
    display: block;
    color: #68727d;
    font-size: 0.78rem;
    font-weight: 800;
}

.monitor-card strong,
.monitoring-metrics strong {
    display: block;
    color: #171b20;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.25;
}

.monitor-card p {
    margin: 5px 0 0;
    color: #68727d;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.monitor-card.is-critical {
    border-color: rgba(185, 28, 28, 0.28);
    background: #fff7f7;
}

.monitor-card.is-critical .monitor-icon {
    color: #b91c1c;
    background: #fee2e2;
}

.monitoring-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.monitoring-metrics div {
    border: 1px solid rgba(23, 27, 32, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
    padding: 12px;
}

.monitoring-panels {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
}

.monitor-panel {
    min-width: 0;
    border: 1px solid rgba(23, 27, 32, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    padding: 14px;
}

.monitor-panel h3 {
    margin-bottom: 10px;
    color: #171b20;
    font-size: 1rem;
    font-weight: 900;
}

.monitor-alert-list,
.monitor-event-list {
    display: grid;
    gap: 8px;
}

.monitor-list-item,
.monitor-empty {
    border: 1px solid rgba(23, 27, 32, 0.1);
    border-radius: 8px;
    background: #fffdf7;
    padding: 10px 12px;
}

.monitor-list-item strong {
    display: block;
    color: #171b20;
    font-size: 0.9rem;
}

.monitor-list-item span,
.monitor-empty {
    color: #68727d;
    font-size: 0.82rem;
    line-height: 1.4;
}

.monitor-list-item.critical {
    border-color: rgba(185, 28, 28, 0.22);
    background: #fff7f7;
}

.monitor-list-item.warning {
    border-color: rgba(146, 64, 14, 0.22);
    background: #fff7e8;
}

.monitor-list-item.success {
    border-color: rgba(15, 118, 110, 0.18);
    background: #ecfdf8;
}

.balance-card {
    background: white;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.balance-info span {
    font-size: 1rem;
    color: #7f8c8d;
    display: block;
    margin-bottom: 5px;
}

.balance-info h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    font-weight: 600;
}

.quick-services {
    margin-bottom: 40px;
}

.quick-services h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.direct-pay-info {
    background: #f9f5f4;
    border: 1px solid #dcd3d2;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.direct-pay-info i {
    color: #2c3e50;
    font-size: 1rem;
    margin-top: 2px;
}

.direct-pay-info h3 {
    color: #2c3e50;
    font-size: 0.98rem;
    margin-bottom: 4px;
}

.direct-pay-info p {
    color: #5f6f7f;
    font-size: 0.9rem;
    line-height: 1.5;
}

.promo-banner {
    border: 1px solid #d9d2d1;
    background: linear-gradient(135deg, #223448 0%, #2c3e50 55%, #36506a 100%);
    color: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.promo-banner.promo-empty {
    background: #ffffff;
    color: #2c3e50;
}

.promo-banner.promo-empty .promo-copy p,
.promo-banner.promo-empty .promo-countdown span {
    color: #6b7885;
}

.promo-banner.promo-empty .promo-badge {
    background: #f0eae9;
    color: #2c3e50;
}

.promo-banner.promo-empty .promo-countdown,
.promo-banner.promo-empty .promo-price,
.promo-banner.promo-empty .btn-primary,
.promo-banner.promo-empty .promo-side,
.promo-banner.promo-empty .promo-dots {
    display: none;
}

.promo-banner.promo-switching .promo-copy,
.promo-banner.promo-switching .promo-side {
    animation: promoSlideIn 0.34s ease both;
}

@keyframes promoSlideIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.promo-copy h3 {
    font-size: 1.05rem;
    margin: 6px 0 4px;
}

.promo-copy p {
    margin: 0;
    color: #d6e0ea;
    font-size: 0.9rem;
}

.promo-price {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.promo-price-original {
    font-size: 0.82rem;
    color: #dbe7f4;
    text-decoration: line-through;
    opacity: 0.9;
}

.promo-price-final {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.promo-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
}

.promo-side {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.promo-countdown {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.promo-countdown span {
    font-size: 0.75rem;
    color: #dbe7f4;
}

.promo-countdown strong {
    font-size: 1rem;
    letter-spacing: 1px;
}

.promo-dots {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.promo-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    padding: 0;
    cursor: pointer;
}

.promo-dot.active {
    width: 18px;
    background: #ffffff;
}

.dashboard-menu-shortcuts {
    border: 1px solid #ded6d5;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
}

.dashboard-menu-shortcuts h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 10px;
}

.menu-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.menu-shortcut-card {
    border: 1px solid #e5dddc;
    background: #f9f5f4;
    border-radius: 10px;
    min-height: 92px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    cursor: pointer;
    transition: 0.2s ease;
}

.menu-shortcut-card i {
    font-size: 1.2rem;
    color: #5d6d7d;
}

.menu-shortcut-card .brand-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-shortcut-card.has-brand-logo .brand-logo-fallback {
    display: none;
}

.menu-shortcut-card .brand-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    padding: 6px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5dddc;
}

.menu-shortcut-card span {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

.menu-shortcut-card small {
    color: #7f8c8d;
    font-size: 0.72rem;
    font-weight: 600;
}

.menu-shortcut-card:hover {
    transform: translateY(-1px);
    border-color: #cfc5c4;
    background: #f3edec;
}

.menu-shortcut-card:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.shortcut-flow-panel {
    border: 1px solid #ddd5d4;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

.shortcut-flow-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.shortcut-flow-head h3 {
    color: #2c3e50;
    font-size: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.shortcut-flow-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.shortcut-choice-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    min-width: 0;
}

.shortcut-product-choice-grid.grouped-by-type {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-product-type-group {
    border: 1px solid #e4dbda;
    background: #fffdfc;
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}

.shortcut-product-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.shortcut-flow-body .form-group,
.shortcut-flow-body .fancy-filter-select,
.shortcut-flow-body input {
    min-width: 0;
    max-width: 100%;
}

.shortcut-flow-body .form-group:last-of-type,
.shortcut-flow-body .checkout-actions,
.shortcut-flow-body .checkout-status {
    grid-column: 1 / -1;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    grid-auto-rows: 1fr;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.service-card i {
    font-size: 2.5rem;
    color: #7f8c8d;
    margin-bottom: 0;
}

.service-card h3 {
    margin: 0;
    color: #2c3e50;
    width: 100%;
    flex: 1;
    line-height: 1.35;
}

.btn-service {
    background: #e9e1e0;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #dcd3d2;
    color: #2c3e50;
    margin-top: auto;
}

.btn-service:hover {
    background: #dcd3d2;
}

.prepaid-products {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.products-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.btn-refresh-products {
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
}

.btn-refresh-products i {
    margin-right: 6px;
}

.product-browser {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

/* Navigasi langkah menu Beli: tombol kembali dan jejak pilihan (Pulsa > Telkomsel). */
.buy-step-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.buy-step-back {
    flex: none;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    background: #ffffff;
    color: #2c3e50;
    padding: 0;
    cursor: pointer;
}

.buy-step-back:active {
    background: #f0eae9;
}

.buy-step-trail {
    min-width: 0;
    overflow: hidden;
    color: #2c3e50;
    font-size: 1.02rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#buyView .browser-column[hidden] + .browser-column {
    margin-top: 0;
}

#productStatus:empty {
    display: none;
}

#prepaidProductGrid.is-in-context .product-badge:not(.product-badge-disrupted),
#prepaidProductGrid.is-in-context .product-meta {
    display: none;
}

/* Kode SKU adalah istilah internal, pembeli tidak perlu melihatnya. */
#prepaidProductGrid .product-sku,
.dashboard-favorites-list .product-sku {
    display: none;
}

.product-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

#buyView .product-pagination .btn-secondary {
    width: auto;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.product-pagination .btn-secondary:disabled {
    opacity: 0.4;
    cursor: default;
}

.product-page-info {
    color: #6f6866;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.browser-column {
    border: 1px solid #e4dbda;
    border-radius: 8px;
    background: #f9f5f4;
    padding: 14px;
    min-width: 0;
}

.browser-column.is-locked {
    background: rgba(249, 245, 244, 0.58);
}

.browser-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 700;
}

.browser-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.browser-title i {
    color: #0f766e;
}

.browser-title small {
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: white;
    border: 1px solid #dcd3d2;
    color: #7f8c8d;
    font-size: 0.78rem;
    text-align: center;
}

.filter-chip-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 4px;
}

.filter-chip {
    border: 1px solid #dcd3d2;
    background: white;
    color: #2c3e50;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    min-height: 72px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 9px;
    text-align: left;
    min-width: 0;
}

.filter-chip:hover,
.filter-chip.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

.filter-chip > i {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    background: #edf6f0;
}

.filter-chip .brand-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    padding: 5px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5dddc;
}

.filter-chip.has-brand-logo .brand-logo-fallback {
    display: none;
}

.filter-chip.active > i,
.filter-chip:hover > i {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.filter-chip.active .brand-logo-img,
.filter-chip:hover .brand-logo-img {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.72);
}

.filter-chip-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.filter-chip-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.filter-chip-text small {
    color: #7f8c8d;
    font-size: 0.76rem;
    font-weight: 700;
}

.filter-chip.active .filter-chip-text small,
.filter-chip:hover .filter-chip-text small {
    color: rgba(255, 255, 255, 0.78);
}

.filter-step-hint {
    grid-column: 1 / -1;
    min-height: 72px;
    border: 1px dashed #d8cecd;
    border-radius: 8px;
    color: #7f8c8d;
    background: rgba(255, 255, 255, 0.54);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
}

.browser-column-category .filter-chip {
    min-height: 92px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.browser-column-category .filter-chip > i {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
}

.browser-column-category .filter-chip-text {
    justify-items: center;
}

.product-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr);
    gap: 14px;
    margin-bottom: 12px;
}

#buyView .product-filters {
    grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1.1fr);
    align-items: center;
}

#buyView .product-filters > select,
#buyView .product-filters > .fancy-filter-select {
    display: none;
}

.product-type-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: thin;
}

.product-type-filter[hidden],
.product-type-filter.is-empty {
    display: none;
}

.type-filter-chip {
    flex: 0 0 auto;
    min-height: 38px;
    max-width: 180px;
    border: 1px solid #dcd3d2;
    border-radius: 999px;
    background: #f9f5f4;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    font-weight: 800;
    cursor: pointer;
}

.type-filter-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-filter-chip strong {
    flex: 0 0 auto;
    min-width: 24px;
    border-radius: 999px;
    background: #edf7f2;
    color: #0f766e;
    font-size: 0.76rem;
    line-height: 1;
    padding: 5px 7px;
    text-align: center;
}

.type-filter-chip.active {
    color: #ffffff;
    background: #2c3e50;
    border-color: #2c3e50;
}

.type-filter-chip.active strong {
    color: #2c3e50;
    background: #ffffff;
}

.product-search {
    position: relative;
}

.product-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #95a5a6;
}

.product-search input,
.product-filters select {
    width: 100%;
    height: 44px;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    background: #f9f5f4;
    color: #2c3e50;
    font-size: 0.95rem;
}

.product-search input {
    padding: 0 14px 0 42px;
}

.product-filters select {
    padding: 0 12px;
}

.native-filter-select {
    display: none;
}

.fancy-filter-select {
    position: relative;
    min-width: 0;
}

.fancy-filter-trigger {
    width: 100%;
    height: 44px;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    background: #f9f5f4;
    color: #2c3e50;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.fancy-filter-trigger:hover {
    background: #f4efee;
}

.fancy-filter-select.open .fancy-filter-trigger,
.fancy-filter-trigger:focus-visible {
    outline: none;
    border-color: #2c3e50;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12);
}

.fancy-filter-trigger-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.fancy-filter-trigger i {
    font-size: 0.8rem;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.fancy-filter-select.open .fancy-filter-trigger i {
    transform: rotate(180deg);
}

.fancy-filter-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 250;
    background: #ffffff;
    border: 1px solid #dcd3d2;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 6px;
    max-height: min(280px, calc(100vh - 180px));
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
}

.fancy-filter-select.open .fancy-filter-menu {
    display: block;
}

.fancy-filter-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    color: #334155;
    font-size: 0.93rem;
    font-weight: 500;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.fancy-filter-option:hover {
    background: #f3f6fb;
}

.fancy-filter-option.active {
    background: #2c3e50;
    color: #ffffff;
}

.product-search input:focus,
.product-filters select:focus {
    outline: none;
    border-color: #7f8c8d;
    background: white;
}

.product-status {
    min-height: 22px;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.prepaid-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.prepaid-product-grid.grouped-by-type {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-type-group {
    border: 1px solid #ded6d5;
    border-radius: 14px;
    background: #fffdfc;
    padding: 16px;
    min-width: 0;
}

.product-type-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.product-type-group-head h3,
.product-type-group-head h4 {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.product-type-count {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf7f2;
    border: 1px solid #cbe9df;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 10px;
}

.product-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.prepaid-product-card {
    border: 1px solid #dcd3d2;
    border-radius: 12px;
    padding: 16px;
    background: #fdfcfc;
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.2s;
}

.prepaid-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.prepaid-product-card.product-disrupted {
    border-color: #f0b9b9;
    background: #fff8f8;
}

.prepaid-product-card.product-disrupted .prepaid-product-icon {
    background: #fff1f1;
    color: #b42318;
}

.product-badge-disrupted {
    color: #b42318;
    background: #fff1f1;
    border-color: #f0b9b9;
}

.prepaid-product-card.product-disrupted .btn-service {
    color: #ffffff;
    background: #b42318;
}

.prepaid-product-card.product-disrupted .btn-service:hover {
    background: #8f1d14;
}

.prepaid-product-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.prepaid-product-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e9e1e0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
}

.prepaid-product-icon.has-brand-logo {
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e5dddc;
}

.prepaid-product-icon.has-brand-logo .brand-logo-fallback,
.product-card-icon.has-brand-logo .brand-logo-fallback,
.service-card.has-brand-logo .brand-logo-fallback {
    display: none;
}

.prepaid-product-icon .brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-card-icon .brand-logo-img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    margin-bottom: 0;
    padding: 10px;
    border-radius: 14px;
    background: transparent;
}

.service-card .brand-logo-img {
    width: 78px;
    max-width: 80%;
    height: 56px;
    object-fit: contain;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.product-badge {
    max-width: 130px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf7f2;
    color: #237255;
    font-size: 0.78rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prepaid-product-card h3 {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 8px;
    min-height: 44px;
}

.product-meta,
.product-sku {
    color: #7f8c8d;
    font-size: 0.86rem;
}

.product-sku {
    margin-top: 4px;
    font-family: Consolas, 'Courier New', monospace;
}

.product-price {
    color: #145c49;
    font-size: 1.18rem;
    font-weight: 700;
    margin: 16px 0 12px;
}

.product-price-promo {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.product-price-promo .product-promo-label {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
}

.product-price-promo .product-price-original {
    color: #7f8c8d;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: line-through;
}

.product-price-promo .product-price-final {
    color: #145c49;
    font-size: 1.18rem;
    font-weight: 800;
}

.prepaid-product-card .btn-service {
    width: 100%;
    border-radius: 10px;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-load-more {
    border-radius: 10px;
    cursor: pointer;
}

.checkout-panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-top: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    border: 1px solid #dcd3d2;
    max-width: 100%;
    overflow: hidden;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.checkout-header > div {
    min-width: 0;
}

.checkout-step {
    display: inline-block;
    color: #7f8c8d;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.checkout-header h2 {
    color: #2c3e50;
    font-size: 1.45rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.checkout-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
}

.checkout-progress-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 8px;
    border: 1px solid #e3ecea;
    border-radius: 12px;
    background: #f9fbfa;
    color: #7f8c8d;
    font-size: 0.86rem;
    font-weight: 800;
}

.checkout-progress-item i {
    color: inherit;
}

.checkout-progress-item.active {
    color: #0f766e;
    border-color: #bfe5dd;
    background: #ecfdf8;
}

.checkout-progress-item.done {
    color: #2c3e50;
    border-color: #d6e3df;
    background: #ffffff;
}

.checkout-progress-item.done i {
    color: #0f766e;
}

.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    background: #f9f5f4;
    color: #2c3e50;
    cursor: pointer;
}

.icon-button:hover {
    background: #e9e1e0;
}

.checkout-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.checkout-summary div {
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 14px;
}

.checkout-summary span {
    display: block;
    color: #7f8c8d;
    font-size: 0.84rem;
    margin-bottom: 4px;
}

.checkout-summary strong {
    color: #2c3e50;
    overflow-wrap: anywhere;
}

.checkout-form .form-group {
    margin-bottom: 14px;
}

.game-account-fields label {
    display: block;
    margin-bottom: 8px;
}

.checkout-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
}

.checkout-account-grid input {
    width: 100%;
    height: 44px;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    padding: 0 12px;
    background: #f9f5f4;
    color: #2c3e50;
    font-size: 0.95rem;
}

.checkout-account-grid input:focus {
    outline: none;
    border-color: #7f8c8d;
    background: white;
}

.field-help {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.85rem;
}

.id-check-reminder {
    margin: 0 0 8px;
    color: #c0392b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.id-check-reminder[hidden],
.ml-username-check[hidden],
.game-username-check[hidden] {
    display: none;
}

.ml-username-check,
.game-username-check {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.ml-username-check .btn-secondary,
.game-username-check .btn-secondary {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ml-username-check .checkout-status,
.game-username-check .checkout-status {
    margin: 0;
}

.checkout-status {
    min-height: 22px;
    color: #7f8c8d;
    margin-bottom: 16px;
}

.checkout-status.loading,
.product-status.loading,
.landing-products-status.loading,
.brand-logo-toolbar .checkout-status.loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkout-status.loading::before,
.product-status.loading::before,
.landing-products-status.loading::before,
.brand-logo-toolbar .checkout-status.loading::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.84;
    animation: statusLoadingSpin 0.72s linear infinite;
}

.btn-primary.is-loading,
.btn-secondary.is-loading,
.btn-service.is-loading,
.receipt-btn.is-loading {
    cursor: wait;
    opacity: 0.78;
}

.btn-primary.is-loading i,
.btn-secondary.is-loading i,
.btn-service.is-loading i,
.receipt-btn.is-loading i,
.fa-spinner,
.payment-state-strip.loading i,
.payment-state-strip .fa-spinner,
.snap-loading-state i {
    animation: statusLoadingSpin 0.72s linear infinite;
}

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

.checkout-status.success {
    color: #237255;
    font-weight: 700;
}

.checkout-status.failed {
    color: #c0392b;
    font-weight: 700;
}

.checkout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.checkout-actions .btn-primary,
.checkout-actions .btn-secondary {
    border-radius: 10px;
    cursor: pointer;
}

.checkout-actions .btn-primary:disabled {
    cursor: wait;
    opacity: 0.7;
}

.checkout-payment-result {
    border: 1px solid #e3e8e6;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    margin-top: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.checkout-payment-result::before {
    content: none;
}

.checkout-payment-result.processing-state {
    border-color: #bfded7;
    background: #f2fbf8;
}

.checkout-payment-result.final-state.is-success h3 {
    color: #0f766e;
}

.checkout-payment-result.final-state.is-failed h3 {
    color: #b42318;
}

#checkoutPaymentNote {
    margin: 8px 0 0;
    text-align: center;
}

#checkoutPaymentInfo {
    white-space: pre-line;
}

/* Baris status checkout baru muncul kalau ada pesan, supaya tidak meninggalkan celah kosong. */
#checkoutStatus:empty {
    display: none;
}

.checkout-payment-result.final-state {
    border-color: #dbe8e6;
    background: linear-gradient(135deg, #ffffff, #f8fbfa);
}

.qris-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.qris-kicker {
    display: inline-flex;
    align-items: center;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.qris-secure-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e9f8f4;
    color: #0f766e;
    border: 1px solid #cceee6;
    font-size: 0.78rem;
    font-weight: 800;
}

.payment-state-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px auto 14px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #dbe8e6;
    background: #f7faf9;
    color: #40545c;
    font-weight: 800;
    text-align: center;
}

.payment-state-strip.waiting {
    color: #92400e;
    border-color: #fde7ba;
    background: #fff7e8;
}

.payment-state-strip.processing {
    color: #0f766e;
    border-color: #bfe5dd;
    background: #ecfdf8;
}

.payment-state-strip.success {
    color: #047857;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.payment-state-strip.failed {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.checkout-payment-result h3 {
    color: #2c3e50;
    font-size: 1.22rem;
    line-height: 1.25;
    margin-bottom: 0;
}

.qris-frame {
    position: relative;
    z-index: 1;
    width: min(100%, 336px);
    margin: 0 auto 14px;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe6e4;
    box-shadow:
        inset 0 0 0 6px #f8fbfa,
        0 16px 28px rgba(15, 23, 42, 0.08);
}

.qris-frame::before,
.qris-frame::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: #0f766e;
    opacity: 0.5;
}

.qris-frame::before {
    top: 8px;
    left: 8px;
    border-top: 3px solid;
    border-left: 3px solid;
    border-radius: 8px 0 0 0;
}

.qris-frame::after {
    right: 8px;
    bottom: 8px;
    border-right: 3px solid;
    border-bottom: 3px solid;
    border-radius: 0 0 8px 0;
}

.checkout-payment-result img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 12px;
    border: none;
    background: #fff;
    display: block;
    margin: 0;
}

.snap-mobile-sheet {
    display: none;
}

.snap-mobile-sheet[hidden] {
    display: none !important;
}

/* Panel pembayaran Snap: modal di tengah layar. Header bawaan Midtrans sudah
   memuat nama toko, nominal, dan tombol tutup, jadi panel ini tidak menambah
   header sendiri. Tombol Tutup di bawah kartu tetap ada sebagai jalan keluar
   yang pasti, termasuk saat iframe Midtrans belum selesai dimuat. */
body.snap-sheet-open {
    overflow: hidden;
}

/* Navigasi bawah tidak relevan selama pembayaran dan bersaing dengan tombol
   Tutup, jadi disembunyikan sementara panel terbuka. */
body.snap-sheet-open .sidebar {
    visibility: hidden;
}

.snap-mobile-sheet:not([hidden]) {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: max(14px, env(safe-area-inset-top, 0px)) 12px max(14px, env(safe-area-inset-bottom, 0px));
    isolation: isolate;
    animation: snapSheetFade 0.18s ease-out;
}

.snap-sheet-backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(12, 16, 20, 0.64);
    padding: 0;
    cursor: pointer;
}

.snap-sheet-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100%, 420px);
    height: min(640px, calc(100vh - 100px));
    height: min(640px, calc(100dvh - 100px));
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(8, 12, 18, 0.38);
    animation: snapSheetPop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.08);
}

/* Konten Midtrans sudah bisa digulir sendiri di dalam iframe. Iframe dibuat
   mengisi kartu penuh agar tidak ada gulir ganda (kartu dan iframe). */
.snap-mobile-sheet .snap-embed-frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.snap-mobile-sheet .snap-embed-frame iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.snap-mobile-sheet .snap-loading-state {
    min-height: 100%;
}

.snap-sheet-dismiss {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 10px 22px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.snap-sheet-dismiss:active {
    background: rgba(255, 255, 255, 0.26);
}

@keyframes snapSheetFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes snapSheetPop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .snap-mobile-sheet:not([hidden]),
    .snap-sheet-dialog {
        animation: none;
    }
}

.snap-embed-frame {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    min-height: 640px;
    margin: 10px auto 12px;
    overflow: hidden;
    border: 1px solid #dce8e6;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.snap-embed-frame iframe {
    display: block;
    width: 100% !important;
    min-height: 640px !important;
    border: 0 !important;
}

.snap-loading-state {
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #60717d;
    font-weight: 800;
    text-align: center;
    padding: 24px;
}

.snap-loading-state i {
    color: #0f766e;
}

.snap-loading-state.failed {
    color: #b91c1c;
}

.snap-loading-state.failed i {
    color: #dc2626;
}

.checkout-payment-result p {
    position: relative;
    z-index: 1;
    color: #7f8c8d;
    margin-bottom: 10px;
    line-height: 1.55;
}

.qris-payment-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    border-radius: 12px;
    padding: 9px 12px;
    background: #f7faf9;
    color: #40545c;
    border: 1px solid #dbe8e6;
    font-weight: 700;
    text-align: center;
}

.qris-hint-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px auto 12px;
    max-width: 720px;
}

.qris-hint-list span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    border: 1px solid #e3ecea;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    color: #52646e;
    font-size: 0.86rem;
    line-height: 1.35;
}

.qris-hint-list i {
    color: #0f766e;
    margin-top: 2px;
}

.checkout-payment-result.processing-state p {
    color: #2f5960;
    font-weight: 600;
}

.checkout-payment-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 720px;
    margin: 12px auto 0;
}

.checkout-payment-actions .btn-secondary {
    border-radius: 12px;
    padding: 10px 16px;
    background: #ffffff;
}

.checkout-payment-actions .checkout-help-btn {
    color: #0f766e;
    border-color: #bfe5dd;
    background: #ecfdf8;
}

.topup-panel {
    margin-top: 18px;
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 16px;
}

.topup-panel h3 {
    color: #2c3e50;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.topup-info {
    margin-bottom: 14px;
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 14px 16px;
}

.topup-info h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
}

.topup-info ul {
    margin: 0;
    padding-left: 18px;
    color: #5f6c74;
    font-size: 0.92rem;
    line-height: 1.5;
}

.ongoing-orders {
    background: #ffffff;
    border: 1px solid #dcd3d2;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.history-ongoing-orders {
    margin-bottom: 18px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.section-kicker {
    display: inline-flex;
    border-radius: 999px;
    background: #f0eae9;
    color: #2c3e50;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-heading-row h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin: 0;
}

.compact-action {
    padding: 8px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.danger-action {
    color: #b91c1c;
}

.ongoing-order-list {
    display: grid;
    gap: 12px;
}

.ongoing-order-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 14px;
}

.ongoing-order-card.processing {
    background: #fffdf6;
}

.ongoing-order-main {
    min-width: 0;
}

.ongoing-order-type {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: #7f8c8d;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ongoing-order-card h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.ongoing-order-meta,
.ongoing-order-desc {
    color: #5f6f7f;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
}

.ongoing-order-desc {
    margin-top: 4px;
}

.ongoing-order-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.ongoing-order-amount {
    color: #2c3e50;
    font-size: 1rem;
    white-space: nowrap;
}

.ongoing-order-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.recent-transactions {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.recent-transactions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.admin-transaction-tools {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-transaction-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
    align-items: center;
    gap: 10px 12px;
}

.admin-transaction-filters label {
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-transaction-filters input,
.admin-transaction-filters select {
    border: 1px solid #dcd3d2;
    background: #fff;
    color: #2c3e50;
    border-radius: 10px;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.admin-transaction-filters .fancy-filter-select {
    min-width: 170px;
}

.admin-transaction-filters input[type="search"] {
    min-width: 280px;
}

.admin-transaction-filters .btn-secondary {
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 10px;
}

.admin-transaction-count {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.admin-transaction-count strong {
    color: #2c3e50;
}

.admin-pagination {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.admin-pagination span {
    color: #7f8c8d;
    font-size: 0.9rem;
    min-width: 120px;
    text-align: center;
}

.admin-pagination .btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.user-history-pagination {
    justify-content: center;
}

.transactions-table .tx-empty {
    text-align: center;
    color: #7f8c8d;
    font-weight: 600;
}

.admin-balance-dialog {
    max-width: 440px;
}

.admin-balance-dialog .form-group {
    text-align: left;
    margin-bottom: 14px;
}

.admin-balance-dialog input {
    width: 100%;
}

.admin-user-balance-tool {
    grid-template-columns: minmax(260px, 420px) minmax(160px, max-content);
    align-items: stretch;
    gap: 14px;
}

.admin-user-balance-tool .btn-secondary,
.admin-user-balance-tool .btn-primary {
    border-radius: 10px;
    cursor: pointer;
}

.admin-user-balance-tool > .form-group {
    min-width: 0;
    max-width: none;
}

.admin-user-balance-tool > #userBalanceSearchBtn {
    align-self: end;
    min-width: 180px;
    min-height: 56px;
}

.admin-user-balance-tool #userBalanceStatus {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.admin-user-balance-result {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr) minmax(250px, 0.8fr);
    gap: 18px;
    align-items: stretch;
    border: 1px solid #e1efea;
    border-radius: 12px;
    background: #f6fbf9;
    padding: 18px 20px;
}

.admin-user-balance-result[hidden] {
    display: none;
}

.admin-user-account-summary {
    display: grid;
    gap: 4px;
    align-content: center;
    min-width: 0;
}

.admin-user-balance-result span,
.admin-user-balance-result small {
    color: #7f8c8d;
}

.admin-user-balance-result strong {
    color: #2c3e50;
    overflow-wrap: anywhere;
}

.admin-user-balance-fields {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.admin-user-balance-fields .form-group {
    min-width: 0;
}

.admin-user-balance-fields input {
    width: 100%;
}

.admin-user-balance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.admin-user-balance-actions .btn-primary,
.admin-user-balance-actions .btn-secondary {
    min-height: 56px;
    padding: 10px 14px;
    justify-content: center;
}

.account-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-top: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.account-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.account-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 11px 13px;
}

.account-card-wide {
    grid-column: 1 / -1;
}

.cs-intro {
    margin-bottom: 14px;
    color: #6f6866;
    font-size: 0.88rem;
    line-height: 1.5;
}

.cs-contact-grid {
    margin-top: 14px;
    grid-template-columns: 1fr;
}

.account-card-wide strong {
    font-size: 1.15rem;
}

.account-card span {
    color: #7f8c8d;
    font-size: 0.82rem;
}

.account-card strong {
    color: #2c3e50;
    overflow-wrap: anywhere;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #e9e1e0;
    color: #7f8c8d;
    font-weight: 600;
}

.transactions-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9e1e0;
    color: #2c3e50;
}

.transactions-table tbody tr:hover {
    background-color: #f9f5f4;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.success {
    color: #0f766e;
    background: #ccfbf1;
}

.status.pending {
    color: #92400e;
    background: #fef3c7;
}

.status.failed {
    color: #b91c1c;
    background: #fee2e2;
}

.receipt-btn {
    border: 1px solid #dcd3d2;
    background: #fff;
    color: #2c3e50;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.receipt-btn i {
    margin-right: 6px;
}

.receipt-btn:hover {
    background: #f0eae9;
}

.tx-action {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.transactions-table td[data-label="Aksi"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.transaction-detail-overlay {
    align-items: flex-start;
    padding-top: 7vh;
}

/* Dialog dibatasi setinggi layar. Hanya daftar rincian yang digulir, sehingga
   judul dan tombol Download Nota/Tutup selalu terlihat walau rinciannya panjang. */
.transaction-detail-dialog {
    display: flex;
    flex-direction: column;
    max-width: 680px;
    width: min(680px, calc(100vw - 28px));
    max-height: calc(100vh - 7vh - 16px);
    max-height: calc(100dvh - 7vh - 16px);
    text-align: left;
}

.transaction-detail-dialog > .status {
    align-self: flex-start;
}

.transaction-detail-dialog > .confirm-actions {
    flex: none;
}

.transaction-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.transaction-detail-head h3 {
    margin: 0;
}

.transaction-detail-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 16px 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.transaction-detail-grid span {
    color: #7f8c8d;
    font-weight: 600;
}

.transaction-detail-grid strong {
    color: #2c3e50;
    overflow-wrap: anywhere;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.stat-card i {
    font-size: 2.5rem;
    color: #7f8c8d;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-card p {
    color: #7f8c8d;
}

.admin-overview-filter {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 12px;
    background: rgba(255, 253, 247, 0.88);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
    padding: 16px 18px;
    margin-bottom: 20px;
}

.admin-overview-filter span {
    display: block;
    color: #7f8c8d;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-overview-filter strong {
    display: block;
    color: #1f2d3d;
    margin-top: 3px;
}

.overview-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.overview-filter-controls select,
.overview-filter-controls input {
    min-height: 42px;
    border: 1px solid #dcd3d2;
    border-radius: 10px;
    background: #fffdf8;
    color: #1f2d3d;
    padding: 0 12px;
    font: inherit;
}

.overview-filter-controls input[type="number"] {
    width: 110px;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-overview-panel {
    min-width: 0;
    border: 1px solid rgba(23, 27, 32, 0.12);
    border-radius: 12px;
    background: rgba(255, 253, 247, 0.88);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
    padding: 22px;
}

.admin-finance-panel {
    grid-column: span 2;
}

.admin-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.admin-overview-head span {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-overview-head h2 {
    color: #171b20;
    font-size: 1.25rem;
    margin-top: 4px;
}

.admin-overview-head i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
}

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

.finance-breakdown div,
.circle-detail div {
    border: 1px solid #e9e1e0;
    border-radius: 10px;
    background: #fffdf8;
    padding: 13px;
}

.finance-breakdown span,
.circle-detail span {
    display: block;
    color: #7f8c8d;
    font-size: 0.86rem;
    font-weight: 600;
}

.finance-breakdown strong,
.circle-detail strong {
    display: block;
    color: #1f2d3d;
    font-size: 1.12rem;
    margin-top: 6px;
    overflow-wrap: anywhere;
}

#overviewPricingNote {
    color: #7f8c8d;
    margin-top: 12px;
}

.circle-metrics {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.circle-stat {
    --value: 0;
    width: 138px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background: conic-gradient(#0f766e calc(var(--value) * 1%), #e9e1e0 0);
}

.circle-stat::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #fffdf8;
    border: 1px solid rgba(23, 27, 32, 0.08);
}

.circle-stat.danger {
    background: conic-gradient(#ef6f61 calc(var(--value) * 1%), #e9e1e0 0);
}

.circle-stat.profit {
    background: conic-gradient(#b8ee3f calc(var(--value) * 1%), #e9e1e0 0);
}

.circle-stat div {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    text-align: center;
}

.circle-stat strong {
    color: #171b20;
    font-size: 1.7rem;
    line-height: 1;
}

.circle-stat span {
    color: #7f8c8d;
    font-size: 0.82rem;
    font-weight: 700;
}

.circle-detail {
    display: grid;
    gap: 9px;
}

.user-list {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.user-list h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #e9e1e0;
    color: #7f8c8d;
    font-weight: 600;
}

.user-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9e1e0;
    color: #2c3e50;
}

.user-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.danger-action {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff5f5;
}

.danger-action:hover {
    background: #fee2e2;
}

.admin-products {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #dcd3d2;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.admin-section-header p {
    color: #7f8c8d;
}

.admin-sync-btn {
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.admin-sync-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.admin-sync-btn i {
    margin-right: 6px;
}

.product-sync-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-sync-stats div {
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 14px;
}

.product-sync-stats span {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.product-sync-stats strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.admin-pricing-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
    border: 1px solid #e9e1e0;
    border-radius: 12px;
    background: #f9f5f4;
    padding: 14px;
}

.admin-pricing-config .form-group {
    margin-bottom: 0;
    min-width: 0;
}

.admin-pricing-config p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
    align-self: center;
}

.admin-pricing-config .btn-primary,
.admin-pricing-config .btn-secondary,
.admin-transaction-filters .btn-secondary,
.brand-logo-toolbar .btn-primary,
.brand-logo-toolbar .btn-secondary {
    min-height: 44px;
    justify-content: center;
}

.admin-pricing-config input,
.admin-pricing-config select,
.admin-pricing-config textarea {
    width: 100%;
    min-height: 44px;
}

.admin-cutoff-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
    grid-column: 1 / -1;
}

.admin-pricing-config .admin-cutoff-grid .form-group {
    min-width: 0;
}

.admin-product-note {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.btn-secondary.active {
    color: #ffffff;
    background: #2c3e50;
    border-color: #2c3e50;
}

.admin-balance-monitor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: min(100%, 520px);
    grid-column: 1 / -1;
    border: 1px solid #d8eeeb;
    border-radius: 12px;
    background: #f7fffc;
    padding: 14px 16px;
}

.admin-balance-monitor span,
.admin-balance-monitor small {
    display: block;
    color: #7f8c8d;
}

.admin-balance-monitor strong {
    display: block;
    margin: 4px 0;
    color: #087f78;
    font-size: 1.55rem;
}

.admin-balance-monitor .btn-secondary {
    white-space: nowrap;
}

.admin-product-autosync-config .setting-toggle-group,
.admin-product-autosync-config #productAutoSyncInfo {
    grid-column: 1 / -1;
}

.admin-backup-actions {
    grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
    justify-content: start;
}

.brand-logo-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(220px, 1fr);
    align-items: center;
    gap: 16px;
    margin: 18px 0;
}

.brand-logo-toolbar .product-search {
    min-width: 280px;
    width: 100%;
}

.brand-logo-toolbar p {
    color: #7f8c8d;
    margin: 0;
}

.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.brand-logo-card,
.brand-logo-empty {
    border: 1px solid #ddd5d4;
    border-radius: 12px;
    background: #fffdf7;
    padding: 16px;
}

.brand-logo-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.brand-logo-preview {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    border: 1px solid #e5dddc;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.brand-logo-preview i {
    color: #95a5a6;
    font-size: 1.4rem;
}

.brand-logo-body {
    min-width: 0;
}

.brand-logo-body h3 {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 5px;
}

.brand-logo-body p {
    color: #7f8c8d;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.brand-logo-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.brand-logo-actions .btn-primary,
.brand-logo-actions .btn-secondary {
    flex: 1 1 140px;
    min-height: 42px;
    padding: 10px 14px;
    justify-content: center;
}

.brand-logo-empty {
    color: #7f8c8d;
    grid-column: 1 / -1;
}

.brand-logo-card-disabled {
    border-color: #e0b4b4;
    background: #fdf6f5;
}

.brand-logo-card-disabled .brand-logo-preview {
    opacity: 0.45;
}

.brand-logo-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f6dedc;
    color: #a2372c;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

.brand-logo-reason {
    margin-top: 4px;
    color: #a2372c;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.setting-toggle-group {
    min-width: 280px;
}

.setting-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.setting-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2c3e50;
}

.admin-backup-actions {
    align-items: center;
}

.admin-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e9e1e0;
    border-radius: 14px;
    background: #fffdf8;
}

.admin-table-scroll .transactions-table {
    margin: 0;
}

/* ===== Desktop Admin Table Polish ===== */
@media (min-width: 769px) {
    .main-content,
    #productsView,
    #productsSection {
        min-width: 0;
        max-width: 100%;
    }

    #productsSection {
        overflow-x: hidden;
    }

    #productsSection .product-filters {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    #productsSection .product-search,
    #productsSection .fancy-filter-select {
        min-width: 0;
    }

    #productsSection .admin-product-table-scroll {
        border-radius: 14px;
    }

    #productsSection .transactions-table {
        table-layout: fixed;
        width: 100%;
        min-width: 1660px;
        font-size: 0.93rem;
    }
    #productsSection .transactions-table th,
    #productsSection .transactions-table td {
        vertical-align: middle;
        padding-left: 12px;
        padding-right: 12px;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    #productsSection .transactions-table th:nth-child(1),
    #productsSection .transactions-table td:nth-child(1) {
        width: 285px;
    }
    #productsSection .transactions-table th:nth-child(2),
    #productsSection .transactions-table td:nth-child(2) {
        width: 120px;
    }
    #productsSection .transactions-table th:nth-child(3),
    #productsSection .transactions-table td:nth-child(3) {
        width: 120px;
    }
    #productsSection .transactions-table th:nth-child(4),
    #productsSection .transactions-table td:nth-child(4) {
        width: 120px;
    }
    #productsSection .transactions-table th:nth-child(5),
    #productsSection .transactions-table td:nth-child(5) {
        width: 125px;
    }
    #productsSection .transactions-table th:nth-child(6),
    #productsSection .transactions-table td:nth-child(6) {
        width: 125px;
    }
    #productsSection .transactions-table th:nth-child(7),
    #productsSection .transactions-table td:nth-child(7) {
        width: 175px;
    }
    #productsSection .transactions-table th:nth-child(8),
    #productsSection .transactions-table td:nth-child(8) {
        width: 150px;
    }
    #productsSection .transactions-table th:nth-child(9),
    #productsSection .transactions-table td:nth-child(9) {
        width: 160px;
    }
    #productsSection .transactions-table th:nth-child(10),
    #productsSection .transactions-table td:nth-child(10) {
        width: 130px;
    }
    #productsSection .transactions-table th:nth-child(11),
    #productsSection .transactions-table td:nth-child(11) {
        width: 150px;
    }
    #productsSection .transactions-table td:nth-child(8),
    #productsSection .transactions-table td:nth-child(9),
    #productsSection .transactions-table td:nth-child(10),
    #productsSection .transactions-table td:nth-child(11) {
        text-align: left;
    }
    #productsSection .transactions-table td:nth-child(8) .receipt-btn,
    #productsSection .transactions-table td:nth-child(9) .receipt-btn,
    #productsSection .transactions-table td:nth-child(10) .receipt-btn,
    #productsSection .transactions-table td:nth-child(11) .receipt-btn {
        justify-content: center;
        display: inline-flex;
        align-items: center;
        max-width: 100%;
        min-width: max-content;
        white-space: nowrap;
        font-size: 0.82rem;
        line-height: 1.2;
        padding: 8px 9px;
    }
    #productsSection .transactions-table th:nth-child(9),
    #productsSection .transactions-table th:nth-child(10),
    #productsSection .transactions-table th:nth-child(11) {
        white-space: nowrap;
    }
    #productsSection .transactions-table td:nth-child(7) .status {
        white-space: nowrap;
    }

    #paymentsView .recent-transactions {
        overflow-x: auto;
    }

    #transactionsView .transactions-table {
        table-layout: fixed;
        width: 100%;
        min-width: 980px;
        font-size: 0.94rem;
    }
    #transactionsView .transactions-table th,
    #transactionsView .transactions-table td {
        padding-left: 12px;
        padding-right: 12px;
        vertical-align: middle;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    #transactionsView .transactions-table th:nth-child(1),
    #transactionsView .transactions-table td:nth-child(1) { width: 140px; }
    #transactionsView .transactions-table th:nth-child(2),
    #transactionsView .transactions-table td:nth-child(2) { width: 120px; }
    #transactionsView .transactions-table th:nth-child(3),
    #transactionsView .transactions-table td:nth-child(3) { width: 290px; }
    #transactionsView .transactions-table th:nth-child(4),
    #transactionsView .transactions-table td:nth-child(4) { width: 135px; }
    #transactionsView .transactions-table th:nth-child(5),
    #transactionsView .transactions-table td:nth-child(5) { width: 115px; }
    #transactionsView .transactions-table th:nth-child(6),
    #transactionsView .transactions-table td:nth-child(6) { width: 115px; }
    #transactionsView .transactions-table th:nth-child(7),
    #transactionsView .transactions-table td:nth-child(7) { width: 110px; }
    #transactionsView .transactions-table td:nth-child(5),
    #transactionsView .transactions-table td:nth-child(6) {
        white-space: nowrap;
    }

    #paymentsView .transactions-table {
        table-layout: fixed;
        width: 100%;
        min-width: 1120px;
        font-size: 0.94rem;
    }
    #paymentsView .transactions-table th,
    #paymentsView .transactions-table td {
        padding-left: 12px;
        padding-right: 12px;
        vertical-align: middle;
    }
    #paymentsView .transactions-table th:nth-child(1),
    #paymentsView .transactions-table td:nth-child(1) { width: 130px; }
    #paymentsView .transactions-table th:nth-child(2),
    #paymentsView .transactions-table td:nth-child(2) { width: 110px; }
    #paymentsView .transactions-table th:nth-child(3),
    #paymentsView .transactions-table td:nth-child(3) { width: 130px; }
    #paymentsView .transactions-table th:nth-child(4),
    #paymentsView .transactions-table td:nth-child(4) { width: 80px; }
    #paymentsView .transactions-table th:nth-child(5),
    #paymentsView .transactions-table td:nth-child(5) { width: 220px; }
    #paymentsView .transactions-table th:nth-child(6),
    #paymentsView .transactions-table td:nth-child(6) { width: 105px; }
    #paymentsView .transactions-table th:nth-child(7),
    #paymentsView .transactions-table td:nth-child(7) { width: 105px; }
    #paymentsView .transactions-table th:nth-child(8),
    #paymentsView .transactions-table td:nth-child(8) { width: 205px; }
    #paymentsView .transactions-table th:nth-child(9),
    #paymentsView .transactions-table td:nth-child(9) { width: 165px; }
    #paymentsView .transactions-table td {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    #paymentsView .transactions-table td:nth-child(1),
    #paymentsView .transactions-table td:nth-child(5),
    #paymentsView .transactions-table td:nth-child(8) {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    #paymentsView .transactions-table td:nth-child(4),
    #paymentsView .transactions-table td:nth-child(6),
    #paymentsView .transactions-table td:nth-child(7) {
        white-space: nowrap;
    }
    #paymentsView .transactions-table td:nth-child(9) .receipt-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 8px 10px;
        font-size: 0.82rem;
        line-height: 1.2;
        max-width: 100%;
    }
    #paymentsView .transactions-table td:nth-child(9) .receipt-btn + .receipt-btn {
        margin-top: 8px;
    }

    #backupSettingsView .transactions-table {
        table-layout: fixed;
        width: 100%;
        min-width: 760px;
        font-size: 0.94rem;
    }
    #backupSettingsView .transactions-table th,
    #backupSettingsView .transactions-table td {
        padding-left: 12px;
        padding-right: 12px;
        vertical-align: middle;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    #backupSettingsView .transactions-table th:nth-child(1),
    #backupSettingsView .transactions-table td:nth-child(1) { width: 330px; }
    #backupSettingsView .transactions-table th:nth-child(2),
    #backupSettingsView .transactions-table td:nth-child(2) { width: 100px; }
    #backupSettingsView .transactions-table th:nth-child(3),
    #backupSettingsView .transactions-table td:nth-child(3) { width: 180px; }
    #backupSettingsView .transactions-table th:nth-child(4),
    #backupSettingsView .transactions-table td:nth-child(4) { width: 150px; }
    #backupSettingsView .transactions-table td:nth-child(4) .receipt-btn,
    #backupSettingsView .transactions-table td:nth-child(4) .btn-secondary {
        white-space: nowrap;
    }

    #transactionsView .transactions-table th,
    #paymentsView .transactions-table th,
    #settingsView .transactions-table th,
    #usersView .user-table th {
        white-space: nowrap;
    }

    #transactionsView .transactions-table td,
    #paymentsView .transactions-table td,
    #settingsView .transactions-table td,
    #usersView .user-table td {
        vertical-align: middle;
    }

    #transactionsView .transactions-table td:last-child .receipt-btn,
    #paymentsView .transactions-table td:last-child .receipt-btn,
    #settingsView .transactions-table td:last-child .btn-secondary {
        white-space: nowrap;
    }
}

@media (max-width: 1180px) {
    .admin-user-balance-tool {
        grid-template-columns: minmax(0, 1fr) minmax(160px, max-content);
    }
    .admin-user-balance-result {
        grid-template-columns: 1fr;
    }
    .admin-user-balance-fields {
        grid-template-columns: 1fr 1.4fr;
    }
    .admin-user-balance-actions {
        justify-content: start;
        grid-template-columns: repeat(2, minmax(150px, 190px));
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body.dashboard {
        overflow-x: hidden;
    }
    .admin-table-scroll {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    .dashboard-container {
        flex-direction: column;
        max-width: 100%;
    }
    .sidebar {
        width: 100%;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        border-right: none;
        border-top: none;
        background: transparent;
        box-shadow: none;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    }
    .sidebar-header,
    .sidebar-footer {
        display: none;
    }
    .sidebar-nav {
        flex: none;
        padding: 0;
    }
    .mobile-only-nav {
        display: block;
    }
    .sidebar-nav ul {
        position: relative;
        display: block;
        height: 76px;
        overflow: hidden;
        padding: 4px 6px;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid #dcd3d2;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    .sidebar-nav ul::before {
        content: none;
    }
    .sidebar-nav ul li {
        margin: 0;
        position: absolute;
        top: 4px;
        left: 50%;
        width: clamp(82px, 28vw, 108px);
        transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease, filter 0.26s ease;
        z-index: 1;
        transform: translateX(calc(-50% + var(--nav-shift, 0px))) scale(0.85);
        opacity: 0;
        filter: blur(0.4px);
    }
    .sidebar-nav ul li a {
        border-left: none;
        border-radius: 11px;
        width: 100%;
        min-height: 66px;
        padding: 8px 4px 7px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 0.68rem;
        line-height: 1.2;
        color: #5d6d7e;
        background: #f8f4f3;
    }
    .sidebar-nav ul li a i {
        margin-right: 0;
        font-size: 0.98rem;
        width: auto;
        color: inherit;
    }
    .sidebar-nav ul li.nav-pos-center {
        z-index: 4;
        opacity: 1;
        filter: none;
        transform: translateX(calc(-50% + var(--nav-shift, 0px))) scale(1);
    }
    .sidebar-nav ul li.nav-pos-left,
    .sidebar-nav ul li.nav-pos-right {
        z-index: 3;
        opacity: 0.92;
        filter: none;
        transform: translateX(calc(-50% + var(--nav-shift, 0px))) scale(0.92);
    }
    .sidebar-nav ul li.nav-pos-far-left,
    .sidebar-nav ul li.nav-pos-far-right {
        z-index: 2;
        opacity: 0.4;
        filter: blur(0.3px);
        transform: translateX(calc(-50% + var(--nav-shift, 0px))) scale(0.82);
    }
    .sidebar-nav ul li.nav-hidden {
        z-index: 1;
        opacity: 0;
        pointer-events: none;
    }
    .sidebar-nav ul li.nav-pos-center a {
        background: #2c3e50;
        color: #ffffff;
    }
    .sidebar-nav ul li.nav-pos-center.mobile-only-nav a {
        background: #991b1b;
        color: #ffffff;
    }
    .sidebar-nav ul li.mobile-only-nav a {
        color: #b91c1c;
        background: #fff1f2;
    }
    .sidebar-nav ul li.nav-pos-center a i {
        animation: mobileNavIconSpin 0.32s ease;
        color: inherit;
    }
    .main-content {
        padding: 16px 14px 98px;
        max-width: 100%;
        overflow-x: hidden;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    .header-left h1 {
        font-size: 1.7rem;
        line-height: 1.2;
    }
    .header-right {
        width: 100%;
        max-width: 100%;
    }
    .header-right .user-info {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        padding: 8px 12px;
    }
    .balance-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 16px;
        border-radius: 14px;
    }
    .balance-info h2 {
        font-size: 2rem;
    }
    .direct-pay-info {
        padding: 12px;
        margin-bottom: 18px;
    }
    .promo-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .promo-side {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .promo-countdown {
        text-align: left;
    }
    .promo-dots {
        width: 100%;
        justify-content: flex-start;
    }
    .ongoing-orders {
        padding: 14px;
        border-radius: 14px;
    }
    .section-heading-row {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .section-heading-row .compact-action {
        width: 100%;
    }
    .ongoing-order-card {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 12px;
    }
    .ongoing-order-side {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    .ongoing-order-actions {
        justify-content: stretch;
    }
    .ongoing-order-actions .compact-action {
        flex: 1 1 130px;
    }
    .menu-shortcut-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .menu-shortcut-card {
        min-height: 84px;
        padding: 8px 6px;
    }
    .menu-shortcut-card i {
        font-size: 1.05rem;
    }
    .menu-shortcut-card span {
        font-size: 0.75rem;
    }
    .shortcut-flow-body {
        grid-template-columns: 1fr;
    }
    .shortcut-flow-panel {
        padding: 12px;
        border-radius: 12px;
    }
    .shortcut-flow-head {
        align-items: flex-start;
    }
    .shortcut-flow-body .checkout-actions {
        justify-content: stretch;
    }
    .shortcut-flow-body .checkout-actions .btn-primary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 14px;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }
    .shortcut-flow-body .checkout-status {
        overflow-wrap: anywhere;
        line-height: 1.55;
    }
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-header {
        align-items: stretch;
        flex-direction: column;
    }
    .product-browser {
        grid-template-columns: 1fr;
    }
    .browser-column-category .filter-chip-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .browser-column-category .filter-chip {
        min-height: 86px;
    }
    .product-filters {
        grid-template-columns: 1fr;
    }
    #buyView .product-filters {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .product-type-filter {
        margin-top: 0;
        padding-bottom: 4px;
    }
    .type-filter-chip {
        max-width: 150px;
        min-height: 34px;
        padding: 7px 9px;
        font-size: 0.82rem;
    }
    .prepaid-product-grid:not(.grouped-by-type),
    .product-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .product-type-group {
        padding: 10px;
        border-radius: 12px;
    }
    .product-type-group-head {
        gap: 8px;
        margin-bottom: 10px;
    }
    .product-type-count {
        white-space: nowrap;
        padding: 5px 8px;
        font-size: 0.72rem;
    }
    .prepaid-product-card {
        min-height: 188px;
        padding: 10px;
        border-radius: 10px;
    }
    .prepaid-product-top {
        gap: 8px;
        margin-bottom: 8px;
    }
    .prepaid-product-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
    .product-badge {
        max-width: 74px;
        padding: 4px 7px;
        font-size: 0.68rem;
    }
    .prepaid-product-card h3 {
        min-height: 42px;
        margin-bottom: 6px;
        font-size: 0.86rem;
        line-height: 1.22;
    }
    .product-meta,
    .product-sku {
        font-size: 0.76rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .product-price {
        margin: 10px 0 8px;
        font-size: 1rem;
    }
    .prepaid-product-card .btn-service {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding: 9px 10px;
        font-size: 0.85rem;
    }
    .checkout-account-grid {
        grid-template-columns: 1fr;
    }
    .checkout-panel {
        padding: 16px 14px;
        border-radius: 14px;
    }
    .checkout-header {
        gap: 10px;
    }
    .checkout-header h2 {
        font-size: 1.1rem;
    }
    .checkout-summary {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }
    .checkout-summary div {
        padding: 10px 12px;
    }
    .checkout-progress {
        grid-template-columns: repeat(4, minmax(58px, 1fr));
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .checkout-progress-item {
        flex-direction: column;
        gap: 4px;
        min-width: 58px;
        padding: 8px 6px;
        font-size: 0.72rem;
        white-space: nowrap;
    }
    .checkout-actions {
        justify-content: stretch;
    }
    .checkout-actions .btn-primary,
    .checkout-actions .btn-secondary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 14px;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }
    .checkout-payment-result {
        padding: 14px;
        border-radius: 16px;
    }
    .qris-card-head {
        gap: 10px;
    }
    .checkout-payment-result h3 {
        font-size: 1.05rem;
    }
    .qris-secure-badge {
        padding: 6px 8px;
        font-size: 0.76rem;
    }
    .qris-frame {
        width: min(100%, 292px);
        padding: 12px;
        border-radius: 16px;
    }
    .qris-frame::before,
    .qris-frame::after {
        width: 26px;
        height: 26px;
    }
    .qris-payment-info {
        border-radius: 12px;
        font-size: 0.9rem;
    }
    .payment-state-strip {
        align-items: flex-start;
        font-size: 0.88rem;
        line-height: 1.35;
    }
    .qris-hint-list {
        grid-template-columns: 1fr;
    }
    .checkout-payment-actions .btn-secondary {
        width: 100%;
    }
    .account-card {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-section-header {
        flex-direction: column;
    }
    .admin-transaction-filters {
        grid-template-columns: 1fr;
    }
    .admin-transaction-filters label {
        margin-bottom: -4px;
    }
    .admin-transaction-filters input,
    .admin-transaction-filters select,
    .admin-transaction-filters .fancy-filter-select,
    .admin-transaction-filters .btn-secondary {
        width: 100%;
        min-width: 0;
    }
    .admin-transaction-filters input[type="search"] {
        min-width: 100%;
    }
    .admin-pagination {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        justify-content: stretch;
    }
    .admin-pagination .btn-secondary {
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        white-space: nowrap;
    }
    .admin-pagination .btn-secondary:first-child {
        justify-self: stretch;
    }
    .admin-pagination .btn-secondary:last-child {
        justify-self: stretch;
    }
    .admin-pagination span {
        min-width: 0;
        text-align: center;
        white-space: nowrap;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .admin-overview-filter {
        align-items: stretch;
        flex-direction: column;
    }
    .overview-filter-controls {
        justify-content: stretch;
    }
    .overview-filter-controls select,
    .overview-filter-controls input,
    .overview-filter-controls .btn-secondary {
        width: 100%;
    }
    .admin-overview-grid {
        grid-template-columns: 1fr;
    }
    .admin-finance-panel {
        grid-column: auto;
    }
    .finance-breakdown {
        grid-template-columns: 1fr;
    }
    .circle-metrics {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .circle-detail {
        width: 100%;
    }

    /* Riwayat user: kartu padat. Nama produk jadi judul, nominal dan status
       sebaris, tanggal kecil di bawahnya. Label kolom dibuang karena isinya
       sudah jelas dengan sendirinya dan hanya memakan tinggi layar. */
    #historySection .transactions-table,
    #historySection .transactions-table tbody,
    #historySection .transactions-table tr,
    #historySection .transactions-table td {
        display: block;
        width: 100%;
    }
    #historySection .transactions-table thead {
        display: none;
    }
    #historySection .transactions-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 10px;
        row-gap: 2px;
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #f9f5f4;
        padding: 11px 13px;
        margin-bottom: 9px;
    }
    #historySection .transactions-table tbody td {
        border: none;
        padding: 0;
        color: #2c3e50;
        min-width: 0;
    }
    #historySection .transactions-table tbody td::before {
        content: none;
    }
    #historySection .transactions-table .tx-product {
        grid-column: 1 / -1;
        grid-row: 1;
        font-weight: 700;
        font-size: 0.97rem;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
    #historySection .transactions-table .tx-amount {
        grid-column: 1;
        grid-row: 2;
        font-weight: 700;
        color: #0f766e;
        white-space: nowrap;
    }
    #historySection .transactions-table .tx-status {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
    #historySection .transactions-table .tx-date {
        grid-column: 1 / -1;
        grid-row: 3;
        font-size: 0.79rem;
        color: #8b8482;
        white-space: nowrap;
    }
    #historySection .transactions-table .tx-action {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-top: 7px;
    }
    #historySection .transactions-table .tx-action-buttons {
        display: flex;
        gap: 8px;
        min-width: 0;
    }
    #historySection .transactions-table .tx-action-buttons > * {
        flex: 1 1 0;
        justify-content: center;
    }
    #historySection .transactions-table .tx-action .receipt-btn {
        margin-left: 0;
        padding: 7px 10px;
        border-radius: 8px;
    }
    .transaction-detail-overlay {
        padding-top: 18px;
    }
    .transaction-detail-dialog {
        max-height: calc(100vh - 34px);
        max-height: calc(100dvh - 34px);
    }
    .transaction-detail-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .transaction-detail-grid strong {
        margin-bottom: 8px;
    }

    /* Produk admin: ubah tabel jadi kartu agar kolom tidak kepotong */
    #productsSection .admin-product-table-scroll {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    #productsSection .admin-product-table {
        min-width: 0 !important;
        table-layout: auto;
    }
    #productsSection .transactions-table,
    #productsSection .transactions-table tbody,
    #productsSection .transactions-table tr,
    #productsSection .transactions-table td {
        display: block;
        width: 100%;
    }
    #productsSection .transactions-table thead {
        display: none;
    }
    #productsSection .transactions-table tbody tr {
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #fff;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #productsSection .transactions-table tbody td {
        border: none;
        padding: 6px 0;
        display: grid;
        grid-template-columns: 96px 1fr;
        gap: 8px;
        align-items: start;
        color: #2c3e50;
        overflow-wrap: anywhere;
    }
    #productsSection .transactions-table tbody td::before {
        content: attr(data-label);
        color: #7f8c8d;
        font-weight: 600;
        font-size: 0.82rem;
    }
    #productsSection .transactions-table tbody td .status,
    #productsSection .transactions-table tbody td .receipt-btn {
        justify-self: start;
    }

    /* Transaksi admin: ubah tabel jadi kartu agar rapi di mobile */
    #transactionsView .transactions-table,
    #transactionsView .transactions-table tbody,
    #transactionsView .transactions-table tr,
    #transactionsView .transactions-table td {
        display: block !important;
        width: 100% !important;
    }
    #transactionsView .transactions-table thead {
        display: none;
    }
    #transactionsView .transactions-table tbody tr {
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #fff;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #transactionsView .transactions-table tbody td {
        border: none;
        padding: 6px 0;
        display: grid !important;
        grid-template-columns: 96px 1fr;
        gap: 8px;
        align-items: start;
        color: #2c3e50;
        overflow-wrap: anywhere;
    }
    #transactionsView .transactions-table tbody td::before {
        content: attr(data-label);
        color: #7f8c8d;
        font-weight: 600;
        font-size: 0.82rem;
    }
    #transactionsView .transactions-table tbody td .status,
    #transactionsView .transactions-table tbody td .receipt-btn {
        justify-self: start;
    }
    #transactionsView .recent-transactions {
        overflow-x: hidden;
    }

    /* Pembayaran admin: ubah tabel jadi kartu agar rapi di mobile */
    #paymentsView .transactions-table,
    #paymentsView .transactions-table tbody,
    #paymentsView .transactions-table tr,
    #paymentsView .transactions-table td {
        display: block !important;
        width: 100% !important;
    }
    #paymentsView .transactions-table thead {
        display: none;
    }
    #paymentsView .transactions-table tbody tr {
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #fff;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #paymentsView .transactions-table tbody td {
        border: none;
        padding: 6px 0;
        display: grid !important;
        grid-template-columns: 96px 1fr;
        gap: 8px;
        align-items: start;
        color: #2c3e50;
        overflow-wrap: anywhere;
    }
    #paymentsView .transactions-table tbody td::before {
        content: attr(data-label);
        color: #7f8c8d;
        font-weight: 600;
        font-size: 0.82rem;
    }
    #paymentsView .transactions-table tbody td .status,
    #paymentsView .transactions-table tbody td .receipt-btn {
        justify-self: start;
    }
    #paymentsView .recent-transactions {
        overflow-x: hidden;
    }

    /* Pengguna admin: ubah tabel jadi kartu agar rapi di mobile */
    #usersView .user-table,
    #usersView .user-table tbody,
    #usersView .user-table tr,
    #usersView .user-table td {
        display: block !important;
        width: 100% !important;
    }
    #usersView .user-table thead {
        display: none;
    }
    #usersView .user-table tbody tr {
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #fff;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #usersView .user-table tbody td {
        border: none;
        padding: 6px 0;
        display: grid !important;
        grid-template-columns: 80px 1fr;
        gap: 8px;
        align-items: start;
        color: #2c3e50;
        overflow-wrap: anywhere;
    }
    #usersView .user-table tbody td::before {
        content: attr(data-label);
        color: #7f8c8d;
        font-weight: 600;
        font-size: 0.82rem;
    }
    #usersView .user-list {
        overflow-x: hidden;
    }
    .admin-user-balance-result {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .admin-user-balance-tool {
        grid-template-columns: 1fr;
    }
    .admin-user-balance-fields,
    .admin-user-balance-actions {
        grid-template-columns: 1fr;
    }
    .admin-user-balance-tool > .form-group,
    .admin-user-balance-tool > #userBalanceSearchBtn,
    .admin-user-balance-actions .btn-primary,
    .admin-user-balance-actions .btn-secondary {
        width: 100%;
        max-width: none;
    }

    /* Setting admin: form full-width + tabel backup mode kartu */
    #settingsView .admin-pricing-config,
    #operationsSettingsView .admin-pricing-config,
    #developmentSettingsView .admin-pricing-config,
    #paymentGatewayView .admin-pricing-config,
    #backupSettingsView .admin-pricing-config {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    #settingsView .admin-pricing-config .form-group,
    #operationsSettingsView .admin-pricing-config .form-group,
    #developmentSettingsView .admin-pricing-config .form-group,
    #paymentGatewayView .admin-pricing-config .form-group,
    #backupSettingsView .admin-pricing-config .form-group {
        min-width: 0;
        width: 100%;
    }
    .admin-cutoff-grid {
        grid-template-columns: 1fr;
    }
    .admin-balance-monitor {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }
    .admin-balance-monitor .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    #settingsView .admin-pricing-config .btn-primary,
    #settingsView .admin-pricing-config .btn-secondary,
    #operationsSettingsView .admin-pricing-config .btn-primary,
    #operationsSettingsView .admin-pricing-config .btn-secondary,
    #developmentSettingsView .admin-pricing-config .btn-primary,
    #developmentSettingsView .admin-pricing-config .btn-secondary,
    #paymentGatewayView .admin-pricing-config .btn-primary,
    #paymentGatewayView .admin-pricing-config .btn-secondary,
    #backupSettingsView .admin-pricing-config .btn-primary,
    #backupSettingsView .admin-pricing-config .btn-secondary {
        width: 100%;
    }
    #backupSettingsView .transactions-table,
    #backupSettingsView .transactions-table tbody,
    #backupSettingsView .transactions-table tr,
    #backupSettingsView .transactions-table td {
        display: block !important;
        width: 100% !important;
    }
    #backupSettingsView .transactions-table thead {
        display: none;
    }
    #backupSettingsView .transactions-table tbody tr {
        border: 1px solid #e9e1e0;
        border-radius: 12px;
        background: #fff;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #backupSettingsView .transactions-table tbody td {
        border: none;
        padding: 6px 0;
        display: grid !important;
        grid-template-columns: 108px 1fr;
        gap: 8px;
        align-items: start;
        color: #2c3e50;
        overflow-wrap: anywhere;
    }
    #backupSettingsView .transactions-table tbody td::before {
        content: attr(data-label);
        color: #7f8c8d;
        font-weight: 600;
        font-size: 0.82rem;
    }
    #settingsView .admin-products,
    #operationsSettingsView .admin-products,
    #brandLogosView .admin-products,
    #paymentGatewayView .admin-products,
    #backupSettingsView .admin-products,
    #backupSettingsView .recent-transactions {
        overflow-x: hidden;
    }
    .brand-logo-toolbar,
    .brand-logo-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .brand-logo-toolbar .product-search,
    .brand-logo-actions .btn-primary,
    .brand-logo-actions .btn-secondary {
        width: 100%;
    }
    .brand-logo-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }
    .brand-logo-preview {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 860px) {
    .login-page {
        padding: 14px;
        place-items: start center;
    }

    .login-container {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 560px;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 18px;
        gap: 22px;
    }

    .login-brand-copy h1 {
        font-size: 2rem;
    }

    .login-brand-copy p:not(.login-eyebrow) {
        font-size: 0.95rem;
    }

    .login-feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .login-feature-grid div {
        min-height: 74px;
        padding: 10px 8px;
        text-align: center;
        justify-items: center;
    }

    .login-feature-grid span {
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .login-card {
        max-height: none;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }

    .login-brand-panel {
        padding: 14px;
    }

    .login-card {
        padding: 14px;
    }

    .login-card-brand {
        margin-bottom: 16px;
    }

    .login-header h2 {
        font-size: 1.45rem;
    }

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

    .auth-tabs {
        gap: 6px;
        padding: 5px;
    }

    .auth-tab {
        padding: 9px 8px;
    }

    .form-group {
        margin-bottom: 14px;
    }
}

/* ===== Simple Login Layout ===== */
body.login-page {
    background: #f8faf8;
    min-height: 100vh;
    padding: 24px;
}

body.login-page .login-container {
    max-width: 460px;
    display: block;
}

body.login-page .login-brand-panel {
    display: none;
}

body.login-page .login-card {
    max-height: none;
    overflow: visible;
    padding: 26px;
    border: 1px solid #e4dbda;
    border-radius: 8px;
    background: #fffdf7;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
}

body.login-page .login-header {
    margin-bottom: 18px;
}

body.login-page .login-card-brand {
    margin-bottom: 18px;
}

body.login-page .login-card-brand .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

body.login-page .login-card-brand .brand-mark-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
}

body.login-page .login-header h2 {
    font-size: 1.42rem;
    margin-bottom: 4px;
}

body.login-page .login-header p,
body.login-page .auth-message {
    font-size: 0.9rem;
}

body.login-page .auth-tabs {
    margin-bottom: 16px;
    background: #f4efee;
    box-shadow: none;
}

body.login-page .auth-tab {
    min-height: 40px;
}

body.login-page .form-group {
    margin-bottom: 14px;
}

body.login-page .form-group label {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

body.login-page .form-group input,
body.login-page .form-group select {
    min-height: 44px;
    font-size: 0.95rem;
}

body.login-page .btn-login-submit {
    min-height: 46px;
    box-shadow: none;
}

body.login-page .captcha-box,
body.login-page .otp-target {
    background: #ffffff;
}

@media (max-width: 480px) {
    body.login-page {
        padding: 12px;
        place-items: start center;
    }

    body.login-page .login-card {
        padding: 18px;
    }
}
/* ===== About Section ===== */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 15px;
    color: #34495e;
    line-height: 1.8;
}

.about-text strong {
    color: #2c3e50;
}

.about-stats {
    flex: 1;
    min-width: 250px;
    background-color: #f9f5f4;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #dcd3d2;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    font-size: 2.2rem;
    color: #7f8c8d;
    width: 50px;
    text-align: center;
}

.stat-item h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-item p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    .navbar {
        padding: 10px 0;
    }

    .navbar .container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .navbar-brand h2 {
        font-size: 1.9rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .navbar-menu {
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .navbar-menu::-webkit-scrollbar {
        display: none;
    }

    .navbar-menu a {
        margin-left: 0;
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 7px 10px;
        border-radius: 999px;
        border: 1px solid #dfd6d5;
        background: #f9f5f4;
        font-size: 0.88rem;
    }

    .navbar-menu a:hover {
        background: #efe7e6;
    }

    .navbar-menu .btn-login {
        order: -1;
        margin-left: 0;
        padding: 7px 14px;
        border-color: #2c3e50;
        background-color: #2c3e50;
        color: white !important;
    }

    .about-content {
        flex-direction: column;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #buyView .product-filters {
        grid-template-columns: minmax(180px, 0.95fr) minmax(170px, 1.05fr);
        align-items: center;
    }
}

@media (max-width: 480px) {
    #buyView .product-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .monitoring-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monitoring-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.dashboard:not(.user-dashboard) .main-content {
        padding: 14px 12px 96px;
    }

    body.dashboard:not(.user-dashboard) .dashboard-header {
        margin: -14px -12px 16px;
        padding: 14px 12px;
    }

    body.dashboard:not(.user-dashboard) .admin-products,
    body.dashboard:not(.user-dashboard) .recent-transactions,
    body.dashboard:not(.user-dashboard) .topup-panel,
    body.dashboard:not(.user-dashboard) .account-section,
    body.dashboard:not(.user-dashboard) .admin-monitoring {
        border-radius: 10px;
        padding: 14px;
    }

    .monitoring-grid,
    .monitoring-panels {
        grid-template-columns: 1fr;
    }

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

    .monitor-card {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 12px;
    }

    .monitor-icon {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 420px) {
    .monitoring-metrics {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin UI/UX Redesign ===== */
body.dashboard:not(.user-dashboard) {
    --admin-bg: #f4f7f1;
    --admin-surface: #fffef8;
    --admin-surface-strong: #ffffff;
    --admin-sidebar: #10221f;
    --admin-sidebar-soft: #17302c;
    --admin-text: #17201e;
    --admin-muted: #6f7c79;
    --admin-line: rgba(23, 32, 30, 0.12);
    --admin-accent: #0f8f82;
    --admin-accent-soft: #e2f3ef;
    --admin-lime: #c9f542;
    --admin-danger: #d94f45;
    --admin-shadow: 0 18px 42px rgba(29, 44, 39, 0.09);
    background:
        radial-gradient(circle at 72% 6%, rgba(201, 245, 66, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(15, 143, 130, 0.09) 0 22%, transparent 22% 100%),
        var(--admin-bg);
    color: var(--admin-text);
}

body.dashboard:not(.user-dashboard) .dashboard-container {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

body.dashboard:not(.user-dashboard) .sidebar {
    position: sticky;
    top: 0;
    width: 292px;
    height: 100vh;
    padding: 22px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(23, 48, 44, 0.96), rgba(16, 34, 31, 0.98)),
        var(--admin-sidebar);
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.13);
    color: #f9fff8;
}

body.dashboard:not(.user-dashboard) .sidebar-header {
    padding: 6px 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dashboard:not(.user-dashboard) .sidebar-header h2 {
    color: #ffffff;
    font-size: 1.35rem;
    letter-spacing: 0;
}

body.dashboard:not(.user-dashboard) .sidebar-header p {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 700;
}

body.dashboard:not(.user-dashboard) .sidebar-nav {
    padding: 18px 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li {
    margin: 3px 0;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li a {
    min-height: 46px;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
    gap: 10px;
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.06);
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li.active a,
body.dashboard:not(.user-dashboard) .sidebar-nav ul li a:hover {
    color: #ffffff;
    border-color: rgba(201, 245, 66, 0.28);
    background: rgba(255, 255, 255, 0.09);
}

body.dashboard:not(.user-dashboard) .sidebar-nav ul li.active a i,
body.dashboard:not(.user-dashboard) .sidebar-nav ul li a:hover i {
    color: #10221f;
    background: var(--admin-lime);
}

body.dashboard:not(.user-dashboard) .sidebar-footer {
    padding: 16px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dashboard:not(.user-dashboard) .sidebar-footer a {
    min-height: 44px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffd7d3;
    background: rgba(217, 79, 69, 0.13);
}

body.dashboard:not(.user-dashboard) .main-content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 28px;
    overflow-x: hidden;
}

body.dashboard:not(.user-dashboard) .dashboard-header {
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: rgba(255, 254, 248, 0.88);
    box-shadow: var(--admin-shadow);
}

body.dashboard:not(.user-dashboard) .header-left h1 {
    color: var(--admin-text);
    font-size: clamp(1.45rem, 2.1vw, 2rem);
    line-height: 1.1;
}

body.dashboard:not(.user-dashboard) .user-info {
    min-height: 46px;
    border-color: var(--admin-line);
    border-radius: 999px;
    background: var(--admin-surface-strong);
    box-shadow: none;
    color: var(--admin-text);
    font-weight: 800;
}

body.dashboard:not(.user-dashboard) .dashboard-view.active {
    display: grid;
    gap: 18px;
    width: min(100%, 1480px);
    max-width: 100%;
    margin-inline: auto;
    min-width: 0;
}

body.dashboard:not(.user-dashboard) .dashboard-header {
    width: min(100%, 1480px);
    max-width: 100%;
    margin-inline: auto;
    margin-bottom: 22px;
}

body.dashboard:not(.user-dashboard) .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 0;
}

body.dashboard:not(.user-dashboard) .stat-card {
    min-height: 132px;
    padding: 20px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 254, 248, 0.94));
    box-shadow: var(--admin-shadow);
}

body.dashboard:not(.user-dashboard) .stat-card i,
body.dashboard:not(.user-dashboard) .admin-overview-head i,
body.dashboard:not(.user-dashboard) .monitor-icon {
    color: var(--admin-accent);
    background: var(--admin-accent-soft);
}

body.dashboard:not(.user-dashboard) .stat-card h3 {
    color: var(--admin-text);
    font-size: clamp(1.55rem, 2vw, 2.1rem);
}

body.dashboard:not(.user-dashboard) .stat-card p,
body.dashboard:not(.user-dashboard) .admin-section-header p,
body.dashboard:not(.user-dashboard) .brand-logo-toolbar p {
    color: var(--admin-muted);
}

body.dashboard:not(.user-dashboard) .admin-overview-filter,
body.dashboard:not(.user-dashboard) .admin-overview-panel,
body.dashboard:not(.user-dashboard) .admin-products,
body.dashboard:not(.user-dashboard) .recent-transactions,
body.dashboard:not(.user-dashboard) .topup-panel,
body.dashboard:not(.user-dashboard) .account-section,
body.dashboard:not(.user-dashboard) .admin-monitoring,
body.dashboard:not(.user-dashboard) .user-list {
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: rgba(255, 254, 248, 0.92);
    box-shadow: var(--admin-shadow);
}

body.dashboard:not(.user-dashboard) .admin-products,
body.dashboard:not(.user-dashboard) .recent-transactions,
body.dashboard:not(.user-dashboard) .user-list,
body.dashboard:not(.user-dashboard) .admin-monitoring {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    padding: 22px;
    margin-top: 0;
    margin-bottom: 0;
}

body.dashboard:not(.user-dashboard) .admin-transaction-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    max-width: 100%;
    overflow: visible;
}

body.dashboard:not(.user-dashboard) .admin-transaction-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    align-items: stretch;
    max-width: 100%;
    overflow: visible;
}

body.dashboard:not(.user-dashboard) .product-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(23, 32, 30, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    overflow: visible;
}

body.dashboard:not(.user-dashboard) .admin-filter-field,
body.dashboard:not(.user-dashboard) .admin-filter-actions {
    min-width: 0;
    overflow: visible;
    border: 1px solid rgba(23, 32, 30, 0.1);
    border-radius: 12px;
    background: #fffef8;
    padding: 10px;
}

body.dashboard:not(.user-dashboard) .admin-filter-field {
    display: grid;
    gap: 7px;
    align-content: start;
}

body.dashboard:not(.user-dashboard) .admin-filter-field label {
    color: #6f7c79;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

body.dashboard:not(.user-dashboard) .admin-filter-field input,
body.dashboard:not(.user-dashboard) .admin-filter-field select,
body.dashboard:not(.user-dashboard) .admin-filter-field .fancy-filter-select,
body.dashboard:not(.user-dashboard) .admin-filter-field .product-search {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

body.dashboard:not(.user-dashboard) .admin-filter-field input,
body.dashboard:not(.user-dashboard) .admin-filter-field .fancy-filter-trigger,
body.dashboard:not(.user-dashboard) .admin-filter-field .product-search {
    min-height: 44px;
}

body.dashboard:not(.user-dashboard) .admin-filter-search {
    grid-column: span 2;
}

body.dashboard:not(.user-dashboard) .admin-filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

body.dashboard:not(.user-dashboard) .admin-filter-actions .btn-secondary,
body.dashboard:not(.user-dashboard) .admin-filter-actions .btn-primary {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
}

body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters label[for="txDateFrom"],
body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters label[for="txDateTo"],
body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters label[for="txStatus"],
body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters label[for="payTypeFilter"],
body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters label[for="payStatusFilter"] {
    grid-column: auto;
}

body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters input[type="date"],
body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters .fancy-filter-select,
body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters .fancy-filter-select {
    grid-column: auto;
}

body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters input[type="search"],
body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters input[type="search"] {
    grid-column: auto;
}

body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters .btn-secondary,
body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters .btn-secondary {
    grid-column: auto;
}

body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters input[type="search"] {
    grid-column: auto;
}

body.dashboard:not(.user-dashboard) .admin-section-header {
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(23, 32, 30, 0.08);
}

body.dashboard:not(.user-dashboard) .admin-section-header h2,
body.dashboard:not(.user-dashboard) .recent-transactions h2,
body.dashboard:not(.user-dashboard) .user-list h2,
body.dashboard:not(.user-dashboard) .topup-panel h3 {
    color: var(--admin-text);
    font-size: 1.35rem;
    line-height: 1.15;
}

body.dashboard:not(.user-dashboard) .admin-pricing-config,
body.dashboard:not(.user-dashboard) .product-sync-stats div,
body.dashboard:not(.user-dashboard) .finance-breakdown div,
body.dashboard:not(.user-dashboard) .circle-detail div,
body.dashboard:not(.user-dashboard) .monitor-card,
body.dashboard:not(.user-dashboard) .monitoring-metrics div,
body.dashboard:not(.user-dashboard) .monitor-panel,
body.dashboard:not(.user-dashboard) .brand-logo-card,
body.dashboard:not(.user-dashboard) .brand-logo-empty,
body.dashboard:not(.user-dashboard) .admin-user-balance-result {
    border-color: rgba(23, 32, 30, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
}

body.dashboard:not(.user-dashboard) input,
body.dashboard:not(.user-dashboard) select,
body.dashboard:not(.user-dashboard) textarea,
body.dashboard:not(.user-dashboard) .fancy-filter-trigger {
    border-color: rgba(23, 32, 30, 0.14);
    border-radius: 10px;
    background-color: #fffef8;
}

body.dashboard:not(.user-dashboard) input:focus,
body.dashboard:not(.user-dashboard) select:focus,
body.dashboard:not(.user-dashboard) textarea:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 4px rgba(15, 143, 130, 0.13);
    outline: none;
}

body.dashboard:not(.user-dashboard) .btn-primary,
body.dashboard:not(.user-dashboard) .btn-secondary,
body.dashboard:not(.user-dashboard) .receipt-btn {
    border-radius: 10px;
    font-weight: 900;
}

body.dashboard:not(.user-dashboard) .btn-primary {
    color: #fff;
    background: #23384a;
    box-shadow: 0 12px 26px rgba(35, 56, 74, 0.16);
}

body.dashboard:not(.user-dashboard) .btn-secondary,
body.dashboard:not(.user-dashboard) .receipt-btn {
    color: #23384a;
    border: 1px solid rgba(23, 32, 30, 0.14);
    background: #fffef8;
}

body.dashboard:not(.user-dashboard) .admin-table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    border-color: var(--admin-line);
    border-radius: 12px;
    background: #fffef8;
}

body.dashboard:not(.user-dashboard) .dashboard-view.active,
body.dashboard:not(.user-dashboard) #productsSection,
body.dashboard:not(.user-dashboard) #transactionsView .recent-transactions,
body.dashboard:not(.user-dashboard) #paymentsView .recent-transactions,
body.dashboard:not(.user-dashboard) #settingsView .admin-products,
body.dashboard:not(.user-dashboard) #operationsSettingsView .admin-products,
body.dashboard:not(.user-dashboard) #developmentSettingsView .admin-products,
body.dashboard:not(.user-dashboard) #paymentGatewayView .admin-products,
body.dashboard:not(.user-dashboard) #backupSettingsView .admin-products,
body.dashboard:not(.user-dashboard) #brandLogosView .admin-products {
    overflow: visible;
}

body.dashboard:not(.user-dashboard) .fancy-filter-select {
    position: relative;
    z-index: 30;
}

body.dashboard:not(.user-dashboard) .fancy-filter-select.open {
    z-index: 400;
}

body.dashboard:not(.user-dashboard) .fancy-filter-select.open .fancy-filter-menu {
    z-index: 450;
    max-height: min(320px, calc(100vh - 220px));
}

body.dashboard:not(.user-dashboard) .transactions-table th,
body.dashboard:not(.user-dashboard) .user-table th {
    color: #788481;
    font-size: 0.82rem;
    text-transform: uppercase;
}

body.dashboard:not(.user-dashboard) .transactions-table td,
body.dashboard:not(.user-dashboard) .user-table td {
    color: var(--admin-text);
}

body.dashboard:not(.user-dashboard) .transactions-table tbody tr:hover,
body.dashboard:not(.user-dashboard) .user-table tbody tr:hover {
    background: rgba(15, 143, 130, 0.05);
}

body.dashboard:not(.user-dashboard) .admin-pagination {
    justify-content: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 8px;
    border: 1px solid rgba(23, 32, 30, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
}

body.dashboard:not(.user-dashboard) .admin-pagination span {
    min-width: 130px;
    color: var(--admin-muted);
    font-weight: 800;
    text-align: center;
}

body.dashboard:not(.user-dashboard) .checkout-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(23, 32, 30, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
}

body.dashboard:not(.user-dashboard) .checkout-actions .btn-primary,
body.dashboard:not(.user-dashboard) .checkout-actions .btn-secondary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

body.dashboard:not(.user-dashboard) .admin-section-header > .btn-primary,
body.dashboard:not(.user-dashboard) .admin-section-header > .btn-secondary {
    min-width: 150px;
    min-height: 44px;
    justify-content: center;
}

@media (max-width: 1280px) {
    body.dashboard:not(.user-dashboard) .dashboard-container {
        grid-template-columns: 260px minmax(0, 1fr);
    }
    body.dashboard:not(.user-dashboard) .sidebar {
        width: 260px;
    }
    body.dashboard:not(.user-dashboard) .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters,
    body.dashboard:not(.user-dashboard) .product-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.dashboard:not(.user-dashboard) .admin-filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    body.dashboard:not(.user-dashboard) .dashboard-container {
        display: flex;
    }
    body.dashboard:not(.user-dashboard) .sidebar {
        position: fixed;
        inset: auto 0 0;
        z-index: 1000;
        width: 100%;
        height: auto;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-right: 0;
        background: transparent;
        box-shadow: none;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav {
        flex: none;
        padding: 0;
        overflow: visible;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul {
        border-color: rgba(255, 255, 255, 0.1);
        background:
            linear-gradient(145deg, rgba(200, 238, 74, 0.1), transparent 28%),
            #101418;
        box-shadow: 0 -12px 34px rgba(15, 23, 42, 0.18);
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li a {
        color: rgba(255, 255, 255, 0.7);
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.06);
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li a i {
        color: #c8ee4a;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.nav-pos-center a {
        color: #171b20;
        border-color: #c8ee4a;
        background: #c8ee4a;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.nav-pos-center a i {
        color: #171b20;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.mobile-only-nav a {
        color: #fecaca;
        border-color: rgba(248, 113, 113, 0.22);
        background: rgba(185, 28, 28, 0.16);
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.nav-pos-center.mobile-only-nav a {
        color: #ffffff;
        border-color: rgba(248, 113, 113, 0.34);
        background: #b91c1c;
    }
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.mobile-only-nav a i,
    body.dashboard:not(.user-dashboard) .sidebar-nav ul li.nav-pos-center.mobile-only-nav a i {
        color: inherit;
    }
    body.dashboard:not(.user-dashboard) .main-content {
        padding: 14px 12px 100px;
    }
    body.dashboard:not(.user-dashboard) .dashboard-header {
        margin: 0 0 16px;
        padding: 14px;
        border-radius: 12px;
    }
    body.dashboard:not(.user-dashboard) .dashboard-view.active {
        gap: 14px;
        width: 100%;
    }
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters,
    body.dashboard:not(.user-dashboard) .product-filters {
        grid-template-columns: 1fr;
    }
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters label,
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters input,
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters .fancy-filter-select,
    body.dashboard:not(.user-dashboard) #transactionsView .admin-transaction-filters .btn-secondary,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters label,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters input,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters .fancy-filter-select,
    body.dashboard:not(.user-dashboard) #paymentsView .admin-transaction-filters .btn-secondary {
        grid-column: auto;
    }
    body.dashboard:not(.user-dashboard) .admin-filter-search {
        grid-column: auto;
    }
    body.dashboard:not(.user-dashboard) .admin-pagination {
        width: 100%;
        grid-template-columns: 1fr auto 1fr;
    }
    body.dashboard:not(.user-dashboard) .stats-grid,
    body.dashboard:not(.user-dashboard) .admin-overview-grid {
        grid-template-columns: 1fr;
    }
    body.dashboard:not(.user-dashboard) .stat-card {
        min-height: 112px;
    }
    body.dashboard:not(.user-dashboard) .admin-products,
    body.dashboard:not(.user-dashboard) .recent-transactions,
    body.dashboard:not(.user-dashboard) .user-list,
    body.dashboard:not(.user-dashboard) .admin-monitoring,
    body.dashboard:not(.user-dashboard) .admin-overview-panel {
        padding: 14px;
        border-radius: 12px;
    }
}
