*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#fafafa;color:#171717;min-height:100vh}
a{color:#0a72ef;text-decoration:none}
.auth-wrap{max-width:408px;margin:0 auto;padding:6vh 24px 24px}
.card{background:#fff;border-radius:14px;padding:24px;box-shadow:rgba(0,0,0,.08) 0 0 0 1px,rgba(0,0,0,.04) 0 8px 24px -16px;margin-bottom:18px}
.auth-wrap .card{padding:34px 30px}
.logo{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.logo-icon{width:38px;height:38px;border-radius:10px;overflow:hidden;flex-shrink:0}
.logo-icon img{width:100%;height:100%;object-fit:cover;display:block}
.logo-name{font-size:17px;font-weight:600;letter-spacing:-.3px}
h1{font-size:24px;font-weight:600;letter-spacing:-.8px;margin-bottom:6px}
h2{font-size:16px;font-weight:600;letter-spacing:-.3px;margin-bottom:14px}
.sub{font-size:14px;line-height:1.6;color:#666;margin-bottom:20px}
.tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:20px}
.tab{flex:1;height:36px;border:none;border-radius:9px;background:#f5f5f5;color:#666;font-size:14px;cursor:pointer}
.tab.active{background:#171717;color:#fff}
.field{margin-bottom:16px}
label{display:block;font-size:13px;font-weight:500;margin-bottom:7px}
input[type=text],input[type=password],input[type=email],input[type=number],select{width:100%;height:42px;padding:0 12px;border:none;border-radius:10px;background:#fff;color:#171717;box-shadow:rgba(0,0,0,.08) 0 0 0 1px,rgba(0,0,0,.02) 0 2px 2px;outline:none;font-size:14px;font-family:inherit}
input:focus,select:focus{box-shadow:rgba(10,114,239,.35) 0 0 0 3px,rgba(0,0,0,.08) 0 0 0 1px}
.mode-links{display:flex;justify-content:flex-end;margin-top:8px}
.text-link{border:none;background:none;padding:0;color:#0a72ef;font-size:12px;cursor:pointer}
.text-link:hover{text-decoration:underline}
.captcha-row{display:grid;grid-template-columns:minmax(0,1fr) 138px;gap:10px;align-items:center}
.captcha-box{height:42px;border:none;background:#fff;border-radius:10px;padding:0;overflow:hidden;cursor:pointer;box-shadow:rgba(0,0,0,.08) 0 0 0 1px}
.captcha-box img{display:block;width:100%;height:100%;object-fit:cover}
.code-row{display:grid;grid-template-columns:minmax(0,1fr) 122px;gap:10px}
button{font-family:inherit}
.btn{width:100%;height:42px;border:none;border-radius:10px;background:#171717;color:#fff;font-size:14px;font-weight:500;cursor:pointer;transition:opacity .15s ease}
.btn:hover{opacity:.92}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-ghost{background:#f5f5f5;color:#171717;box-shadow:rgba(0,0,0,.06) 0 0 0 1px}
.btn-sm{height:32px;width:auto;padding:0 12px;font-size:13px;border-radius:8px}
.msg{display:none;margin-bottom:16px;padding:11px 12px;border-radius:10px;font-size:13px;line-height:1.5}
.msg.show{display:block}
.msg.err{background:#fff7ed;color:#9a3412;box-shadow:rgba(249,115,22,.18) 0 0 0 1px}
.msg.ok{background:#f0fdf4;color:#166534;box-shadow:rgba(34,197,94,.18) 0 0 0 1px}
.shell{display:flex;min-height:100vh;align-items:stretch}
.sidebar{width:218px;flex-shrink:0;background:#fff;border-right:1px solid #ececec;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;padding:20px 12px 14px}
.sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 8px 20px}
.sidebar-brand-text{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.sidebar-brand-sub{font-size:11px;color:#8a8a8a}
.sidebar-backdrop{display:none}
.mobile-nav-bar{display:none}
.mobile-nav-toggle{display:none}
.sidebar-menu{display:flex;flex-direction:column;flex:1;min-height:0}
.nav{display:flex;flex-direction:column;gap:2px;flex:1;overflow-y:auto}
.nav-group{font-size:11px;color:#9a9a9a;padding:14px 10px 6px;letter-spacing:.02em}
.nav-group:first-child{padding-top:0}
.nav button,.sidebar-foot button{display:flex;align-items:center;gap:10px;width:100%;height:38px;padding:0 10px;border:none;border-radius:9px;background:transparent;color:#525252;font-size:14px;text-align:left;cursor:pointer;transition:background .12s ease,color .12s ease}
.nav button:hover,.sidebar-foot button:hover{background:#f4f4f4;color:#171717}
.nav button.active{background:#171717;color:#fff}
.nav button svg,.sidebar-foot button svg{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav button.active svg{stroke:#fff}
.sidebar-foot{border-top:1px solid #f0f0f0;padding-top:10px;margin-top:10px}
.sidebar-user{font-size:12px;color:#8a8a8a;padding:0 10px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.content{flex:1;min-width:0;padding:24px 28px}
.dash-grid{display:grid;grid-template-columns:1fr;gap:18px;align-items:start}
@media (min-width:1180px){
  .dash-grid{grid-template-columns:minmax(0,2fr) minmax(320px,1fr)}
}
.dash-grid .card{margin-bottom:0}
.bind-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
#paneHourly,#paneFinance,#paneWithdraw,#paneNotify,#panePayout,#panePassword{max-width:980px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}
.stat{background:#fff;border-radius:12px;padding:16px;box-shadow:rgba(0,0,0,.08) 0 0 0 1px}
.stat .k{font-size:12px;color:#666;margin-bottom:6px}
.stat .v{font-size:22px;font-weight:600;letter-spacing:-.5px}
.panel-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.panel-actions .btn{width:auto;min-width:124px;padding:0 18px}
.note{font-size:12px;color:#888;line-height:1.6;margin-top:10px}
.tbl-scroll{overflow-x:auto;margin:0 -4px;padding:0 4px}
table{width:100%;border-collapse:collapse;font-size:13px;min-width:720px}
th,td{text-align:left;padding:10px 8px;border-bottom:1px solid #f0f0f0;white-space:nowrap}
th{font-size:12px;color:#666;font-weight:500}
tr:last-child td{border-bottom:none}
.status-chip{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:500}
.status-chip.pending{background:#fff7ed;color:#9a3412}
.status-chip.paid{background:#f0fdf4;color:#166534}
.status-chip.rejected,.status-chip.cancelled{background:#f5f5f5;color:#666}
.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}
.dot.on{background:#22c55e}
.dot.off{background:#d4d4d4}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.chart-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.chart-wrap{overflow-x:auto}
.chart-wrap svg{display:block;min-width:600px;width:100%;height:150px}
.hourly-card{max-width:980px}
.hourly-row{display:flex;align-items:center;gap:10px;min-width:640px;margin-bottom:6px}
.hourly-daylabel{flex:0 0 64px;width:64px;font-size:12px;color:#555}
.hourly-grid{display:grid;grid-template-columns:repeat(24,minmax(18px,1fr));gap:6px;flex:1}
.hourly-cell{position:relative;height:22px;border-radius:4px;box-shadow:rgba(0,0,0,.06) 0 0 0 1px inset}
.hourly-cell.good{background:#10b981}
.hourly-cell.warn{background:#f59e0b}
.hourly-cell.bad{background:#ef4444}
.hourly-axis{display:flex;align-items:center;gap:10px;min-width:640px;margin-bottom:6px}
.hourly-axis-spacer{flex:0 0 64px;width:64px}
.hourly-axis-grid{display:grid;grid-template-columns:repeat(24,minmax(18px,1fr));gap:6px;flex:1}
.hourly-axis-grid span{font-size:11px;color:#808080;text-align:center}
.hourly-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:16px}
.hourly-legend-item{display:flex;align-items:center;gap:8px;font-size:12px;color:#666}
.hourly-legend-swatch{width:12px;height:12px;border-radius:3px;box-shadow:rgba(0,0,0,.06) 0 0 0 1px inset}
.finance-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:18px}
.mini-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 18px}
.mini-tab{display:inline-flex;align-items:center;justify-content:center;min-width:108px;height:36px;padding:0 14px;border:none;border-radius:10px;background:#f5f5f5;color:#666;font-size:13px;font-weight:500;cursor:pointer;box-shadow:rgba(0,0,0,.06) 0 0 0 1px inset;transition:background .15s ease,color .15s ease}
.mini-tab.active{background:#171717;color:#fff;box-shadow:none}
.mini-tab:hover{color:#171717}
.mini-tab.active:hover{color:#fff}
.finance-panel{display:flex;flex-direction:column;gap:0}
.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px}
.pager-info{font-size:12px;color:#666}
.pager-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pager-actions .btn{width:auto;min-width:0;padding:0 14px}
.info-banner{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;margin:0 0 18px;border-radius:12px;background:#ebf5ff;box-shadow:rgba(0,104,214,.16) 0 0 0 1px}
.info-banner-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:999px;background:#0a72ef;color:#fff;font-size:12px;font-weight:600;flex-shrink:0;margin-top:1px}
.info-banner-text{font-size:13px;line-height:1.65;color:#0f3f7a}
.empty{color:#888;font-size:13px;padding:18px 0;text-align:center}
.row2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.switch{display:flex;align-items:center;gap:8px;font-size:14px}
.switch input{width:auto;height:auto}
.hint{font-size:12px;color:#888;margin-top:6px;line-height:1.5}
.btn-row{display:flex;justify-content:flex-start;gap:10px;flex-wrap:wrap}
.btn-row .btn{width:auto;min-width:124px;padding:0 18px}
.guide-head{margin-bottom:18px}
.guide-head .sub{margin-top:6px}

.guide-steps{list-style:none;margin:4px 0 0;padding:0;position:relative}
.guide-step{position:relative;display:flex;gap:18px;padding:22px 0}
.guide-step:first-child{padding-top:6px}
.guide-step:not(:last-child){border-bottom:1px solid #eee}
.guide-step-num{flex-shrink:0;width:26px;height:26px;border-radius:999px;background:#171717;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;margin-top:1px}
.guide-step-body{flex:1;min-width:0}
.guide-step-body h3{margin:0 0 8px;font-size:15px;font-weight:600;color:#171717}
.guide-step-body>p{margin:0 0 4px;font-size:13.5px;color:#555;line-height:1.65}
.guide-step-body>p:last-child{margin-bottom:0}
.guide-note{font-size:12px;color:#888;line-height:1.6;margin-top:12px!important}
.guide-note code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;background:#f0f0f0;padding:1px 5px;border-radius:4px;color:#444}

.guide-code{position:relative;margin:14px 0}
.guide-code pre{margin:0;padding:14px 16px;padding-right:78px;border-radius:10px;background:#0f1115;color:#e6e6e6;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;line-height:1.7;overflow-x:auto;white-space:pre}
.guide-copy{position:absolute;top:10px;right:10px;height:26px;padding:0 12px;border:none;border-radius:7px;background:rgba(255,255,255,.1);color:#cfd3da;font-size:12px;cursor:pointer;transition:background .15s ease,color .15s ease}
.guide-copy:hover{background:rgba(255,255,255,.18);color:#fff}

.guide-dl-list{display:flex;flex-direction:column;margin:14px 0}
.guide-dl-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px 0}
.guide-dl-row:not(:last-child){border-bottom:1px solid #eee}
.guide-dl-row .chip{flex-shrink:0;display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:6px;background:#171717;color:#fff;font-size:12px;font-weight:600;letter-spacing:.02em;white-space:nowrap}
.guide-dl-text{flex:0 1 auto;min-width:0;display:flex;align-items:center}
.guide-dl-title{font-size:13.5px;color:#333;font-weight:500;display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
.guide-dl-flag{flex-shrink:0;white-space:nowrap;display:inline-flex;align-items:center;height:19px;padding:0 8px;border-radius:999px;background:#e8f1ff;color:#0a72ef;font-size:11px;font-weight:600}
.guide-dl-btn{flex-shrink:0;height:32px;padding:0 14px;border-radius:8px;background:#f5f5f5;color:#171717;box-shadow:rgba(0,0,0,.06) 0 0 0 1px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap;transition:background .15s ease}
.guide-dl-btn:hover{background:#ececec}
.guide-dl-btn svg{width:14px;height:14px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:420px){
  .guide-step{gap:12px}
  .guide-dl-row{justify-content:space-between}
  .guide-dl-text{flex-basis:100%}
  .guide-dl-btn{flex-basis:100%}
}
.notify-panel{padding:0;overflow:hidden}
.notify-panel h2{padding:20px 24px;border-bottom:1px solid #f0f0f0;margin:0}
.notify-body{padding:24px}
.notify-item-title{font-size:14px;font-weight:500;color:#171717;margin-bottom:18px}
.notify-radio-group{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:22px}
.radio-line{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;font-weight:400;color:#171717;cursor:pointer}
.radio-line input{width:16px;height:16px;margin:0}
.required-mark{color:#dc2626}
.input-suffix{display:grid;grid-template-columns:minmax(0,1fr) 54px;align-items:center;border-radius:10px;background:#fff;box-shadow:rgba(0,0,0,.08) 0 0 0 1px,rgba(0,0,0,.02) 0 2px 2px;overflow:hidden}
.input-suffix input{box-shadow:none;border-radius:0}
.input-suffix input:focus{box-shadow:none}
.input-suffix span{display:flex;align-items:center;justify-content:center;height:42px;font-size:13px;color:#666;background:#fafafa;box-shadow:inset 1px 0 0 rgba(0,0,0,.06)}
.input-suffix.disabled{opacity:.55}
.notify-help{margin:10px 0 22px}
.hide{display:none!important}
.boot-loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#fafafa;z-index:1300}
.boot-spinner{width:32px;height:32px;border-radius:50%;border:3px solid rgba(23,23,23,.12);border-top-color:#171717;animation:boot-spin .7s linear infinite}
@keyframes boot-spin{to{transform:rotate(360deg)}}
.modal-backdrop{position:fixed;top:0;left:0;right:0;height:100vh;height:100dvh;background:rgba(23,23,23,.45);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:20px 20px 20vh;z-index:1200;opacity:0;pointer-events:none;transition:opacity .16s ease}
.modal-backdrop.show{opacity:1;pointer-events:auto}
.modal-card{width:min(100%,400px);background:#fff;border-radius:16px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px,rgba(0,0,0,.16) 0 20px 48px -20px;transform:translateY(8px) scale(.98);transition:transform .16s ease,opacity .16s ease;opacity:0}
.modal-backdrop.show .modal-card{transform:translateY(0) scale(1);opacity:1}
.modal-head{padding:22px 22px 6px;display:flex;flex-direction:column;gap:8px}
.modal-title{font-size:18px;font-weight:600;letter-spacing:-.4px;color:#171717}
.modal-message{font-size:13px;line-height:1.6;color:#666}
.modal-body{padding:14px 22px 4px;display:flex;flex-direction:column;gap:10px}
.modal-input{width:100%;height:42px;padding:0 12px;border:none;border-radius:10px;background:#fafafa;box-shadow:rgba(0,0,0,.08) 0 0 0 1px;outline:none;font-size:14px;font-family:inherit;color:#171717}
.modal-input:focus{box-shadow:rgba(10,114,239,.35) 0 0 0 3px,rgba(0,0,0,.08) 0 0 0 1px}
.modal-body .msg{margin-bottom:0}
.modal-foot{padding:18px 22px 22px;display:flex;align-items:center;justify-content:flex-end;gap:10px}
.modal-foot .btn{width:auto;min-width:88px;padding:0 16px}
@media (max-width:820px){
  .shell{display:block}
  .sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(23,23,23,.28);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:39}
  .sidebar{width:auto;height:auto;position:fixed;top:14px;left:14px;z-index:41;background:transparent;border:none;padding:0;overflow:visible}
  .sidebar-brand{display:none}
  .mobile-nav-bar{display:flex;align-items:center;gap:0}
  .mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:none;border-radius:10px;background:#fff;color:#171717;box-shadow:rgba(0,0,0,.08) 0 0 0 1px,rgba(0,0,0,.04) 0 2px 2px;cursor:pointer}
  .mobile-nav-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .mobile-nav-label{display:none}
  .sidebar-menu{display:flex;gap:10px;position:fixed;top:12px;left:12px;width:min(280px,calc(100vw - 24px));max-height:calc(100vh - 24px);padding:18px 12px 14px;background:#fff;border-radius:18px;box-shadow:rgba(0,0,0,.08) 0 0 0 1px,rgba(0,0,0,.12) 0 16px 40px -20px;overflow-y:auto;overscroll-behavior:contain;transform:translateX(calc(-100% - 18px));opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
  .sidebar.mobile-open .sidebar-menu{transform:translateX(0);opacity:1;pointer-events:auto}
  .sidebar.mobile-open .sidebar-brand{display:flex;position:fixed;top:30px;left:30px;z-index:42;padding:0;pointer-events:none}
  .sidebar.mobile-open ~ .sidebar-backdrop{opacity:1;pointer-events:auto}
  .nav{flex-direction:column;gap:4px;overflow:visible}
  .nav-group{display:block;padding:12px 10px 6px}
  .nav-group:first-child{padding-top:48px}
  .nav button,.sidebar-foot button{width:100%;height:38px;padding:0 12px;background:transparent}
  .nav button svg,.sidebar-foot button svg{display:flex}
  .sidebar-foot{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px;margin-top:0;padding-top:12px}
  .sidebar-user{padding:0 10px 0}
  .content{padding:70px 14px 24px;max-width:none}
}
@media (max-width:600px){
  .auth-wrap{padding:4vh 14px 20px}
  .captcha-row{grid-template-columns:1fr}
  .captcha-box{max-width:220px}
}
