/* Portal Mitra Reload Pulsa */
:root {
    /* dark mode tokens */
    --rp-bg-deep:    #0f1629;
    --rp-bg-mid:     #182040;
    --rp-bg-soft:    #1e2d5a;
    --rp-text:       #f1f5ff;
    --rp-text-muted: rgba(225, 232, 255, 0.72);
    --rp-glass:      rgba(255, 255, 255, 0.08);
    --rp-glass-border: rgba(255, 255, 255, 0.14);
    --rp-accent:        #6366f1;
    --rp-accent-hover:  #818cf8;
    --rp-success: #10b981;
    --rp-warn:    #f59e0b;
    --rp-danger:  #f87171;
}

html[data-theme="light"] {
    /* light mode tokens — clean neutral palette */
    --rp-bg-deep:    #f1f5f9;
    --rp-bg-mid:     #e8edf5;
    --rp-bg-soft:    #dde3ef;
    --rp-text:       #0f172a;
    --rp-text-muted: #475569;
    --rp-label:      #1e293b;
    --rp-glass:             #ffffff;
    --rp-glass-border:      #e2e8f0;
    --rp-input-bg:          #ffffff;
    --rp-input-border:      #cbd5e1;
    --rp-input-border-focus: #6366f1;
    --rp-accent:        #4f46e5;
    --rp-accent-hover:  #4338ca;
    --rp-success: #059669;
    --rp-warn:    #d97706;
    --rp-danger:  #dc2626;
    --rp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --rp-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.05);
    --rp-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
    --rp-surface-muted: #f8fafc;
    --rp-surface-hover: #f1f5f9;
}

/* Mode terang — label & kotak input lebih kontras */
html[data-theme="light"] .mitra-field label,
html[data-theme="light"] .pos-field label,
html[data-theme="light"] .pos-checkout-row label,
html[data-theme="light"] .pos-form-section__title,
html[data-theme="light"] .pos-card__title,
html[data-theme="light"] .pos-page-head__title {
    color: var(--rp-label);
    opacity: 1;
}

html[data-theme="light"] .pos-field label,
html[data-theme="light"] .mitra-field label {
    font-weight: 600;
}

html[data-theme="light"] .mitra-input,
html[data-theme="light"] textarea.mitra-input,
html[data-theme="light"] select.mitra-input,
html[data-theme="light"] .pos-search,
html[data-theme="light"] .pos-field input,
html[data-theme="light"] .pos-field select,
html[data-theme="light"] .pos-field textarea,
html[data-theme="light"] .pos-checkout-row input,
html[data-theme="light"] .pos-supplier-select,
html[data-theme="light"] .pos-stok-form .pos-field input,
html[data-theme="light"] .pos-stok-form .pos-field select,
html[data-theme="light"] .admin-search,
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="url"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"] {
    background: var(--rp-input-bg);
    border: 1.5px solid var(--rp-input-border);
    color: var(--rp-text);
}

html[data-theme="light"] .mitra-input:focus,
html[data-theme="light"] textarea.mitra-input:focus,
html[data-theme="light"] select.mitra-input:focus,
html[data-theme="light"] .pos-search:focus,
html[data-theme="light"] .pos-field input:focus,
html[data-theme="light"] .pos-field select:focus,
html[data-theme="light"] .pos-field textarea:focus,
html[data-theme="light"] .pos-checkout-row input:focus,
html[data-theme="light"] .pos-supplier-select:focus,
html[data-theme="light"] .pos-stok-form .pos-field input:focus,
html[data-theme="light"] .pos-stok-form .pos-field select:focus {
    border-color: var(--rp-input-border-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.22);
    outline: none;
}

html[data-theme="light"] .mitra-input::placeholder,
html[data-theme="light"] .pos-search::placeholder,
html[data-theme="light"] .pos-field input::placeholder,
html[data-theme="light"] .pos-field textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

html[data-theme="light"] .mitra-field-hint,
html[data-theme="light"] .pos-field-hint,
html[data-theme="light"] .pos-form-section__hint,
html[data-theme="light"] .pos-page-head__lead,
html[data-theme="light"] .pos-card__sub {
    color: var(--rp-text-muted);
    opacity: 1;
}

html[data-theme="light"] .pos-label-opt {
    color: #64748b;
    opacity: 1;
    font-weight: 500;
}

html[data-theme="light"] body.mitra-body {
    color: var(--rp-text-muted);
    background-color: var(--rp-bg-deep);
    background-image:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(99, 102, 241, 0.07), transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef1f8 100%);
}

*, *::before, *::after { box-sizing: border-box; }

body.mitra-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rp-text-muted);
    background: linear-gradient(165deg, var(--rp-bg-deep) 0%, var(--rp-bg-mid) 45%, var(--rp-bg-soft) 100%);
    -webkit-text-size-adjust: 100%;
}

a { color: #a8c4ff; text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }
html[data-theme="light"] a { color: #5d50f0; }
html[data-theme="light"] a:hover { color: #4338ca; }

.mitra-wrap {
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Login — pusatkan vertikal, tanpa topbar terpisah */
.mitra-wrap--login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.mitra-wrap--login .mitra-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.mitra-login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.mitra-login-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: contain;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
}

.mitra-badge-portal--lg {
    font-size: 0.8rem;
    padding: 5px 16px;
    letter-spacing: 0.1em;
}

/* Form login — rata kiri agar label dan input rapi */
.mitra-wrap--login .mitra-field {
    text-align: left;
}

.mitra-wrap--login h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.mitra-wrap--login .mitra-lead {
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.mitra-wrap--wide { max-width: 960px; }

/* Dashboard kasir — memenuhi lebar layar */
.mitra-wrap--pos {
    max-width: min(1440px, 98vw);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .mitra-wrap--wide.mitra-wrap--pos {
        max-width: min(1440px, 98vw);
        padding: 16px 24px 32px;
    }

}

@media (min-width: 1024px) {
    .mitra-wrap--pos .mitra-wa-section .rp-app__grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }

    .mitra-wrap--pos .mitra-wa-section .rp-app__cat {
        padding: 16px 8px;
    }

    .mitra-wrap--pos .mitra-wa-section .rp-app__cat-ico {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .mitra-wrap--pos .mitra-wa-section .rp-app__cat-nm {
        font-size: 0.75rem;
    }

    .mitra-wrap--pos .mitra-wa-section .rp-app__plist {
        max-height: 480px;
    }
}

.mitra-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0 20px;
    flex-wrap: wrap;
}

/* Topbar — alur halaman biasa (bukan overlay fixed) */
.mitra-topbar--fixed {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    margin: 0 0 16px;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 100%);
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 24px rgba(67, 56, 202, 0.45);
}

html[data-theme="light"] .mitra-topbar--fixed {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 100%);
    border-bottom-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 4px 24px rgba(67, 56, 202, 0.4);
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-logo {
    display: inline-flex;
    align-items: center;
    /* Topbar selalu gelap — tidak perlu kotak putih */
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-badge-portal {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-topbar-link {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: none;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-topbar-link:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff !important;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-topbar-link i {
    color: #fff;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-logout {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 200, 200, 0.55);
    color: #fee2e2;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-logout:hover {
    background: rgba(220, 38, 38, 0.50);
    border-color: #fca5a5;
    color: #fff;
}

.mitra-topbar--fixed .mitra-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    max-width: min(1440px, 98vw);
    margin: 0 auto;
    padding: 10px 16px;
    box-sizing: border-box;
}

/* Nama toko & pemilik — di samping ikon logo */
.mitra-topbar-identity {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.mitra-topbar-identity__toko {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mitra-topbar-identity__owner {
    display: block;
    margin-top: 1px;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mitra-topbar-identity__owner[hidden] {
    display: none !important;
}

.mitra-topbar-identity__verify {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(16, 185, 129, 0.45);
    width: fit-content;
}

.mitra-topbar-identity__verify--pending {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
}

.mitra-topbar--fixed .mitra-topbar-actions {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 520px) {
    .mitra-topbar--fixed .mitra-topbar-inner {
        gap: 10px;
        padding: 10px 12px;
    }

    .mitra-topbar-identity__toko {
        font-size: 0.88rem;
    }

    .mitra-topbar-identity__owner {
        font-size: 0.72rem;
    }

    .mitra-topbar--fixed .mitra-topbar-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Nama toko & pemilik — di dalam bar ungu, tidak tertutup menu tab */
.mitra-topbar-meta {
    width: 100%;
    max-width: min(1440px, 98vw);
    margin: 0 auto;
    padding: 0 16px 6px;
    box-sizing: border-box;
    line-height: 1.3;
}

.mitra-topbar-meta:has(+ .mitra-topbar-toolbar:not([hidden])) {
    padding-bottom: 4px;
}

.mitra-topbar-meta__toko {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.mitra-topbar-meta__owner {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.mitra-topbar-meta__owner:empty {
    display: none;
}

/* Toolbar tab — satu blok dengan topbar, tidak menumpuk konten */
.mitra-topbar-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: min(1440px, 98vw);
    margin: 0 auto;
    padding: 8px 12px 10px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.35);
}

.mitra-topbar-toolbar[hidden] {
    display: none !important;
}

.mitra-topbar-toolbar .pos-nav--topbar {
    flex: 1;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

.mitra-topbar-toolbar__settings {
    flex-shrink: 0;
    width: auto !important;
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #fff !important;
}

.mitra-topbar-toolbar__settings:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.mitra-topbar-toolbar__settings i {
    margin-right: 4px;
}

.mitra-logo__img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

/* Tab di atas bar ungu */
.mitra-topbar--fixed .pos-nav-btn:not(.active) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
}

.mitra-topbar--fixed .pos-nav-btn:not(.active) i {
    color: rgba(255, 255, 255, 0.85);
}

.mitra-topbar--fixed .pos-nav-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
}

.mitra-topbar--fixed .pos-nav-btn.active {
    background: #fff;
    color: #4338ca;
    border-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.mitra-topbar--fixed .pos-nav-btn.active i {
    color: #6366f1;
}

.mitra-topbar--fixed .pos-nav-badge {
    background: #f59e0b;
    color: #fff;
}

.mitra-topbar--fixed .pos-nav-btn.active .pos-nav-badge {
    background: #dc2626;
    color: #fff;
}

@media (max-width: 640px) {
    .mitra-topbar-toolbar__settings-label {
        display: none;
    }

    .mitra-topbar-toolbar__settings {
        padding: 8px 10px !important;
    }
}

@media (min-width: 768px) {
    .mitra-topbar--fixed .mitra-topbar-inner {
        padding: 10px 24px 6px;
    }

    .mitra-topbar-meta {
        padding: 0 24px 12px;
    }

    .mitra-topbar-meta__toko {
        font-size: 1.05rem;
    }

    .mitra-topbar-meta__owner {
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .mitra-topbar--fixed .mitra-topbar-inner {
        padding: 10px 24px;
    }
}

.mitra-topbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mitra-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rp-text) !important;
    text-decoration: none !important;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--rp-glass-border);
    background: var(--rp-glass);
    transition: background 0.15s, border-color 0.15s;
}

.mitra-topbar-link:hover {
    border-color: var(--rp-accent);
    background: rgba(93, 80, 240, 0.12);
}

.mitra-topbar-link i {
    font-size: 0.85rem;
    opacity: 0.9;
}

html[data-theme="light"] .mitra-topbar-link {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: none;
}

html[data-theme="light"] .mitra-topbar-link:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.28);
    color: #fff !important;
}

html[data-theme="light"] .mitra-topbar-link i {
    color: #fff;
}

.mitra-qr-wrap {
    position: relative;
}

.mitra-qr-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    width: min(280px, calc(100vw - 24px));
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--rp-glass-border);
    background: var(--rp-bg-mid, #1e2f6b);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
}

html[data-theme="light"] .mitra-qr-dropdown {
    background: #fff;
    border-color: var(--rp-glass-border);
    box-shadow: var(--rp-shadow-lg);
}

.mitra-qr-dropdown[hidden] {
    display: none !important;
}

.mitra-qr-dropdown-title {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rp-text);
}

.mitra-qr-dropdown-title i {
    margin-right: 6px;
    color: #5d50f0;
}

.mitra-qr-dropdown-hint {
    margin: 0 0 12px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--rp-text-muted);
}

.mitra-qr-dropdown-imgwrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
}

.mitra-qr-dropdown-imgwrap img {
    display: block;
    width: 200px;
    height: 200px;
    max-width: 100%;
    border-radius: 8px;
}

.mitra-qr-dropdown .mitra-btn {
    width: 100%;
    margin-bottom: 8px;
}

.mitra-qr-dropdown .mitra-btn:last-child {
    margin-bottom: 0;
}

.mitra-qr-btn-open {
    text-decoration: none !important;
}

@media (max-width: 480px) {
    .mitra-qr-dropdown {
        right: -8px;
        width: min(280px, calc(100vw - 16px));
    }
}

.mitra-logo img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

/* Badge di dalam topbar fixed — warna putih transparan */
.mitra-topbar--fixed .mitra-badge-portal {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Badge di luar topbar (halaman login, dll.) — indigo */
.mitra-badge-portal {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

html[data-theme="light"] .mitra-badge-portal {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.mitra-card {
    background: var(--rp-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--rp-glass-border);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .mitra-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--rp-shadow-md);
}

.mitra-card h1 {
    margin: 0 0 8px;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--rp-text);
    line-height: 1.3;
}

.mitra-card .mitra-lead {
    margin: 0 0 22px;
    font-size: 0.9rem;
    opacity: 0.85;
}

.mitra-demo-banner {
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.35);
    color: #ffb74d;
}

html[data-theme="light"] .mitra-demo-banner {
    color: #9a5b00;
}

.mitra-env-banner {
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

html[data-theme="light"] .mitra-env-banner {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
}

.mitra-field {
    margin-bottom: 14px;
}

.mitra-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rp-text);
    margin-bottom: 6px;
}

.mitra-field label .req { color: var(--rp-danger); }

.mitra-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--rp-glass-border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--rp-text);
    outline: none;
    transition: border-color 0.2s;
}

.mitra-input:focus {
    border-color: var(--rp-accent);
}

.mitra-input::placeholder {
    color: rgba(238, 242, 255, 0.4);
}

.mitra-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.mitra-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mitra-btn--primary {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 18px rgba(67, 56, 202, 0.40);
    letter-spacing: 0.01em;
}

.mitra-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(67, 56, 202, 0.50);
}

.mitra-btn--outline {
    background: transparent;
    color: var(--rp-text) !important;
    border: 1px solid var(--rp-glass-border);
    text-decoration: none !important;
}

html[data-theme="light"] .mitra-btn--outline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155 !important;
    box-shadow: var(--rp-shadow-sm);
}

html[data-theme="light"] .mitra-btn--outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #6366f1;
    color: #4338ca !important;
}

html[data-theme="light"] .mitra-btn--outline i {
    color: inherit;
}

.mitra-btn--sm {
    width: auto;
    padding: 8px 14px;
    font-size: 0.82rem;
}

.mitra-btn--google {
    background: #fff;
    color: #333 !important;
    border: 1px solid #ddd;
    text-decoration: none !important;
}

.mitra-btn--google img {
    width: 20px;
    height: 20px;
}

.mitra-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 0.8rem;
    opacity: 0.6;
}

.mitra-divider::before,
.mitra-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rp-glass-border);
}

.mitra-error {
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fca5a5;
    display: none;
}

.mitra-error--show { display: block; }

html[data-theme="light"] .mitra-error { color: #b91c1c; }

.mitra-foot {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.mitra-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 20px;
    border-radius: 10px;
    background: #1e2f6b;
    color: #fff;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .mitra-toast {
    background: #0f172a;
    box-shadow: var(--rp-shadow-lg);
}

.mitra-toast--show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mitra-toast--ok   { background: #065f46; border: 1px solid #10b981; }

.mitra-toast--warn { background: #78350f; border: 1px solid #f59e0b; }

.mitra-toast--err  { background: #7f1d1d; border: 1px solid #f87171; }

/* Dashboard */
.mitra-dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.mitra-dash-header h1 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    color: var(--rp-text);
}

.mitra-dash-intro {
    flex: 1;
    min-width: 0;
}

.mitra-dash-sub {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.mitra-profile-summary {
    margin: 6px 0 0;
    font-size: 0.8rem;
    opacity: 0.75;
    line-height: 1.4;
}

.mitra-dash-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.mitra-profile-edit {
    margin: -8px 0 20px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--rp-glass-border);
    background: var(--rp-glass);
}

.mitra-profile-edit-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rp-text);
}

.mitra-profile-edit-title i {
    margin-right: 6px;
    opacity: 0.85;
}

.mitra-profile-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.mitra-profile-edit-grid .mitra-field--full {
    grid-column: 1 / -1;
}

.mitra-profile-edit-grid .mitra-field {
    margin-bottom: 12px;
}

.mitra-profile-edit-note {
    margin: 0 0 12px;
    font-size: 0.78rem;
    opacity: 0.75;
}

.mitra-field-hint {
    margin: 6px 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--rp-text-muted);
    opacity: 0.85;
}

.mitra-profile-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mitra-profile-edit-actions .mitra-btn {
    width: auto;
    min-width: 100px;
}

.pos-modal__panel--settings {
    max-width: 720px;
    max-height: min(92vh, 860px);
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .pos-modal--settings,
    #profile-panel-modal.pos-modal {
        padding: 28px;
    }

    .pos-modal__panel--settings {
        max-width: 980px;
        max-height: min(92vh, 920px);
        border-radius: 20px;
    }

    .pos-modal__panel--settings .pos-modal__head {
        padding: 18px 24px 14px;
    }

    .pos-modal__panel--settings #form-edit-profile {
        padding: 18px 24px 18px;
    }

    .pos-modal__panel--settings .mitra-profile-edit-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0 16px;
    }

    .pos-modal__panel--settings .mitra-settings-section {
        padding: 14px;
    }

    .pos-modal__panel--settings .mitra-profile-edit-actions {
        justify-content: flex-end;
    }
}

.pos-modal__panel--settings .mitra-profile-edit {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pos-modal__panel--settings .pos-modal__head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0;
    padding: 16px 18px 12px;
    background: linear-gradient(180deg, rgba(19, 31, 69, 0.98), rgba(19, 31, 69, 0.94));
    border-bottom: 1px solid var(--rp-glass-border);
}

html[data-theme="light"] .pos-modal__panel--settings .pos-modal__head {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.pos-modal__panel--settings .mitra-profile-edit-title {
    margin: 0;
}

.pos-modal__panel--settings #form-edit-profile {
    padding: 14px 18px 16px;
    overflow: auto;
    min-height: 0;
}

.pos-modal__panel--settings .mitra-profile-edit-grid {
    gap: 0 14px;
}

.mitra-settings-section {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--rp-glass-border);
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .mitra-settings-section {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.mitra-settings-section__title {
    margin: 0 0 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--rp-text);
}

.mitra-settings-section__title i {
    margin-right: 6px;
    opacity: 0.9;
}

.pos-modal__panel--settings .mitra-profile-edit-actions {
    position: sticky;
    bottom: 0;
    margin-top: 14px;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(19, 31, 69, 0), rgba(19, 31, 69, 0.96) 28%);
}

html[data-theme="light"] .pos-modal__panel--settings .mitra-profile-edit-actions {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.98) 30%);
}

.pos-modal__panel--settings .mitra-profile-edit-actions .mitra-btn {
    min-width: 128px;
}

/* Force settings modal size (overrides generic .pos-modal__panel in pos-app.css) */
#profile-panel-modal .pos-modal__panel--settings {
    max-width: 820px;
    max-height: min(92vh, 900px);
}

@media (max-width: 560px) {
    .pos-modal {
        padding: 8px;
    }

    .pos-modal__panel--settings {
        max-width: 100%;
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .pos-modal__panel--settings .pos-modal__head {
        padding: 14px 14px 10px;
    }

    .pos-modal__panel--settings #form-edit-profile {
        padding: 12px 14px 14px;
    }

    .pos-modal__panel--settings .mitra-profile-edit-actions {
        padding-top: 10px;
    }

    .pos-modal__panel--settings .mitra-profile-edit-actions .mitra-btn {
        flex: 1;
        min-width: 0;
    }

    .mitra-profile-edit-grid {
        grid-template-columns: 1fr;
    }

    .mitra-dash-aside {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    #profile-panel-modal.pos-modal {
        align-items: center;
        padding: 28px;
    }

    #profile-panel-modal .pos-modal__panel--settings {
        max-width: 980px;
        max-height: min(92vh, 920px);
    }
}

.mitra-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.mitra-status--pending {
    background: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.35);
}

html[data-theme="light"] .mitra-status--pending {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.mitra-status--active {
    background: rgba(37, 211, 102, 0.15);
    color: #4ade80;
    border: 1px solid rgba(37, 211, 102, 0.35);
}

html[data-theme="light"] .mitra-status--active {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.mitra-status--rejected {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

html[data-theme="light"] .mitra-status--rejected {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.mitra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.mitra-tile {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--rp-glass-border);
    background: var(--rp-glass);
}

html[data-theme="light"] .mitra-tile,
html[data-theme="light"] .mitra-profile-edit,
html[data-theme="light"] .admin-stat {
    box-shadow: var(--rp-shadow-sm);
}

.mitra-tile h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--rp-text);
}

.mitra-tile p {
    margin: 0 0 14px;
    font-size: 0.85rem;
}

.mitra-tile--soon {
    opacity: 0.65;
}

.mitra-tile--soon .mitra-btn {
    pointer-events: none;
    opacity: 0.6;
}

.mitra-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mitra-info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rp-glass-border);
    font-size: 0.88rem;
}

.mitra-info-list li:last-child { border-bottom: none; }

.mitra-info-list span:first-child { opacity: 0.7; }

.mitra-info-list span:last-child {
    color: var(--rp-text);
    font-weight: 600;
    text-align: right;
}

.mitra-logout {
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fca5a5;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.mitra-logout:hover {
    background: rgba(248, 113, 113, 0.22);
    text-decoration: none;
}

html[data-theme="light"] .mitra-logout {
    color: #b91c1c;
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(185, 28, 28, 0.25);
}

html[data-theme="light"] .mitra-logout:hover {
    background: rgba(248, 113, 113, 0.18);
}

.mitra-wait-icon {
    font-size: 3rem;
    color: var(--rp-warn);
    margin-bottom: 16px;
    text-align: center;
}

/* Simulator WA di dashboard */
.mitra-wa-section {
    margin-bottom: 28px;
    position: relative;
}

.mitra-wa-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: var(--rp-text);
    font-weight: 700;
}

.mitra-wa-title i {
    color: #25d366;
    margin-right: 8px;
}

.mitra-wa-section .rp-app {
    max-width: 100%;
    margin: 0;
    border-radius: 16px;
}

.mitra-wa-section .rp-app .rp-app__bnav {
    display: flex;
}

.mitra-wa-section .rp-app--embed .rp-app__close {
    display: none;
}

.mitra-wa-section .rp-app__overlay {
    position: absolute;
    inset: 0;
    z-index: 2000;
}

.mitra-wa-section .rp-app.rp-app--float {
    z-index: 2100;
}

/* Admin */
.mitra-badge-admin {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
}

html[data-theme="light"] .mitra-badge-admin {
    color: #b91c1c;
    background: rgba(248, 113, 113, 0.1);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--rp-glass);
    border: 1px solid var(--rp-glass-border);
    text-align: center;
}

.admin-stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--rp-text);
    line-height: 1.2;
}

.admin-stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.admin-stat--pending .admin-stat-num { color: #ffb74d; }
.admin-stat--active .admin-stat-num { color: #4ade80; }
.admin-stat--rejected .admin-stat-num { color: #fca5a5; }

.admin-panel { padding: 20px 16px; }

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--rp-glass-border);
    background: transparent;
    color: var(--rp-text-muted);
    cursor: pointer;
}

.admin-tab--active {
    background: var(--rp-accent);
    border-color: var(--rp-accent);
    color: #fff;
}

html[data-theme="light"] .admin-tab:not(.admin-tab--active) {
    background: linear-gradient(180deg, #ede9fe 0%, #e0e7ff 100%);
    border-color: #a5b4fc;
    color: #4f46e5;
}

html[data-theme="light"] .admin-tab:not(.admin-tab--active):hover {
    background: #ddd6fe;
    border-color: #818cf8;
    color: #3730a3;
}

html[data-theme="light"] .admin-tab--active {
    box-shadow: 0 2px 8px rgba(93, 80, 240, 0.25);
}

html[data-theme="light"] .admin-btn--muted {
    background: var(--rp-surface-muted);
    color: var(--rp-text-muted);
}

html[data-theme="light"] .admin-btn--ok {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

html[data-theme="light"] .admin-btn--danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

html[data-theme="light"] .admin-stat--pending .admin-stat-num { color: #c2410c; }
html[data-theme="light"] .admin-stat--active .admin-stat-num { color: #047857; }
html[data-theme="light"] .admin-stat--rejected .admin-stat-num { color: #b91c1c; }

.admin-search {
    max-width: 280px;
    min-width: 160px;
    flex: 1;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--rp-glass-border);
    vertical-align: top;
}

.admin-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
    color: var(--rp-text);
}

.admin-muted {
    font-size: 0.8rem;
    opacity: 0.75;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 140px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.admin-btn--ok {
    background: rgba(37, 211, 102, 0.2);
    color: #4ade80;
    border: 1px solid rgba(37, 211, 102, 0.4);
}

.admin-btn--danger {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.admin-btn--muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rp-text-muted);
    border: 1px solid var(--rp-glass-border);
}

.admin-refresh-btn {
    width: auto;
    padding: 10px 16px;
}

@media (max-width: 480px) {
    .mitra-card { padding: 22px 18px; }
    .admin-search { max-width: 100%; }
}

/* Mode terang — tombol sekunder & chip menu (ungu muda, bukan putih polos) */
html[data-theme="light"] #btn-edit-profile,
html[data-theme="light"] #btn-edit-profile-pos {
    background: linear-gradient(180deg, #ede9fe 0%, #e0e7ff 100%);
    border-color: #a5b4fc;
    color: #4f46e5 !important;
}

html[data-theme="light"] #kasir-popup-reject.mitra-btn--outline {
    background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
    color: #b91c1c !important;
}

html[data-theme="light"] #kasir-popup-reject.mitra-btn--outline:hover:not(:disabled) {
    background: #fca5a5;
    border-color: #ef4444;
    color: #7f1d1d !important;
}

.mitra-verif-panel {
    max-width: 520px;
    margin-top: 1rem;
}

.mitra-verif-badge {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.mitra-verif-badge--ok {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.mitra-verif-badge--warn {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.mitra-verif-status {
    margin: 0 0 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.mitra-verif-status--ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mitra-verif-status--err {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.mitra-verif-status--info {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.mitra-verif-muted {
    opacity: 0.85;
    font-size: 0.82rem;
}

.mitra-verif-otp-input {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-align: center;
    max-width: 200px;
}

.mitra-verif-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.mitra-verif-done {
    padding: 0.5rem 0;
}
