/* Portal Mitra Reload Pulsa */
:root {
    /* dark mode tokens */
    --rp-bg-deep:    #0c1628;
    --rp-bg-mid:     #1a2b4b;
    --rp-bg-soft:    #1f3458;
    --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:        #3b82f6;
    --rp-accent-hover:  #60a5fa;
    --rp-accent-deep:   #2563eb;
    --rp-navy:          #1a2b4b;
    --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: #3b82f6;
    --rp-accent:        #2563eb;
    --rp-accent-hover:  #1d4ed8;
    --rp-accent-deep:   #1e40af;
    --rp-navy:          #1a2b4b;
    --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(59, 130, 246, 0.06), 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: #2563eb; }
html[data-theme="light"] a:hover { color: #1d4ed8; }

.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--login .mitra-btn,
.mitra-wrap--login .mitra-input {
    touch-action: manipulation;
}

.mitra-wrap--login .mitra-input {
    font-size: 16px;
}

/* Daftar — form lebih panjang, scroll dari atas */
.mitra-wrap--daftar {
    align-items: flex-start;
    padding-top: 28px;
    padding-bottom: 48px;
}

.mitra-wrap--daftar .mitra-card {
    max-width: 440px;
}

.mitra-auth-boot {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 16, 40, 0.92);
    color: #e8ecf8;
}

.mitra-auth-boot__inner {
    text-align: center;
    font-size: 1rem;
}

.mitra-auth-boot__inner i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.mitra-body--auth-return {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mitra-auth-return {
    text-align: center;
    padding: 32px 24px;
    color: #e8ecf8;
}

.mitra-auth-return i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.mitra-auth-return__hint {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 8px;
}

.mitra-auth-boot--hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.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 Portal Mitra — biru terang (bukan navy gelap) */
.mitra-topbar--fixed {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    margin: 0 0 16px;
    padding: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #3b82f6 100%);
    border: 2px solid #60a5fa;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
}

html[data-theme="light"] .mitra-topbar--fixed {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 52%, #4285f4 100%);
    border: 2px solid #60a5fa;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.28);
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-logo {
    display: inline-flex;
    align-items: center;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

html[data-theme="light"] .mitra-topbar-identity__tag {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
}

html[data-theme="light"] .mitra-topbar-identity__toko {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .mitra-topbar-identity__owner {
    color: rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .mitra-topbar-nav__group--main {
    border-right-color: rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-badge-portal {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

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: space-between;
    gap: 14px 18px;
    flex-wrap: wrap;
    width: 100%;
    max-width: min(1440px, 98vw);
    margin: 0 auto;
    padding: 12px 18px;
    box-sizing: border-box;
}

.mitra-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 200px;
}

/* Nama toko & pemilik — di samping ikon logo */
.mitra-topbar-identity {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.mitra-topbar-identity__tag {
    display: inline-block;
    margin-bottom: 2px;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.mitra-topbar-identity__toko {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mitra-topbar-identity__owner {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    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);
}

/* Navigasi top bar — desktop & mobile */
.mitra-topbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    flex-shrink: 0;
}

.mitra-topbar-nav__group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mitra-topbar-nav__group--main {
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.mitra-topbar-nav__group--end {
    gap: 8px;
}

/* Tombol topbar — teks putih wajib (link Layar tidak kena warna global <a>) */
.mitra-topbar--fixed .mitra-tbar-btn,
.mitra-topbar--fixed a.mitra-tbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff !important;
    text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.mitra-topbar--fixed .mitra-tbar-btn i,
.mitra-topbar--fixed a.mitra-tbar-btn i,
.mitra-topbar--fixed .mitra-tbar-btn__label,
.mitra-topbar--fixed a.mitra-tbar-btn .mitra-tbar-btn__label {
    color: inherit !important;
}

html[data-theme="light"] .mitra-topbar--fixed .mitra-tbar-btn,
html[data-theme="light"] .mitra-topbar--fixed a.mitra-tbar-btn {
    color: #fff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .mitra-topbar--fixed a.mitra-tbar-btn:hover,
html[data-theme="light"] .mitra-topbar--fixed .mitra-tbar-btn:hover {
    color: #fff !important;
    text-decoration: none !important;
}

.mitra-topbar--fixed .mitra-tbar-btn:hover,
.mitra-topbar--fixed a.mitra-tbar-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.mitra-topbar--fixed .mitra-tbar-btn:active,
.mitra-topbar--fixed a.mitra-tbar-btn:active {
    transform: scale(0.98);
}

.mitra-topbar--fixed .mitra-tbar-btn i {
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.95;
}

.mitra-topbar--fixed .mitra-tbar-btn--verify {
    background: rgba(16, 185, 129, 0.42);
    border-color: rgba(110, 231, 183, 0.55);
}

.mitra-topbar--fixed .mitra-tbar-btn--verify:hover {
    background: rgba(16, 185, 129, 0.55);
    border-color: rgba(167, 243, 208, 0.75);
}

.mitra-topbar--fixed .mitra-tbar-btn--verify.active {
    color: #064e3b !important;
    text-shadow: none;
    background: #ecfdf5;
    border-color: #a7f3d0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.mitra-topbar--fixed .mitra-tbar-btn--verify.active i,
.mitra-topbar--fixed .mitra-tbar-btn--verify.active .mitra-tbar-btn__label {
    color: #064e3b !important;
}

.mitra-topbar--fixed .mitra-tbar-btn--screen {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(147, 197, 253, 0.55);
}

.mitra-topbar--fixed .mitra-tbar-btn--screen:hover {
    background: rgba(59, 130, 246, 0.52);
    border-color: rgba(191, 219, 254, 0.75);
}

.mitra-topbar--fixed .mitra-tbar-btn--notify {
    background: rgba(245, 158, 11, 0.38);
    border-color: rgba(253, 224, 71, 0.5);
}

.mitra-topbar--fixed .mitra-tbar-btn--notify:hover {
    background: rgba(245, 158, 11, 0.5);
    border-color: rgba(253, 230, 138, 0.7);
}

.mitra-topbar--fixed .mitra-tbar-btn--notify-active,
.mitra-topbar--fixed .mitra-tbar-btn--notify.mitra-tbar-btn--notify-active {
    animation: mitra-notify-pulse 1.5s ease-in-out infinite;
    border-color: #fde047;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4);
}

@keyframes mitra-notify-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35); }
    50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.55); }
}

.mitra-topbar--fixed .mitra-tbar-btn--logout {
    background: rgba(239, 68, 68, 0.38);
    border-color: rgba(252, 165, 165, 0.5);
}

.mitra-topbar--fixed .mitra-tbar-btn--logout:hover {
    background: rgba(220, 38, 38, 0.55);
    border-color: rgba(254, 202, 202, 0.75);
}

.mitra-topbar--fixed .mitra-topbar-actions {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 720px) {
    .mitra-topbar--fixed .mitra-topbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }

    .mitra-topbar-brand {
        flex: none;
        width: 100%;
    }

    .mitra-topbar-identity__toko {
        font-size: 0.88rem;
    }

    .mitra-topbar-identity__owner {
        font-size: 0.72rem;
    }

    .mitra-topbar-nav {
        width: 100%;
        justify-content: stretch;
        gap: 6px;
    }

    .mitra-topbar-nav__group {
        flex: 1 1 auto;
        justify-content: center;
    }

    .mitra-topbar-nav__group--main {
        padding-right: 0;
        border-right: none;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        width: 100%;
    }

    .mitra-topbar-nav__group--end {
        width: 100%;
        justify-content: flex-end;
    }

    .mitra-tbar-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .mitra-tbar-btn__label--wide {
        display: none;
    }

    .mitra-tbar-btn--notify {
        flex: 0 0 auto;
        min-width: 44px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 400px) {
    .mitra-topbar--fixed .mitra-tbar-btn__label {
        display: none;
    }

    .mitra-topbar--fixed .mitra-tbar-btn,
    .mitra-topbar--fixed a.mitra-tbar-btn {
        min-width: 44px;
        padding: 9px 11px;
    }

    .mitra-tbar-btn--notify .mitra-tbar-btn__label--wide {
        display: none;
    }
}

/* 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.2);
    background: rgba(29, 78, 216, 0.35);
}

html[data-theme="light"] .mitra-topbar-toolbar {
    border-top-color: rgba(255, 255, 255, 0.2);
    background: rgba(29, 78, 216, 0.28);
}

.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: #1d4ed8;
    border-color: #3b82f6;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.mitra-topbar--fixed .pos-nav-btn.active i {
    color: #3b82f6;
}

.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;
}

.mitra-topbar-identity__verify--clickable {
    cursor: pointer;
}

.mitra-topbar-identity__verify--clickable:hover {
    opacity: 0.9;
    text-decoration: underline;
}

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: #3b82f6;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.38);
    letter-spacing: 0.01em;
}

.mitra-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #2563eb;
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
}

.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: #3b82f6;
    color: #2563eb !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; }

/* Notifikasi transaksi OtomaX */
.mitra-trx-notify-wrap {
    position: relative;
}
.mitra-trx-notify-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.mitra-trx-notify-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--rp-glass-border, rgba(255,255,255,.12));
    background: rgba(15, 23, 42, 0.55);
}
.mitra-trx-notify-panel--dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: min(360px, calc(100vw - 24px));
    margin: 0;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

@media (max-width: 720px) {
    .mitra-trx-notify-panel--dropdown {
        right: 0;
        left: auto;
        width: min(360px, calc(100vw - 16px));
    }
}
html[data-theme="light"] .mitra-trx-notify-panel {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.mitra-trx-notify-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.mitra-trx-notify-panel__title {
    margin: 0;
    font-size: 1rem;
}
.mitra-trx-notify-panel__hint {
    margin: 0 0 10px;
    font-size: 0.8rem;
    opacity: 0.85;
}
.mitra-trx-notify-empty {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}
.mitra-trx-notify-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.mitra-trx-notify-item {
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 4px solid #64748b;
    background: rgba(0,0,0,.2);
    cursor: pointer;
}
html[data-theme="light"] .mitra-trx-notify-item { background: #fff; }
.mitra-trx-notify-item--success { border-left-color: #10b981; }
.mitra-trx-notify-item--fail { border-left-color: #ef4444; }
.mitra-trx-notify-item--pending { border-left-color: #f59e0b; }
.mitra-trx-notify-item__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85rem;
}
.mitra-trx-notify-item__head time { opacity: 0.65; font-size: 0.75rem; white-space: nowrap; }
.mitra-trx-notify-item__reply,
.mitra-trx-notify-item__pesan,
.mitra-trx-notify-item__meta {
    margin: 4px 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
    word-break: break-word;
}
.mitra-trx-notify-item__reply { opacity: 1; font-weight: 500; color: #e2e8f0; }
.mitra-trx-notify-item__reply--pending { opacity: 0.65; font-weight: 400; font-style: italic; }
.mitra-trx-notify-item__pesan { opacity: 0.55; font-size: 0.75rem; }
.mitra-trx-notify-item__sn { display: block; margin-top: 4px; font-size: 0.75rem; color: #34d399; }
.mitra-trx-notify-item--unread { box-shadow: inset 0 0 0 1px rgba(59,130,246,.35); }
.mitra-trx-notify-item__tap {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    opacity: 0.65;
    text-align: right;
}
.mitra-trx-notify-item__tap i { font-size: 0.65rem; margin-left: 4px; }

.mitra-trx-notify-detail {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.mitra-trx-notify-detail[hidden] { display: none !important; }
body.mitra-trx-notify-detail-open { overflow: hidden; }
.mitra-trx-notify-detail__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}
.mitra-trx-notify-detail__box {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(85vh, 640px);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid var(--rp-glass-border, rgba(255,255,255,.12));
    background: #0f172a;
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
html[data-theme="light"] .mitra-trx-notify-detail__box {
    background: #fff;
    border-color: #e2e8f0;
}
.mitra-trx-notify-detail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
html[data-theme="light"] .mitra-trx-notify-detail__head { border-bottom-color: #e2e8f0; }
.mitra-trx-notify-detail__head h3 {
    margin: 0;
    font-size: 1rem;
}
.mitra-trx-notify-detail__close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    padding: 0 4px;
}
.mitra-trx-notify-detail__close:hover { opacity: 1; }
.mitra-trx-notify-detail__body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}
.mitra-trx-notify-detail__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
html[data-theme="light"] .mitra-trx-notify-detail__foot { border-top-color: #e2e8f0; }
.mitra-trx-notify-detail__loading {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}
.mitra-trx-notify-detail__state {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.mitra-trx-notify-detail__state--success { background: rgba(16,185,129,.15); color: #34d399; }
.mitra-trx-notify-detail__state--fail { background: rgba(239,68,68,.15); color: #f87171; }
.mitra-trx-notify-detail__state--pending { background: rgba(245,158,11,.15); color: #fbbf24; }
.mitra-trx-notify-detail__dl {
    margin: 0 0 14px;
    font-size: 0.82rem;
}
.mitra-trx-notify-detail__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .mitra-trx-notify-detail__row { border-bottom-color: #f1f5f9; }
.mitra-trx-notify-detail__row:last-child { border-bottom: none; }
.mitra-trx-notify-detail__row dt {
    margin: 0;
    opacity: 0.75;
    font-weight: 500;
    flex-shrink: 0;
}
.mitra-trx-notify-detail__row dd {
    margin: 0;
    text-align: right;
    word-break: break-word;
}
.mitra-trx-notify-detail__reply-title {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}
.mitra-trx-notify-detail__reply {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,.25);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow-y: auto;
}
html[data-theme="light"] .mitra-trx-notify-detail__reply { background: #f1f5f9; }
.mitra-trx-notify-detail__reply--empty {
    opacity: 0.7;
    font-style: italic;
    font-family: inherit;
}
.mitra-trx-notify-detail__src {
    font-weight: 400;
    opacity: 0.65;
    font-size: 0.72rem;
}

/* 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;
}

.mitra-device-banner {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mitra-device-banner--warn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--rp-text, #f1f5ff);
}

html[data-theme="light"] .mitra-device-banner--warn {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(217, 119, 6, 0.45);
}

html[data-theme="light"] .mitra-device-banner--warn .mitra-link-btn {
    color: var(--rp-accent, #4f46e5);
}

html[data-theme="light"] .mitra-device-banner--warn i {
    color: #b45309;
}

.mitra-device-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mitra-device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--mitra-border, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.03);
}

.mitra-device-item--revoked {
    opacity: 0.65;
}

.mitra-device-item__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mitra-device-item__meta {
    font-size: 0.82rem;
    opacity: 0.75;
}

.mitra-device-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.mitra-device-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.mitra-device-badge--current {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.mitra-device-badge--ok {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
}

.mitra-device-badge--warn {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
}

.mitra-device-badge--off {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.mitra-device-badge--blocked {
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.mitra-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #60a5fa;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

/* Riwayat transaksi (kasir + pulsa) */
.pos-trx-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.pos-trx-filter-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--mitra-border, rgba(255, 255, 255, 0.12));
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}

.pos-trx-filter-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.pos-trx-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pos-trx-history-loading {
    text-align: center;
    opacity: 0.75;
    padding: 2rem;
}

.pos-trx-history-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    opacity: 0.85;
}

.pos-trx-history-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.pos-trx-history-empty__hint {
    font-size: 0.85rem;
    opacity: 0.7;
    max-width: 28rem;
    margin: 0.5rem auto 0;
}

.pos-trx-item {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--mitra-border, rgba(255, 255, 255, 0.1));
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pos-trx-item:hover,
.pos-trx-item:focus-visible {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
    outline: none;
}

.pos-trx-item__icon {
    flex-shrink: 0;
    width: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0.85;
}

.pos-trx-item--ok .pos-trx-item__icon { color: #4ade80; }
.pos-trx-item--fail .pos-trx-item__icon { color: #f87171; }
.pos-trx-item--pending .pos-trx-item__icon { color: #fbbf24; }

.pos-trx-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pos-trx-item__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.pos-trx-item__head time {
    font-size: 0.78rem;
    opacity: 0.65;
    white-space: nowrap;
}

.pos-trx-item__sub,
.pos-trx-item__meta {
    font-size: 0.85rem;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-trx-item__status {
    font-size: 0.8rem;
    opacity: 0.7;
}

.pos-trx-item__chev {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.4;
}

.pos-receipt-action-detail {
    margin: 0 0 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
}

.pos-trx-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pos-trx-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    line-height: 1.35;
}

.pos-trx-detail-row span {
    opacity: 0.7;
    flex-shrink: 0;
}

.pos-trx-detail-row strong {
    text-align: right;
    word-break: break-word;
}

html[data-theme="light"] .pos-trx-item {
    background: #fff;
    border-color: #e2e8f0;
}

html[data-theme="light"] .pos-receipt-action-detail {
    background: #f8fafc;
    border-color: #e2e8f0;
}
