:root{--primary:#e03;--primary-dark:#c4002a;--blue:#0f62fe;--green:#16a34a;--amber:#d97706;--bg:#f3f5f9;--card:#fff;--text:#1e293b;--muted:#64748b;--border:#e2e8f0;--radius:12px}*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;-webkit-tap-highlight-color:transparent}.topbar{background:linear-gradient(135deg,#e10032,#a80024);color:#fff;padding:11px 16px;position:sticky;top:0;z-index:100;box-shadow:0 2px 10px rgba(0,0,0,.12)}.topbar-inner{max-width:1180px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}.brand{font-weight:700;font-size:15px;display:flex;align-items:center;gap:6px}.nav{display:flex;gap:4px;flex-wrap:wrap}.nav a{color:rgba(255,255,255,.92);text-decoration:none;padding:6px 10px;border-radius:7px;font-weight:500;font-size:13px}.nav a:hover,.nav a.active{background:rgba(255,255,255,.22);color:#fff}.container{max-width:1180px;margin:16px auto;padding:0 14px 44px}.page-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:14px}.page-title{font-size:18px;font-weight:700}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:16px}.stat-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;box-shadow:0 1px 2px rgba(0,0,0,.03)}.stat-label{color:var(--muted);font-size:11.5px;font-weight:700;text-transform:uppercase}.stat-val{font-size:20px;font-weight:700;margin-top:4px}.stat-val.red{color:var(--primary)}.stat-val.green{color:var(--green)}.stat-val.blue{color:var(--blue)}.settings-box{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:14px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.04)}.box-header{padding:13px 16px;background:#f8fafc;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;cursor:pointer;user-select:none}.box-header:hover{background:#f1f5f9}.box-title{font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.box-badge{font-size:11px;padding:2px 8px;border-radius:99px;background:#fee2e2;color:var(--primary);font-weight:600}.box-badge.green{background:#dcfce7;color:var(--green)}.box-badge.blue{background:#dbeafe;color:#1d4ed8}.box-chevron{font-size:12px;color:var(--muted);transition:transform .2s ease}.settings-box.collapsed .box-header{border-bottom:none}.settings-box.collapsed .box-chevron{transform:rotate(-90deg)}.settings-box.collapsed .box-body{display:none}.box-body{padding:16px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.form-group{margin-bottom:12px}.form-group label{display:block;font-weight:600;margin-bottom:5px;font-size:13px;color:#334155}.form-hint{font-size:12px;color:var(--muted);margin-top:4px}input[type="text"],input[type="tel"],input[type="email"],input[type="password"],input[type="number"],input[type="date"],input[type="file"],select,textarea{width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:9px;font-size:14px;background:#fff;color:var(--text);font-family:inherit;transition:border-color .15s , box-shadow .15s}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(238,0,51,.1)}.switch-row{display:flex;align-items:center;gap:8px;font-weight:600;cursor:pointer}.switch-row input[type="checkbox"]{width:18px;height:18px;accent-color:var(--primary)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 15px;border-radius:9px;border:none;font-weight:600;font-size:13.5px;cursor:pointer;text-decoration:none;transition:opacity .15s , transform .08s}.btn:active{transform:scale(.98)}.btn-primary{background:linear-gradient(135deg,#e03,#c9002b);color:#fff;box-shadow:0 2px 6px rgba(238,0,51,.22)}.btn-secondary{background:#e2e8f0;color:var(--text)}.btn-green{background:#16a34a;color:#fff}.btn-blue{background:#2563eb;color:#fff}.btn-outline{background:#fff;border:1px solid #cbd5e1;color:#334155}.btn-danger-outline{background:#fff1f2;border:1px solid #fecdd3;color:#be123c}.btn-sm{padding:6px 11px;font-size:12px;border-radius:7px}.btn-block{width:100%;padding:12px 16px;font-size:14.5px}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:15px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.03)}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:9px 10px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}th{background:#f8fafc;font-weight:700;color:var(--muted)}.badge{padding:3px 9px;border-radius:99px;font-size:11px;font-weight:700;display:inline-block}.badge-paid{background:#dcfce7;color:#166534}.badge-unpaid{background:#fef3c7;color:#92400e}.badge-approved{background:#dbeafe;color:#1e40af}.badge-pending{background:#f1f5f9;color:#475569}.badge-rejected{background:#fee2e2;color:#991b1b}.alert{padding:11px 14px;border-radius:10px;margin-bottom:12px;font-weight:500;font-size:13.5px}.alert-ok{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.alert-err{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.auth-wrap{max-width:430px;margin:28px auto;padding:0 14px}.auth-card{background:#fff;border-radius:14px;padding:24px;border:1px solid var(--border);box-shadow:0 6px 20px rgba(0,0,0,.06)}body.ctv-mobile-app{background:#f1f5f9;padding-bottom: calc(80px + env(safe-area-inset-bottom))}.ctv-topbar{background:#fff;color:#0f172a;position:sticky;top:0;z-index:120;border-bottom:1px solid #e2e8f0;box-shadow:0 2px 10px rgba(15,23,42,.06)}.ctv-topbar-inner{max-width:680px;margin:0 auto;padding:9px 12px;display:flex;justify-content:space-between;align-items:center;gap:8px}.ctv-logo-link{display:inline-flex;align-items:center;text-decoration:none;flex-shrink:0}.ctv-brand-logo{height:34px;width:auto;max-width:145px;object-fit:contain;display:block}.ctv-header-right{display:flex;align-items:center;gap:8px;min-width:0;margin-left:auto}.ctv-user-stack{text-align:right;line-height:1.25;min-width:0}.ctv-user-code{font-size:11px;color:#64748b;font-weight:600;white-space:nowrap}.ctv-user-code strong{display:inline-block;background:#fff1f2;color:#e03;border:1px solid #fecdd3;padding:0 6px;border-radius:5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;font-weight:800;letter-spacing:.4px}.ctv-user-name{font-size:13px;font-weight:700;color:#0f172a;margin-top:2px;max-width:155px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-action-btn{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.16);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;flex-shrink:0;transition:background .15s , transform .1s}.icon-action-btn.light{background:#f8fafc;border:1px solid #cbd5e1;color:#334155}.icon-action-btn.light:hover{background:#f1f5f9;color:#0f172a}.icon-action-btn.light.logout{background:#fff1f2;border-color:#fecdd3;color:#e03}.icon-action-btn.light.logout:hover{background:#ffe4e6}.icon-action-btn:active{transform:scale(.92)}.icon-action-btn.spinning svg,.sub-tool-btn.spinning svg{animation:spin360 .75s linear infinite}@keyframes spin360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }.ctv-main{max-width:680px;margin:0 auto;padding:10px 12px 20px}.ctv-sub-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:7px;margin-bottom:11px}.sub-tool-btn{display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 11px;border-radius:9px;font-size:12.5px;font-weight:700;cursor:pointer;border:1px solid #cbd5e1;background:#fff;color:#334155;box-shadow:0 1px 2px rgba(15,23,42,.04);transition:all .15s ease}.sub-tool-btn:active{transform:scale(.96)}.sub-tool-btn.sync{background:#fff;border-color:#cbd5e1;color:#0f172a}.sub-tool-btn.sync:hover{background:#f8fafc}.sub-tool-btn.notice{background:#fffbeb;border-color:#fde68a;color:#b45309}.sub-tool-btn.notice:hover{background:#fef3c7}.sub-tool-btn.contact{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.sub-tool-btn.contact:hover{background:#dbeafe}.pastel-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-bottom:12px}@media (min-width:600px){.pastel-grid{grid-template-columns:repeat(4,1fr)}}.pastel-box{border-radius:13px;padding:11px 12px;border:1px solid transparent;box-shadow:0 1px 2px rgba(0,0,0,.02)}.pastel-box .p-head{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;margin-bottom:4px}.pastel-box .p-val{font-size:16.5px;font-weight:800;letter-spacing:-.3px}.pastel-cream{background:#fefce8;border-color:#fde68a;color:#92400e}.pastel-blue{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.pastel-rose{background:#fff1f2;border-color:#fecdd3;color:#be123c}.pastel-green{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}.reg-radio-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.reg-radio-card{display:flex!important;align-items:center;gap:9px;padding:11px 12px;border-radius:10px;border:1.5px solid #cbd5e1;background:#f8fafc;color:#334155;font-weight:700;font-size:13.5px;cursor:pointer;margin-bottom:0!important;user-select:none;transition:all .15s ease}.reg-radio-card input[type="radio"]{width:18px;height:18px;margin:0;accent-color:var(--primary);cursor:pointer;flex-shrink:0}.reg-radio-card.active{background:#fff1f2;border-color:var(--primary);color:#be123c}.pkg-input-wrap{position:relative;display:flex;align-items:center}.pkg-input-wrap input{padding-right:36px;font-weight:700;text-transform:uppercase}.pkg-clear-btn{position:absolute;right:8px;width:24px;height:24px;border-radius:50%;border:none;background:#e2e8f0;color:#475569;font-size:16px;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.pkg-suggest-fullscreen{position:fixed;left:0;right:0;width:100vw;background:#fff;border-top:1px solid #cbd5e1;border-bottom:2px solid var(--primary);box-shadow:0 12px 28px rgba(15,23,42,.18);z-index:350}.pkg-suggest-head{display:flex;justify-content:space-between;align-items:center;padding:8px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:12.5px;color:#475569}.pkg-suggest-close{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:6px;padding:3px 9px;font-size:12px;font-weight:700;cursor:pointer}.pkg-horizontal-list{display:flex;flex-wrap:wrap;gap:8px;padding:12px 14px;max-height:48vh;overflow-y:auto;align-content:flex-start}.pkg-suggest-chip{padding:9px 14px;border-radius:9px;border:1px solid #cbd5e1;background:#f8fafc;color:#0f172a;font-weight:700;font-size:13.5px;cursor:pointer;white-space:nowrap;transition:all .12s ease}.pkg-suggest-chip:hover,.pkg-suggest-chip.selected{background:#fff1f2;border-color:var(--primary);color:var(--primary)}.comm-selected-box{margin-top:9px;padding:10px 13px;border-radius:10px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;font-size:13.5px;display:flex;justify-content:space-between;align-items:center;gap:8px}.comm-selected-val{font-size:16px;font-weight:800;color:#15803d;white-space:nowrap}.comm-simple-table{width:100%;border-collapse:collapse;font-size:13.5px}.comm-simple-table th{background:#f8fafc;color:#334155;font-weight:800;padding:10px 12px;border-bottom:2px solid #e2e8f0}.comm-simple-table td{padding:10px 12px;border-bottom:1px solid #f1f5f9}.comm-simple-table tbody tr:hover{background:#f8fafc}.filter-chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;margin-bottom:10px;scrollbar-width:none}.filter-chips::-webkit-scrollbar{display:none}.chip-btn{padding:6px 12px;border-radius:99px;border:1px solid #cbd5e1;background:#fff;color:#475569;font-size:12.5px;font-weight:600;white-space:nowrap;cursor:pointer}.chip-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}.order-item-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:12px 13px;margin-bottom:9px;box-shadow:0 1px 2px rgba(0,0,0,.02)}.order-top{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #f1f5f9;padding-bottom:7px;margin-bottom:8px}.order-pkg-badge{background:#fff1f2;color:var(--primary);font-weight:800;font-size:13px;padding:2px 9px;border-radius:6px}.order-mid{display:flex;justify-content:space-between;align-items:center;gap:8px}.order-bot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:7px;border-top:1px dashed #e2e8f0;font-size:11.5px;color:var(--muted)}.pagination-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;padding:10px 12px;background:#fff;border-radius:10px;border:1px solid var(--border)}.page-btns{display:flex;gap:4px;flex-wrap:wrap}.pg-btn{min-width:32px;height:32px;padding:0 9px;border-radius:7px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-weight:600;font-size:12.5px;cursor:pointer}.pg-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}.pg-btn:disabled{opacity:.45;cursor:not-allowed}.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e2e8f0;box-shadow:0 -3px 14px rgba(0,0,0,.07);z-index:200;padding-bottom:env(safe-area-inset-bottom)}.bottom-nav-inner{max-width:680px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr)}.bnav-item{border:none;background:transparent;padding:8px 4px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#64748b;font-size:11.5px;font-weight:600;cursor:pointer;position:relative}.bnav-item svg{width:20px;height:20px}.bnav-item.active{color:var(--primary);font-weight:700}.bnav-item.active::before{content:'';position:absolute;top:0;width:34px;height:3px;border-radius:0 0 4px 4px;background:var(--primary)}.tab-panel{display:none}.tab-panel.active{display:block;animation:fadeIn .16s ease}@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.56);z-index:500;display:none;align-items:flex-end;justify-content:center;padding:12px}@media (min-width:540px){.modal-backdrop{align-items:center}}.modal-backdrop.open{display:flex}.modal-sheet{background:#fff;width:100%;max-width:460px;border-radius:16px;padding:18px;box-shadow:0 12px 32px rgba(0,0,0,.22);max-height:88vh;overflow-y:auto}.modal-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid var(--border)}.modal-close{width:30px;height:30px;border-radius:50%;border:none;background:#f1f5f9;font-size:17px;cursor:pointer}.toast-msg{position:fixed;top:64px;left:50%;transform:translateX(-50%);background:#0f172a;color:#fff;padding:9px 16px;border-radius:99px;font-size:13px;font-weight:600;z-index:600;box-shadow:0 6px 18px rgba(0,0,0,.2);display:none;max-width:92vw;text-align:center}#tab-report>.card{border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 5px 18px rgba(15,23,42,.06);padding:16px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}#tab-report .form-group{margin-bottom:16px}#tab-report .form-group>label{font-size:13px;font-weight:750;color:#1e293b;margin-bottom:7px}.phone-input-row{display:flex;gap:8px;align-items:stretch}.phone-input-row input{min-width:0;flex:1}#customer_phone_input.input-invalid{border-color:#ef4444!important;background:#fffafa}.field-hint{display:block;margin-top:5px;color:#64748b;font-size:11.5px}.field-hint.error{color:#dc2626;font-weight:650}.reg-radio-group{display:grid;grid-template-columns:1fr 1fr;gap:9px}.reg-radio-card{min-height:48px;padding:10px 12px;gap:10px;cursor:default}.reg-radio-card input[type="radio"]{width:19px;height:19px;min-width:19px;cursor:pointer}.reg-radio-card span{cursor:default;pointer-events:none}.pkg-input-wrap input{text-transform:none;font-weight:600}.pkg-horizontal-list{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-height:none;min-height:54px;align-items:center;align-content:normal;-webkit-overflow-scrolling:touch;scrollbar-width:thin;overscroll-behavior-x:contain}.pkg-suggest-chip{flex:0 0 auto}.report-syntax-card{margin-top:12px;padding:15px;border:1px solid #dbeafe;border-radius:16px;background:linear-gradient(135deg,#f8fbff 0%,#eef6ff 100%);box-shadow:0 4px 14px rgba(30,64,175,.055)}.report-syntax-title{display:flex;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid #dbeafe}.syntax-icon{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:11px;color:#fff;background:#e11d48;font-size:18px}.report-syntax-title strong{display:block;color:#0f172a;font-size:14px;font-weight:800}.report-syntax-title small{display:block;margin-top:2px;color:#64748b;font-size:11px}.syntax-method{display:flex;align-items:flex-start;gap:10px;padding-top:12px}.syntax-method+.syntax-method{margin-top:10px;border-top:1px dashed #cbd5e1}.syntax-step{flex:0 0 58px;padding:5px 6px;text-align:center;border-radius:7px;background:#fff;color:#475569;border:1px solid #dbeafe;font-size:10.5px;font-weight:800}.syntax-method>div{min-width:0;flex:1}.syntax-method strong{color:#1e293b;font-size:12.5px}.syntax-method em{margin-left:5px;padding:2px 6px;border-radius:20px;background:#dcfce7;color:#15803d;font-style:normal;font-size:9px}.syntax-method p{margin:5px 0 0;color:#334155;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.syntax-method p a{color:#1d4ed8;text-decoration:underline}@media (max-width:380px){#tab-report>.card{padding:12px}.reg-radio-group{gap:6px}.reg-radio-card{padding:9px 8px;font-size:12px}}.auth-brand{display:flex;justify-content:center;align-items:center;margin:2px 0 16px;min-height:48px}.auth-brand img{display:block;max-width:220px;max-height:54px;object-fit:contain}.pkg-suggest-fullscreen{left:14px;right:14px;width:auto;max-width:652px;margin:0 auto;border:1px solid #dbe3ef;border-radius:12px;overflow:hidden;max-height:150px}.pkg-horizontal-list{display:flex;flex-wrap:nowrap;gap:7px;overflow-x:auto;overflow-y:hidden;max-height:78px;min-height:52px;padding:9px 10px;white-space:nowrap;scroll-snap-type:x proximity}.pkg-suggest-chip{scroll-snap-align:start;padding:8px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;color:#1e293b;font-size:12.5px;font-weight:750}.pkg-suggest-chip.selected{background:#fff1f2;border-color:#fb7185;color:#be123c}.report-syntax-card{margin-top:14px;padding:17px;border:1px solid #f3b5c3;border-radius:16px;background:linear-gradient(135deg,#fff7f8 0%,#fff 52%,#fff1f2 100%);box-shadow:0 7px 22px rgba(190,24,93,.10)}.report-syntax-title{padding-bottom:13px;border-bottom:1px solid #fbcbd4}.report-syntax-title strong{font-size:17px;color:#9f1239}.syntax-icon{width:40px;height:40px;flex-basis:40px;background:linear-gradient(135deg,#e03,#be123c);font-size:23px}.syntax-method{gap:12px;padding-top:14px}.syntax-step{flex-basis:66px;padding:7px 6px;font-size:12px;background:#fff;border-color:#fecdd3;color:#9f1239}.syntax-method strong{font-size:14px}.syntax-method p{font-size:14px;line-height:1.65;margin-top:7px}.syntax-method p.syntax-sms-line{font-size:18px;font-weight:800;color:#334155;letter-spacing:.1px}.syntax-sms-line span{color:#475569}.syntax-sms-line b:first-of-type{color:#e11d48;background:#ffe4e6;padding:2px 7px;border-radius:6px}.syntax-sms-line b:last-of-type{color:#047857;background:#d1fae5;padding:2px 7px;border-radius:6px}.syntax-method p a{font-size:13px;display:inline-block;line-height:1.5;word-break:break-all}.account-summary{display:grid;grid-template-columns:1fr;gap:0;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:5px 12px;margin-bottom:12px}.account-summary>div{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 0;border-bottom:1px solid #e8edf4;font-size:13px}.account-summary>div:last-child{border-bottom:0}.account-summary span{color:#64748b;flex:0 0 112px}.account-summary strong{text-align:right;color:#0f172a;overflow-wrap:anywhere}.account-edit-toggle{font-weight:750}@media (max-width:380px){.account-summary span{flex-basis:96px}.syntax-method p.syntax-sms-line{font-size:16px}}.commission-table-scroll{max-height:58vh;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid #e2e8f0;border-radius:10px}.commission-table-scroll table{min-width:420px;width:100%;border-collapse:separate;border-spacing:0}.commission-table-scroll thead th{position:sticky;top:0;z-index:2;background:#f8fafc;box-shadow:0 1px 0 #e2e8f0}.commission-table-scroll tbody tr:nth-child(even){background:#f8fafc}.commission-table-scroll td,.commission-table-scroll th{padding:11px 12px;white-space:nowrap}