:root{
      --bg:#050506;
      --panel:#101014;
      --panel2:#17171d;
      --panel3:#202027;
      --text:#f5f5f7;
      --muted:#a9a9b2;
      --line:#2d2d38;
      --red:#e50914;
      --red2:#700007;
      --green:#14c965;
      --yellow:#f2ba3d;
      --orange:#ff8d1a;
      --cyan:#0bd7ff;
      --purple:#d500ff;
      --shadow:0 18px 48px rgba(0,0,0,.48);
      --radius:18px;
    }

    *{box-sizing:border-box}
    body{
      margin:0;
      min-height:100vh;
      color:var(--text);
      font-family:Arial, Helvetica, sans-serif;
      background:
        radial-gradient(circle at 0% 0%, rgba(229,9,20,.28), transparent 34%),
        radial-gradient(circle at 100% 12%, rgba(213,0,255,.15), transparent 30%),
        radial-gradient(circle at 70% 100%, rgba(11,215,255,.10), transparent 33%),
        var(--bg);
    }

    button,.btn{
      border:0;
      color:white;
      background:#25252d;
      border-radius:12px;
      padding:10px 12px;
      min-height:39px;
      cursor:pointer;
      font-family:inherit;
      font-weight:900;
      font-size:13px;
      line-height:1;
      letter-spacing:0;
      text-decoration:none;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      transition:.16s ease;
      white-space:nowrap;
    }
    button:hover,.btn:hover{filter:brightness(1.12);transform:translateY(-1px)}
    button:disabled{opacity:.5;cursor:not-allowed;transform:none}
    .primary{background:linear-gradient(135deg,var(--red),var(--red2))}
    .success{background:linear-gradient(135deg,#16c764,#087b37)}
    .warning{background:linear-gradient(135deg,#ff9e19,#a65300)}
    .danger{background:linear-gradient(135deg,#d01321,#640006)}
    .blue{background:linear-gradient(135deg,#269dff,#0753a7)}
    .ghost{background:#22222a}
    .purple{background:linear-gradient(135deg,#d500ff,#73008b)}
    .darkred{background:linear-gradient(135deg,#7a0008,#2d0003)}

    .loginWrap{
      min-height:100vh;
      display:grid;
      place-items:center;
      padding:18px;
    }
    .loginBox{
      width:min(460px,100%);
      background:rgba(16,16,20,.95);
      border:1px solid rgba(229,9,20,.25);
      border-radius:24px;
      box-shadow:var(--shadow);
      overflow:hidden;
    }
    .loginHead{
      padding:24px;
      background:linear-gradient(135deg,rgba(229,9,20,.18),rgba(16,16,20,.95));
      border-bottom:1px solid var(--line);
    }
    .loginHead h1{margin:0;font-size:30px;line-height:1}
    .loginHead p{margin:8px 0 0;color:var(--muted);line-height:1.45}
    .loginForm{padding:20px;display:grid;gap:12px}
    .loginAccess{
      color:#ffd98a;
      background:rgba(242,186,60,.08);
      border:1px solid rgba(242,186,60,.25);
      border-radius:14px;
      padding:12px;
      font-size:13px;
      line-height:1.45;
    }

    .app{display:none}
    .wrap{max-width:1580px;margin:auto;padding:18px}

    header{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:14px;
      flex-wrap:wrap;
      padding:20px;
      border-radius:var(--radius);
      border:1px solid rgba(229,9,20,.28);
      background:linear-gradient(135deg, rgba(229,9,20,.17), rgba(16,16,20,.95));
      box-shadow:var(--shadow);
      margin-bottom:14px;
    }
    .brand{display:flex;align-items:center;gap:14px}
    .logo{
      width:56px;height:56px;
      display:grid;place-items:center;
      border-radius:16px;
      background:linear-gradient(135deg,var(--red),#300004);
      font-weight:900;
      box-shadow:0 0 35px rgba(229,9,20,.42);
      letter-spacing:-1px;
    }
    h1{margin:0;font-size:clamp(24px,3vw,40px);line-height:1}
    .sub{margin:7px 0 0;color:var(--muted);font-size:14px}
    .topBtns{display:flex;gap:9px;flex-wrap:wrap;align-items:center}
    .sessionPill{
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.06);
      border-radius:999px;
      padding:9px 12px;
      font-weight:900;
      color:#fff;
      font-size:13px;
    }

    .mainTabs{
      display:flex;
      gap:10px;
      flex-wrap:wrap;
      margin-bottom:14px;
    }
    .mainTab{
      flex:0 0 auto;
      padding:12px 16px;
      border-radius:14px;
      background:#16161c;
      color:var(--muted);
      border:1px solid var(--line);
      font-weight:900;
      cursor:pointer;
    }
    .mainTab.active{
      background:linear-gradient(135deg,rgba(229,9,20,.28),rgba(213,0,255,.16));
      border-color:rgba(229,9,20,.45);
      color:white;
    }

    .stats{
      display:grid;
      grid-template-columns:repeat(5,1fr);
      gap:12px;
      margin-bottom:14px;
    }
    @media(max-width:980px){.stats{grid-template-columns:repeat(3,1fr)}}
    @media(max-width:620px){.stats{grid-template-columns:repeat(2,1fr)}}

    .stat{
      background:rgba(16,16,20,.94);
      border:1px solid var(--line);
      border-radius:16px;
      padding:15px;
      box-shadow:0 10px 28px rgba(0,0,0,.25);
    }
    .num{font-size:27px;font-weight:900}
    .lab{font-size:13px;color:var(--muted);margin-top:3px}

    .grid{
      display:grid;
      grid-template-columns:390px 1fr;
      gap:14px;
      align-items:start;
    }
    @media(max-width:1050px){.grid{grid-template-columns:1fr}}

    .card{
      background:rgba(16,16,20,.95);
      border:1px solid var(--line);
      border-radius:var(--radius);
      overflow:hidden;
      box-shadow:var(--shadow);
    }
    .card h2{
      margin:0;
      padding:16px 18px;
      border-bottom:1px solid var(--line);
      background:linear-gradient(90deg,rgba(229,9,20,.13),transparent);
      font-size:17px;
    }

    form{padding:16px;display:grid;gap:12px}
    label{
      display:grid;
      gap:7px;
      color:var(--muted);
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:.06em;
      font-weight:900;
    }
    input,select,textarea{
      width:100%;
      color:var(--text);
      background:#09090c;
      border:1px solid #333340;
      border-radius:12px;
      padding:11px 12px;
      outline:none;
      font-size:14px;
    }
    textarea{resize:vertical;min-height:70px}
    input:focus,select:focus,textarea:focus{
      border-color:rgba(229,9,20,.7);
      box-shadow:0 0 0 3px rgba(229,9,20,.13);
    }
    .row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
    @media(max-width:520px){.row{grid-template-columns:1fr}}

    .hint{
      padding:12px;
      border-radius:14px;
      background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.08);
      color:var(--muted);
      font-size:12px;
      line-height:1.45;
    }
    .notice{
      padding:12px;
      border-radius:14px;
      background:rgba(243,186,61,.08);
      border:1px solid rgba(243,186,61,.25);
      color:#ffd988;
      font-size:13px;
      line-height:1.45;
    }

    .toolbar{
      display:flex;
      align-items:center;
      gap:9px;
      flex-wrap:wrap;
      padding:15px;
      background:rgba(23,23,29,.85);
      border-bottom:1px solid var(--line);
    }
    .toolbar input{max-width:320px;flex:1 1 220px}
    .chips{display:flex;gap:8px;flex-wrap:wrap}
    .chip{
      background:#15151a;
      border:1px solid #363642;
      color:var(--muted);
      padding:9px 11px;
      border-radius:999px;
      font-size:13px;
      font-weight:900;
      cursor:pointer;
      user-select:none;
    }
    .chip.active{
      color:white;
      background:rgba(229,9,20,.18);
      border-color:rgba(229,9,20,.55);
    }

    .platformTabs{
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      padding:0 15px 15px;
      background:rgba(23,23,29,.85);
      border-bottom:1px solid var(--line);
    }

    .accountList,.completeList,.adminList{
      display:grid;
      gap:12px;
      padding:14px;
    }

    .account,.completeItem,.userItem{
      border:1px solid var(--line);
      border-radius:18px;
      overflow:hidden;
      background:rgba(13,13,17,.92);
    }
    .accountHead,.completeHead,.userHead{
      display:flex;
      justify-content:space-between;
      align-items:flex-start;
      gap:12px;
      flex-wrap:wrap;
      padding:14px;
      background:linear-gradient(90deg,rgba(255,255,255,.05),transparent);
      border-bottom:1px solid var(--line);
    }
    .accountTitle,.completeTitle,.userTitle{
      display:flex;
      gap:12px;
      align-items:flex-start;
      min-width:260px;
    }
    .platformBadge{
      width:46px;height:46px;
      border-radius:14px;
      display:grid;place-items:center;
      background:linear-gradient(135deg,#282832,#15151a);
      border:1px solid #3a3a45;
      font-weight:900;
      color:white;
      flex:none;
    }
    .accountTitle strong,.completeTitle strong,.userTitle strong{font-size:16px}
    .accountTitle small,.completeTitle small,.userTitle small{display:block;color:var(--muted);margin-top:4px}
    .accountActions,.userActions{
      display:flex;
      gap:7px;
      flex-wrap:wrap;
      justify-content:flex-end;
    }
    .completeActions{
      display:grid;
      grid-template-columns:repeat(4,minmax(88px,1fr));
      gap:6px;
      justify-content:flex-end;
      width:min(420px,100%);
    }

    .progressWrap{
      min-width:210px;
      display:grid;
      gap:7px;
    }
    .progressTop{
      display:flex;
      justify-content:space-between;
      gap:8px;
      color:var(--muted);
      font-size:12px;
      font-weight:900;
    }
    .bar{
      height:10px;
      border-radius:999px;
      overflow:hidden;
      background:#2a2a32;
      border:1px solid #383844;
    }
    .bar span{
      display:block;
      height:100%;
      background:linear-gradient(90deg,var(--red),var(--purple));
      width:0%;
    }

    .slots{overflow:auto}
    table{
      width:100%;
      border-collapse:collapse;
      min-width:1040px;
    }
    th,td{
      border-bottom:1px solid var(--line);
      padding:8px 7px;
      text-align:left;
      vertical-align:top;
      font-size:12px;
    }
    th{
      background:#101014;
      color:#dfdfe6;
      text-transform:uppercase;
      letter-spacing:.06em;
      font-size:11px;
      position:sticky;
      top:0;
      z-index:2;
    }
    tr:last-child td{border-bottom:0}
    td small{display:block;color:var(--muted);margin-top:4px}
    .mono{font-family:Consolas,monospace}

    .badge{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:7px 9px;
      border-radius:999px;
      font-weight:900;
      font-size:12px;
      white-space:nowrap;
      border:1px solid transparent;
    }
    .free{background:rgba(11,215,255,.12);color:#8eedff;border-color:rgba(11,215,255,.28)}
    .ok{background:rgba(18,201,97,.13);color:#70ffb0;border-color:rgba(18,201,97,.32)}
    .soon{background:rgba(243,186,61,.14);color:#ffd577;border-color:rgba(243,186,61,.32)}
    .today{background:rgba(255,141,26,.14);color:#ffbf7d;border-color:rgba(255,141,26,.35)}
    .expired{background:rgba(229,9,20,.14);color:#ff7d85;border-color:rgba(229,9,20,.4)}
    .paused{background:rgba(160,160,170,.12);color:#d4d4da;border-color:rgba(160,160,170,.25)}

    .slotActions{
      display:grid;
      grid-template-columns:repeat(4,minmax(84px,1fr));
      gap:5px;
      min-width:420px;
      width:420px;
      align-items:stretch;
    }
    .slotActions button,.slotActions .btn,.completeActions button,.completeActions .btn,.userActions button{
      padding:6px 7px;
      min-height:28px;
      font-family:inherit;
      font-size:10.5px;
      font-weight:900;
      line-height:1.05;
      border-radius:10px;
      text-align:center;
      justify-content:center;
      white-space:normal;
      word-break:break-word;
    }
    td:last-child .slotActions{margin-left:auto}

    .empty{
      padding:36px 18px;
      text-align:center;
      color:var(--muted);
    }

    .modal{
      display:none;
      position:fixed;
      inset:0;
      z-index:50;
      background:rgba(0,0,0,.72);
      padding:16px;
      align-items:center;
      justify-content:center;
    }
    .modal.open{display:flex}
    .modalbox{
      width:min(860px,100%);
      max-height:92vh;
      overflow:auto;
      background:#111114;
      border:1px solid var(--line);
      border-radius:22px;
      box-shadow:var(--shadow);
    }
    .modalHead{
      display:flex;
      justify-content:space-between;
      gap:12px;
      align-items:center;
      padding:16px 18px;
      border-bottom:1px solid var(--line);
    }
    .modalHead h3{margin:0}
    .modalBody{
      padding:16px;
      display:grid;
      gap:12px;
    }
    .msgbox{
      display:grid;
      gap:10px;
      border:1px solid #333340;
      border-radius:16px;
      background:#17171d;
      padding:13px;
    }
    .msgbox p{
      margin:0;
      white-space:pre-wrap;
      line-height:1.48;
      color:#e1e1e7;
    }
    .modalForm{
      padding:0;
      display:grid;
      gap:12px;
    }
    .passline{display:flex;gap:7px}
    .passline input{flex:1}

    .brandLogoImg{
      width:56px;height:56px;object-fit:contain;border-radius:14px;
      border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);
      padding:6px;box-shadow:0 8px 20px rgba(0,0,0,.18);
    }
    .appWatermark{
      position:fixed;
      right:26px;
      bottom:26px;
      width:360px;
      max-width:36vw;
      height:auto;
      opacity:.14;
      pointer-events:none;
      z-index:1;
      filter:drop-shadow(0 18px 35px rgba(0,0,0,.35));
    }
    .appWatermark.center{
      right:50%;
      bottom:50%;
      transform:translate(50%,50%);
      width:560px;
      max-width:48vw;
      opacity:.09;
    }
    header,.mainTabs,.stats,.grid,.card{
      position:relative;
      z-index:2;
    }
    .logoPreview{
      width:120px;height:120px;object-fit:contain;border-radius:18px;
      border:1px dashed rgba(255,255,255,.18);background:rgba(255,255,255,.04);
      padding:10px;
    }

    .loginLogoPreview{
      width:96px;height:96px;object-fit:contain;border-radius:22px;
      border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.05);
      padding:8px;margin-bottom:12px;display:block;
    }
    .loginLogoPreview.hidden{display:none}
    .themePreview{
      display:grid;grid-template-columns:repeat(4,1fr);gap:8px;
      padding:10px;border:1px solid rgba(255,255,255,.09);
      border-radius:14px;background:rgba(255,255,255,.04);
    }
    .colorDot{
      height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.14);
    }

    .proPanel{
      display:grid;
      gap:14px;
      margin-bottom:14px;
    }
    .miniGrid{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:12px;
    }
    @media(max-width:900px){.miniGrid{grid-template-columns:repeat(2,1fr)}}
    @media(max-width:520px){.miniGrid{grid-template-columns:1fr}}
    .quickBox{
      background:rgba(16,16,20,.95);
      border:1px solid var(--line);
      border-radius:16px;
      padding:14px;
      box-shadow:0 10px 28px rgba(0,0,0,.22);
      display:grid;
      gap:8px;
    }
    .quickBox strong{font-size:16px}
    .quickBox small{color:var(--muted);line-height:1.4}
    .globalResults{
      display:grid;
      gap:10px;
      max-height:420px;
      overflow:auto;
      padding:14px;
    }
    .resultItem,.historyItem,.dueItem,.reportItem{
      background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.09);
      border-radius:14px;
      padding:12px;
      display:grid;
      gap:6px;
    }
    .resultItem small,.historyItem small,.dueItem small,.reportItem small{color:var(--muted)}
    .historyList{
      display:grid;
      gap:10px;
      max-height:520px;
      overflow:auto;
      padding:14px;
    }
    .checkRow{
      display:flex;
      align-items:flex-start;
      gap:8px;
    }
    .checkRow input{width:auto;margin-top:4px}
    .rolePill{
      display:inline-flex;
      padding:5px 8px;
      border-radius:999px;
      background:rgba(255,255,255,.08);
      border:1px solid rgba(255,255,255,.12);
      color:#fff;
      font-size:11px;
      font-weight:900;
    }
    .hidden{display:none !important}
