/* Purple character theme: static artwork, opaque dialogs, mobile-sized controls. */
:root,:root[data-theme="rose"]{
  color-scheme:dark;--bg:#10091b;--bg-2:#1d1030;--surface:#191026;--surface-2:#20152f;
  --surface-3:#2d1b40;--line:#49325f;--text:#f8f3ff;--muted:#c2b3d3;
  --accent:#b977fa;--accent-2:#7c3ac5;--accent-3:#e4bbff;--danger:#ff8f9c;
  --font-main:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:root[data-theme="rose"]{--surface:#241333;--surface-2:#2c193c;--line:#68447f;--accent:#d29aff}
html,body{background:#10091b!important;color:var(--text);font-family:var(--font-main)}
body{background:linear-gradient(155deg,#241035 0,#10091b 65%)!important}
#app{width:min(100%,460px);padding:14px 12px 30px}
.hero-card,.screen-card,.admin-panel{background:var(--surface)!important;border-color:var(--line)!important;box-shadow:0 8px 22px #0003!important;border-radius:20px}
.hero-card{padding:18px 16px;background:linear-gradient(90deg,rgba(22,9,35,.97),rgba(22,9,35,.38)),linear-gradient(0deg,#190c2a 0%,transparent 80%),url('/app/assets/purple-character.jpg?v=20261119-purple3') 80% 27%/cover no-repeat!important;min-height:260px}
.hero-topline{margin-bottom:28px}.hero-main{align-items:center}.hero-copy h1{font-size:23px;line-height:1.25}.hero-copy p{max-width:210px;line-height:1.5}
.hero-avatar{background:#653494!important;color:#fff!important;border:1px solid #d69cff;box-shadow:none!important}
.iron-wordmark span{background:none!important;-webkit-text-fill-color:#f6dfff;color:#f6dfff;font-weight:800;letter-spacing:.16em;filter:none}
.iron-wordmark::before{background:linear-gradient(90deg,#cc87ff,transparent);box-shadow:none}
.hero-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:18px}
.hero-stats div{min-width:0;padding:12px!important;background:#231233!important;border:1px solid #664182!important;box-shadow:none!important;border-radius:14px}
.hero-stats div span{display:block;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.4;font-size:12px!important;color:#d6c4e7!important}
.hero-stats div b{display:block;font-size:17px!important;margin-top:5px;overflow-wrap:anywhere;color:#fff!important}
.hero-badge,.mini-card,.payment-card,.log-item,.admin-user-card,.collapsed-note,.day-group,.admin-row-card,.done-log-line,.withdraw-profile-btn,.detail-grid div,.admin-detail-grid div,.detail-chip,.batch-line,.qr-panel,.fee-settings-card,.feature-row,
.payment-card:nth-child(even),.admin-list>.admin-row-card:nth-child(even),.admin-list>.admin-user-card:nth-child(even){background:#23182f!important;border-color:var(--line)!important;box-shadow:none!important}
.payment-card::before,.admin-row-card::before,.admin-user-card::before,.mini-card::before,.log-item::before,.done-log-line::before{background:#b977fa;box-shadow:none}
.bank-msb,.bank-bidv{border-left-color:#b977fa!important}
.hero-settings-btn,.theme-btn,.hero-fab,.icon-btn,.copy-mini,.copy-icon-btn,.select-dot,.eye-hold,.popup-close,.bank-tick,.admin-tabs button,.main-tabs button,.dashboard-subtabs button,.ctv-action{background:#2c1b3d!important;border-color:var(--line)!important;box-shadow:none!important;color:var(--text)!important}
.btn,.action-primary,.ctv-action.primary,.btn.primary,.mini-action,.copy-mini.primary-action,.select-dot.active,.main-tabs button.active,.admin-tabs button.active,.dashboard-subtabs button.active{
  appearance:none;-webkit-appearance:none;background:linear-gradient(135deg,#a153e1,#7536b6)!important;border:1px solid #c58df0!important;color:#fff!important;box-shadow:none!important;
  min-height:44px;padding:11px 15px;border-radius:12px;font:inherit;font-size:14px;font-weight:700;line-height:1.4;cursor:pointer;white-space:normal;max-width:100%;overflow-wrap:anywhere;
}
.btn.ghost,.mini-action.ghost{background:#30203f!important;border:1px solid #694581!important;color:#ecd8ff!important}
button:disabled{opacity:.5;cursor:default}.popup-close{flex:0 0 40px;width:40px;height:40px;font-size:22px}
.bank-tick.active,.compact-payment-card.selected,.compact-payment-card.expanded,.withdraw-profile-btn.active,.priority-done-list .admin-done-card:first-child,.admin-payment-card.expanded,.admin-done-card.expanded{background:#39204d!important;border-color:#b977fa!important}
.app-popup{background:rgba(8,3,15,.86)!important;padding:12px;z-index:100;overscroll-behavior:contain}
.popup-shell,.popup-shell.wide{background:#1c1229!important;border:1px solid #72508e!important;border-radius:20px;width:min(100%,440px);max-height:calc(100dvh - 24px);max-height:calc(var(--tg-viewport-stable-height,100dvh) - 24px);padding:18px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 24px 70px #0008!important;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;isolation:isolate}
.popup-shell p{font-size:14px;line-height:1.65;overflow-wrap:anywhere;margin:12px 0}.popup-head h3{font-size:20px;line-height:1.35;margin:0}.popup-head{align-items:center;margin-bottom:18px}
.popup-shell h3:not(.popup-head h3){font-size:17px;line-height:1.4;margin:24px 0 12px;padding:0;background:none!important}
.popup-shell label,.screen-card>label,.feature-page label{display:flex;flex-direction:column;gap:8px;margin:14px 0 8px;font-size:13px;font-weight:600;color:#e0d3ec;min-width:0}
.popup-shell input:not([type="checkbox"]):not([type="radio"]),.popup-shell select,.popup-shell textarea,
.screen-card input:not([type="checkbox"]):not([type="radio"]),.screen-card select,.screen-card textarea,
.field-wrap input,.field-wrap select,.field-wrap textarea,.search-shell input{
  appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;max-width:100%;min-height:46px;padding:12px;border-radius:12px;border:1px solid #6e4d86!important;background:#110b1b!important;color:#f8f3ff!important;font:inherit;font-size:16px;line-height:1.45;box-shadow:none!important;box-sizing:border-box;
}
.popup-shell select,.screen-card select{appearance:auto;-webkit-appearance:menulist;padding-right:28px}
input::placeholder,textarea::placeholder{color:#ab98bf!important;opacity:1}
input[readonly]{color:#d7b9ed!important}.popup-shell option,.screen-card option{background:#1c1229;color:#fff}
input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid #ce9cff;outline-offset:2px}
.popup-shell label.check-row{flex-direction:row;align-items:center}.popup-shell input[type="checkbox"]{width:20px;height:20px;accent-color:#af69ef}
.feature-popup>.btn{display:block;width:100%;margin:10px 0 16px}.feature-popup>.hero-stats{margin:16px 0}
.feature-popup .feature-row{content-visibility:visible;contain-intrinsic-size:none;line-height:1.5}
.feature-page .form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.feature-page .form-grid>label{margin:0}.feature-page h2{font-size:20px;margin:0 0 12px}.feature-page p{font-size:14px;line-height:1.6}
.popup-actions,.bulk-action-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.popup-actions>*{min-width:0}.app-toast{background:#7536b6!important;color:white!important;box-shadow:none!important}
.feature-empty{padding:12px;border-radius:12px;background:#2b1b3c;color:#d8c2eb;font-size:13px;line-height:1.6}
@media(max-width:360px){#app{padding:10px 8px}.popup-shell{padding:16px 12px}.popup-head h3{font-size:18px}.ctv-actions{gap:6px}.ctv-action{font-size:11px}.hero-card{padding:16px 12px}}
.referral-admin-info{overflow-wrap:anywhere}.referral-admin-info .btn{display:block;width:100%;margin-top:8px}
