:root{
  --bg:#f3f4f6;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --line:#e5e7eb;
  --blue:#2563eb;
  --blue-soft:#eff6ff;
  --orange1:#ff8a00;
  --orange2:#ffc400;
  --green:#16a34a;
  --shadow:0 12px 28px rgba(15,23,42,.08);
  --radius:24px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,select{font:inherit}
.app-shell{min-height:100vh}
.main{min-height:100vh}
.mobile-width{max-width:760px;margin:0 auto}
.topbar{position:sticky;top:0;z-index:10;background:rgba(243,244,246,.92);backdrop-filter:blur(10px);padding:16px;border-bottom:1px solid rgba(229,231,235,.7);display:flex;justify-content:space-between;align-items:center;gap:12px}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px}
.burger,.close-btn{width:48px;height:48px;border:none;border-radius:16px;background:#fff;box-shadow:var(--shadow);font-size:22px;cursor:pointer}
.ghost-close{box-shadow:none;background:#f3f4f6}
.topbar-title{font-size:18px;font-weight:900}
.topbar-sub{font-size:13px;color:var(--muted);margin-top:2px}
.topbar-balance,.hero-balance{display:inline-flex;align-items:center;justify-content:center;background:#fff;border-radius:16px;padding:12px 16px;font-weight:900;box-shadow:var(--shadow);white-space:nowrap}
.avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#dbeafe,#bfdbfe);display:flex;align-items:center;justify-content:center;font-weight:900;color:#111827;overflow:hidden;flex-shrink:0}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.balance-link{cursor:pointer}
.avatar-wrap{position:relative}
.avatar-btn{border:none;background:transparent;padding:0;cursor:pointer}
.avatar-menu{position:absolute;right:0;top:54px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:14px;min-width:220px;display:none;z-index:60}
.avatar-menu.open{display:block}
.avatar-menu-name{font-size:16px;font-weight:900}
.avatar-menu-sub{font-size:13px;color:var(--muted);margin:4px 0 12px}
.avatar-upload,.avatar-menu-link,.inline-link{display:flex;align-items:center;justify-content:center;height:42px;border-radius:14px;font-weight:800}
.avatar-upload{background:#f8fafc;border:1px solid var(--line);margin-bottom:8px;cursor:pointer}
.avatar-menu-link{background:#fff;border:1px solid var(--line)}
.avatar-top{width:42px;height:42px}.avatar-lg{width:54px;height:54px}.avatar-med{width:52px;height:52px}.hero-avatar{width:62px;height:62px}.profile-avatar{width:76px;height:76px}
.sidebar{position:fixed;top:0;left:0;bottom:0;width:292px;background:#fff;transform:translateX(-100%);transition:.25s;z-index:40;border-right:1px solid var(--line);padding:20px 18px;display:flex;flex-direction:column;gap:18px}
.sidebar.open{transform:translateX(0)}
.mobile-overlay{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:30;opacity:0;pointer-events:none;transition:.25s}
.mobile-overlay.open{opacity:1;pointer-events:auto}
.sidebar-head{display:flex;align-items:center;justify-content:space-between}
.logo{font-size:28px;font-weight:900}
.user-card{background:#fff;border-radius:22px;padding:16px;border:1px solid var(--line);box-shadow:var(--shadow)}
.user-card.compact{background:#f8fafc;box-shadow:none}
.user-card-row{display:flex;align-items:center;gap:12px}
.user-name{font-size:18px;font-weight:900;line-height:1.25;margin-bottom:4px}
.user-meta{color:var(--muted);font-size:14px;line-height:1.45}
.nav-group-title{font-size:12px;font-weight:800;letter-spacing:.08em;color:#94a3b8;text-transform:uppercase;margin:0 12px 8px}
.nav-link{display:flex;align-items:center;padding:14px 14px;border-radius:16px;font-size:18px;font-weight:700;color:#111827;margin-bottom:4px}
.nav-link.active{background:var(--blue-soft);color:#1d4ed8}
.content{padding:16px 16px 28px}
.hero-card,.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;margin-bottom:16px}
.hero-main{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hero-left{display:flex;align-items:center;gap:12px;min-width:0}
.hero-name{font-size:20px;font-weight:900;line-height:1.2}.hero-sub{font-size:14px;color:var(--muted);margin-top:4px}
.card-title{font-size:30px;font-weight:900;margin:0 0 6px}.card-sub{font-size:15px;color:var(--muted);margin-bottom:16px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.stat{background:#fff;border-radius:20px;padding:16px;border:1px solid var(--line)}
.stat-label{font-size:14px;color:var(--muted)}
.stat-value{font-size:30px;font-weight:900;margin-top:8px}.stat-sm{font-size:20px;line-height:1.3}
.progress-card{padding:18px;border-radius:22px;background:#f8fafc;margin-bottom:16px}
.progress-title{font-size:22px;font-weight:900;margin-bottom:14px}.progress-bar{height:28px;background:#dde3ed;border-radius:999px;overflow:hidden}
.progress-fill{height:100%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;min-width:0;transition:.3s}
.fill-android{background:linear-gradient(90deg,#ff7f50,#ff3b30)}.fill-iphone{background:linear-gradient(90deg,#60a5fa,#2563eb)}
.progress-meta{margin-top:10px;font-size:16px;color:#475569;line-height:1.5}
.toolbar{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px}.toolbar.compact-gap{margin-bottom:12px}
.segmented{display:flex;gap:10px;flex-wrap:wrap}.seg-btn,.ghost-btn,.primary-btn,.success-btn,.sold-btn{border:none;border-radius:16px;padding:12px 16px;font-weight:800;cursor:pointer}
.seg-btn{background:#fff;border:1px solid var(--line);color:#111827}.seg-btn.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.ghost-btn{background:#fff;border:1px solid var(--line)}.primary-btn{background:var(--blue);color:#fff}.success-btn{background:var(--green);color:#fff}
.sold-btn{width:100%;background:linear-gradient(90deg,var(--orange1),var(--orange2));color:#fff;font-size:18px;margin-bottom:10px}
.offer-pill{height:38px;background:#f8fafc;border:1px solid var(--line);border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:14px;color:#64748b;margin-bottom:12px}
.search-row{margin-bottom:12px}.search-input{width:100%;height:42px;border:1px solid var(--line);border-radius:14px;padding:0 14px;background:#fff}
.table-wrap{overflow:auto;border-radius:18px;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;background:#fff}th,td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line);font-size:15px;vertical-align:top}th{color:#475569;font-size:14px}
.sales-table th,.sales-table td{white-space:nowrap}
.badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:800}.badge.new{background:#dbeafe;color:#1d4ed8}.badge.paid,.badge.done{background:#dcfce7;color:#166534}.badge.failed,.badge.rejected{background:#fee2e2;color:#991b1b}
.list{display:flex;flex-direction:column;gap:14px}.history-item,.top-card,.plain-item{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px}.history-item{display:flex;justify-content:space-between;gap:16px;align-items:center}
.history-title{font-size:17px;font-weight:800}.history-sub,.top-sub{font-size:13px;color:var(--muted);margin-top:4px}.money.plus{color:#16a34a}.money.minus{color:#ef4444}
.top-card{display:flex;align-items:center;gap:14px}.top-rank{width:28px;font-size:22px;font-weight:900;color:#64748b;flex-shrink:0}.top-body{flex:1;min-width:0}.top-name{font-size:18px;font-weight:900;line-height:1.2}.top-sales{font-size:26px;font-weight:900}.top-sales.small{font-size:18px}
.form-grid{display:grid;gap:12px;grid-template-columns:1fr 1fr}.form-field{display:flex;flex-direction:column;gap:8px}.form-field label{font-size:14px;color:#475569;font-weight:700}.form-field input,.form-field select,.upload-box{height:48px;border:1px solid var(--line);border-radius:14px;padding:0 14px;background:#fff}.upload-box{display:flex;align-items:center;width:100%}.full{grid-column:1/-1}
.notice{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;padding:12px 14px;border-radius:14px;font-size:14px;margin-top:12px}.link-box{word-break:break-all}.empty{padding:28px;text-align:center;color:var(--muted);background:#fff;border:1px dashed var(--line);border-radius:20px}
.profile-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}.subcard{background:#fff;border-radius:22px;padding:18px;border:1px solid var(--line)}
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.5);display:flex;align-items:flex-end;justify-content:center;padding:12px;z-index:100}.modal{width:min(720px,100%);background:#fff;border-radius:28px;padding:22px;max-height:92vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.2)}.sale-modal{max-width:560px}
.modal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.modal-title{font-size:28px;font-weight:900}.modal-sub{color:var(--muted);margin-top:6px}
.qr-hero{display:flex;align-items:center;justify-content:center;background:#f8fafc;border:1px solid var(--line);border-radius:22px;min-height:280px;margin-bottom:14px}.qr-hero img{max-width:100%;max-height:100%}
.sale-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}.sale-actions.centered{justify-content:center}.wide{width:100%}.file-card{background:#f8fafc;border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:12px}.file-card-title{font-size:15px;font-weight:800;margin-bottom:10px}.bottom-actions{display:flex;gap:12px;justify-content:space-between;margin-top:18px}
@media (max-width:760px){.grid-2,.form-grid{grid-template-columns:1fr}.card-title{font-size:28px}.topbar{padding:14px}.content{padding:14px}.hero-main{align-items:flex-start}.hero-left{flex-direction:column;align-items:flex-start}.topbar-right{gap:8px}.topbar-balance{padding:10px 12px}}

.stack-grid{display:grid;gap:16px;margin-bottom:18px}
.wide-subcard{max-width:none}
.form-grid-single{grid-template-columns:1fr}
.ios-form input,.ios-form select,.ios-select{background:#f8fafc;border:1px solid var(--line);border-radius:18px;height:52px;padding:0 16px;appearance:none}
.profile-upload{max-width:260px}
.camera-grid{display:grid;gap:12px;margin-top:16px}
.camera-card{background:#f8fafc;border:1px solid var(--line);border-radius:20px;padding:14px}
.camera-card-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.camera-icon{width:30px;height:30px;border-radius:999px;background:#e0e7ff;color:#1d4ed8;display:flex;align-items:center;justify-content:center;font-weight:900}
.camera-card-title{font-size:15px;font-weight:800}
.camera-button{display:flex;align-items:center;justify-content:center;height:44px;border-radius:14px;background:#fff;border:1px solid var(--line);font-weight:800;cursor:pointer}
.camera-status{margin-top:10px;font-size:13px;color:var(--muted);word-break:break-word}
.camera-status.done{color:var(--green);font-weight:700}.camera-preview-wrap{margin-top:12px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:#fff}.camera-preview{display:block;width:100%;max-height:260px;object-fit:cover}
.ios-modal .bottom-actions .success-btn:disabled{background:#cbd5e1;color:#64748b;cursor:not-allowed}
.ios-modal .bottom-actions .success-btn:disabled:hover{opacity:1}
@media (max-width:760px){.stack-grid{grid-template-columns:1fr}}

.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}
.login-auth-card{max-width:420px;width:100%}
.auth-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.password-row{display:flex;gap:10px;align-items:center}
.password-row .search-input{flex:1}


.sidebar{overflow:hidden}
.sidebar-scroll{flex:1;min-height:0;overflow:auto;padding-right:2px}
.sidebar-nav{display:flex;flex-direction:column;gap:8px;padding-bottom:12px}
.sidebar-foot{padding-top:8px;border-top:1px solid var(--line);margin-top:auto}
.sidebar-logout{width:100%}
.avatar-menu{display:none;flex-direction:column;gap:8px}
.avatar-menu.open{display:flex}
.avatar-menu-danger{color:#b91c1c;border-color:#fecaca;background:#fff5f5}
.password-row{display:flex;gap:10px;align-items:center}
.password-row input{flex:1 1 auto}
.small-btn{height:48px;white-space:nowrap;padding:0 14px;border-radius:14px}
@media (max-width:760px){.sidebar{width:min(88vw,320px)}}


.nav-links{display:flex;flex-direction:column;gap:4px}
.sidebar-section{display:flex;flex-direction:column;gap:6px}
.grouped{background:#f8fafc;border:1px solid var(--line);border-radius:18px;padding:8px}
.nav-group-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;border:none;background:transparent;padding:10px 12px;border-radius:14px;font-size:14px;font-weight:800;color:#334155;cursor:pointer}
.nav-group-toggle:hover{background:#eef2ff}
.nav-group-chevron{font-size:18px;line-height:1;color:#64748b}
.grouped .nav-links{display:none;padding:4px 0 0}
.grouped .nav-links.open{display:flex}
.login-auth-card{padding:28px 24px 26px}
.login-auth-card .form-field{gap:10px;margin-top:0}
.login-auth-card .search-input{height:52px;border-radius:18px}
.login-auth-card .card-sub{margin-bottom:22px}
.auth-actions-stack{display:flex;flex-direction:column;align-items:stretch;gap:14px;margin-top:22px}
.auth-btn{width:100%;height:52px;border-radius:18px;font-size:18px;display:flex;align-items:center;justify-content:center;text-align:center}
.login-auth-card .ghost-btn{height:52px;border-radius:18px}
.login-auth-card .notice{margin-top:16px}

.ghost-btn:disabled,.primary-btn:disabled,.success-btn:disabled,.sold-btn:disabled{opacity:.6;cursor:not-allowed}
.auth-timer-hint{margin-top:10px;margin-bottom:0;text-align:center}

.auth-success{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:280px;padding:12px 6px 4px}.auth-success-mark{width:96px;height:96px;border-radius:999px;display:grid;place-items:center;background:rgba(34,197,94,.12);box-shadow:0 0 0 0 rgba(34,197,94,.18);animation:authSuccessPulse 1.4s ease-out infinite}.auth-success-mark svg{width:56px;height:56px;overflow:visible}.auth-success-mark circle{stroke:rgba(34,197,94,.28);stroke-width:4}.auth-success-mark path{stroke:#16a34a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40;animation:authSuccessCheck .55s ease .18s forwards}.auth-success-loader{width:100%;max-width:220px;height:8px;border-radius:999px;background:#e5e7eb;overflow:hidden;margin-top:10px}.auth-success-loader span{display:block;width:42%;height:100%;border-radius:999px;background:linear-gradient(90deg,#22c55e,#60a5fa);animation:authSuccessSlide 1.15s ease-in-out infinite}@keyframes authSuccessCheck{to{stroke-dashoffset:0}}@keyframes authSuccessPulse{0%{transform:scale(.96);box-shadow:0 0 0 0 rgba(34,197,94,.20)}70%{transform:scale(1);box-shadow:0 0 0 18px rgba(34,197,94,0)}100%{transform:scale(.98);box-shadow:0 0 0 0 rgba(34,197,94,0)}}@keyframes authSuccessSlide{0%{transform:translateX(-120%)}100%{transform:translateX(340%)}}

.field-hint{margin-top:8px;color:#6b7280;font-size:13px;line-height:1.35}
.ios-select-btn{width:100%;border:1px solid var(--line);background:#f8f8fb;border-radius:18px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;font:inherit;cursor:pointer;text-align:left;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.ios-select-value{font-size:16px;font-weight:600;color:#111827}
.ios-select-chevron{font-size:22px;line-height:1;color:#6b7280;margin-left:16px}
.ios-sheet{width:min(560px,calc(100vw - 24px));max-height:min(78vh,720px);background:#f5f5f7;border-radius:28px;padding:10px 12px 14px;box-shadow:0 24px 80px rgba(15,23,42,.22);display:flex;flex-direction:column}
.ios-sheet-handle{width:44px;height:5px;border-radius:999px;background:#d1d5db;margin:2px auto 12px}
.ios-sheet-header{display:flex;align-items:center;justify-content:space-between;padding:0 6px 8px}
.ios-sheet-title{font-size:22px;font-weight:800;color:#111827}
.bank-picker-sheet .close-btn{background:#fff;border:1px solid #e5e7eb;width:38px;height:38px;border-radius:50%}
.ios-sheet-search-wrap{padding:0 6px 10px}
.ios-sheet-search{background:#fff}
.ios-sheet-list{overflow:auto;padding:0 6px 4px;display:flex;flex-direction:column;gap:8px}
.ios-bank-option{width:100%;border:0;background:#fff;border-radius:18px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;font:inherit;font-size:16px;font-weight:600;color:#111827;cursor:pointer;box-shadow:0 1px 0 rgba(17,24,39,.04)}
.ios-bank-option.active{outline:2px solid rgba(37,99,235,.16);background:#eef4ff}
.ios-bank-check{font-size:18px;color:#2563eb;min-width:24px;text-align:right}
.bank-empty{background:#fff;border-radius:18px;padding:20px}
@media (max-width:640px){.ios-sheet{width:calc(100vw - 16px);border-radius:24px}.ios-sheet-title{font-size:20px}.ios-bank-option{padding:15px 16px}}

.withdraw-bank-card{display:flex;align-items:center;gap:16px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:1px solid var(--line);border-radius:24px;padding:18px 18px 18px 16px;margin-bottom:18px;box-shadow:0 12px 32px rgba(15,23,42,.06)}
.withdraw-bank-card.empty-state{background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)}
.withdraw-bank-icon{width:64px;height:64px;border-radius:20px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;font-size:20px;font-weight:900;letter-spacing:.04em;flex-shrink:0;box-shadow:0 12px 30px rgba(37,99,235,.22)}
.withdraw-bank-body{min-width:0;flex:1}
.withdraw-bank-eyebrow{font-size:13px;font-weight:700;color:#64748b;margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.withdraw-bank-name{font-size:20px;font-weight:900;line-height:1.2;color:#0f172a}
.withdraw-bank-phone{margin-top:6px;font-size:15px;color:#475569;word-break:break-word}
.withdraw-bank-link{flex-shrink:0;min-width:116px;text-decoration:none;padding:0 14px}
@media (max-width:640px){.withdraw-bank-card{align-items:flex-start;flex-wrap:wrap}.withdraw-bank-link{width:100%;margin-top:2px}.withdraw-bank-name{font-size:18px}.withdraw-bank-icon{width:58px;height:58px;border-radius:18px;font-size:18px}}
