.header-actions,.toolbar{display:flex;gap:10px}
[hidden]{display:none!important}
.header-actions{flex-wrap:wrap;justify-content:flex-end}
.toolbar{margin-top:20px;align-items:center}
.toolbar input{max-width:520px}
.admin-link{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border:1px solid var(--line);border-radius:10px;color:#d9e7f5;background:#11233a;text-decoration:none;font-weight:700}
.badge.renewal{margin-top:7px;color:#d5cdff;background:#302958}
.badge.trial{margin:7px 0 0 6px;color:#8ce4bd;background:#123c34}
.badge.warning-badge{margin-left:6px;color:#ffd58e;background:#45351f}
.expiring-row{background:rgba(255,185,76,.045)}
.archive-toggle{display:flex;align-items:center;gap:8px;color:var(--muted);white-space:nowrap}.archive-toggle input{width:17px;height:17px;margin:0;padding:0}
.contact-link{color:#8bcdf7;text-decoration:none}.contact-link:hover{text-decoration:underline}
.actions{flex-wrap:wrap}.actions .muted-action{background:#17253a;color:#a9b9ca}.actions .warning{background:#3b3020;color:#ffd08a;border-color:#6d5227}
.actions .delete-action{background:#421d2a;color:#ff9caf;border-color:#753044}
.access-meta{display:flex;min-width:155px;flex:1 0 100%;flex-direction:column;gap:4px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:#0a192b;color:#dce9f7}
.access-meta b{font-size:12px}.access-meta small{color:var(--muted);font-size:10px}
.dialog-form{display:grid;gap:14px}
.credential-row{display:grid;gap:6px;margin-top:12px}.credential-row>span{color:var(--muted);font-size:12px}.credential-row code{margin:0}
.login-hints{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:13px}.login-hints span{padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:#0a192b;color:var(--muted);font-size:12px}
.owner-notice{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px;padding:13px 15px;border:1px solid rgba(139,115,255,.35);border-radius:14px;background:rgba(39,35,81,.42);color:var(--muted);line-height:1.45}
.owner-notice span{display:inline-flex;align-items:center;gap:5px}
.launch-guide{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.launch-guide article{padding:15px;border:1px solid var(--line);border-radius:15px;background:rgba(8,20,34,.78)}
.launch-guide small{display:block;color:#72c8ff;font-size:10px;font-weight:850;letter-spacing:.13em}
.launch-guide strong{display:block;margin-top:5px;font-size:16px}.launch-guide p{min-height:58px;margin:7px 0 12px;color:var(--muted);font-size:12px;line-height:1.5}
.guide-card-button{width:100%;min-height:42px;display:flex;align-items:center;justify-content:center;padding:9px 12px;border:1px solid rgba(139,115,255,.32);border-radius:10px;background:#17233e;color:#e7e3ff;text-decoration:none;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.dialog-form label{display:grid;gap:7px;color:var(--muted)}
.duration-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0;padding:0;border:0}.duration-picker legend{grid-column:1/-1;margin-bottom:8px;color:var(--muted)}.duration-picker label{cursor:pointer}.duration-picker input{position:absolute;opacity:0;pointer-events:none}.duration-picker span{display:flex;min-height:62px;flex-direction:column;justify-content:center;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:11px;background:#0b1b2e;color:#dce9f7}.duration-picker small{color:var(--muted)}.duration-picker input:checked+span{border-color:#8b73ff;background:#272351;box-shadow:0 0 0 1px #8b73ff}.duration-picker input:checked+span b{color:#fff}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.system-line{display:flex;flex-wrap:wrap;gap:14px;align-items:center;padding:14px;color:var(--muted);border-bottom:1px solid var(--line)}
.status-admin-head{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;padding:18px;border-bottom:1px solid var(--line)}
.status-admin-head p{margin:6px 0 0;color:var(--muted);line-height:1.55}
.status-license-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:16px 18px;border-bottom:1px solid var(--line)}
.status-license-bar label{min-width:320px;color:var(--muted);font-size:12px}.status-license-bar select{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#091727;color:var(--text)}
.status-ready-card{margin:14px;padding:14px;border:1px solid rgba(139,115,255,.28);border-radius:15px;background:linear-gradient(145deg,rgba(39,35,81,.44),rgba(8,20,34,.78))}
.status-ready-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:11px}.status-ready-head small{display:block;color:#72c8ff;font-size:10px;font-weight:850;letter-spacing:.13em}.status-ready-head strong{display:block;margin-top:4px;font-size:17px}
.status-ready-list{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:8px}.status-ready-step{display:grid;grid-template-columns:26px minmax(0,1fr);gap:8px;align-items:start;padding:10px;border:1px solid var(--line);border-radius:12px;background:#071322}.status-ready-step.done{border-color:rgba(50,210,139,.28);background:rgba(50,210,139,.055)}.status-ready-step>span{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:rgba(139,115,255,.14);color:#c9c2ff;font-size:11px;font-weight:900}.status-ready-step.done>span{background:#32d28b;color:#06140e}.status-ready-step strong,.status-ready-step small{display:block}.status-ready-step strong{font-size:12px}.status-ready-step small{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.35}.ready-action{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:34px;margin-top:3px;padding:7px 10px;border:1px solid rgba(139,115,255,.28);border-radius:9px;background:#17233e;color:#e7e3ff;text-decoration:none;font:inherit;font-size:11px;font-weight:850;cursor:pointer}
.status-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px}
.status-box{padding:16px;border:1px solid var(--line);border-radius:14px;background:rgba(8,20,34,.7)}
.status-box h3{margin:0 0 12px}.status-box h3 small{color:var(--muted);font-size:12px}
.status-box label{display:block;margin:0 0 12px;color:var(--muted);font-size:12px}.status-box input,.status-box select,.status-box textarea{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#071322;color:var(--text)}
.status-targets{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.status-targets label{margin:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:#071322}
.status-targets input{display:inline;width:auto;margin:0 7px 0 0}.status-item{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,auto);gap:8px;align-items:center;padding:11px 0;border-bottom:1px solid var(--line)}
.status-item:last-child{border-bottom:0}.status-item b,.status-item small{display:block}.status-item small{margin-top:4px;color:var(--muted);font-size:11px}.empty-mini{color:var(--muted)}
.status-catalog-hub{margin:0 14px 14px;border-color:rgba(50,210,139,.24);background:linear-gradient(145deg,rgba(10,35,39,.82),rgba(8,20,34,.86))}.status-catalog-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}.status-catalog-head small{display:block;color:#72c8ff;font-size:10px;font-weight:850;letter-spacing:.13em}.status-catalog-head h3{margin:4px 0 6px;font-size:22px}.status-catalog-head p{margin:0;color:var(--muted);line-height:1.5}.status-catalog-actions{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}.status-catalog-actions button{min-height:38px;padding:8px 12px}.status-material-list{display:grid;gap:8px}.status-material-card{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:13px;background:#071322}.status-material-card.muted{opacity:.72}.status-material-number{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:rgba(139,115,255,.14);color:#d6d0ff;font-weight:900}.status-material-copy{min-width:0}.status-material-copy b,.status-material-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-material-copy small{margin-top:4px;color:var(--muted);font-size:11px}.status-material-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.status-material-actions button{min-height:32px;padding:7px 9px;font-size:11px}
.weekly-box{margin:0 14px 14px}.weekly-head{display:flex;gap:15px;align-items:flex-start;justify-content:space-between}.weekly-head p{margin:6px 0 0;color:var(--muted);line-height:1.5}
.weekly-days{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:9px;margin-top:14px}.weekly-day{margin:0!important;padding:10px;border:1px solid var(--line);border-radius:12px;background:#071322}.weekly-day.active{border-color:#8b73ff;background:#121b3d;box-shadow:0 0 0 1px rgba(139,115,255,.25)}
.weekly-day span{display:flex;align-items:center;gap:7px;color:#dce9f7;font-weight:800}.weekly-day span input{width:17px;height:17px;margin:0;accent-color:#7d68f3}
.weekly-day input{margin-top:8px!important}.weekly-day small{display:block;margin-top:7px;color:var(--muted);font-size:11px;line-height:1.35}.week-pick-day{width:100%;margin-top:8px;padding:9px 10px;border:1px solid rgba(139,115,255,.35);border-radius:10px;background:#12223a;color:#e7e3ff;font-size:12px;font-weight:850;cursor:pointer}.week-pick-day.active{background:#5b48d7;color:#fff}.weekly-picker{grid-column:1/-1;margin-top:14px;padding:13px;border:1px solid rgba(139,115,255,.28);border-radius:14px;background:rgba(18,27,61,.48)}.weekly-picker-head{display:grid;grid-template-columns:minmax(0,1fr) auto;justify-content:space-between;gap:12px;align-items:center;margin-bottom:11px}.weekly-picker-head small{display:block;color:#72c8ff;font-size:10px;font-weight:850;letter-spacing:.13em}.weekly-picker-head strong{display:block;margin-top:4px}.weekly-count-badge{min-width:58px;padding:7px 10px!important;text-align:center;white-space:nowrap;font-weight:900}.weekly-material-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:280px;overflow:auto;padding-right:3px}.weekly-material-choice{display:flex!important;align-items:flex-start;gap:10px;margin:0!important;padding:10px;border:1px solid var(--line);border-radius:11px;background:#071322;color:#dce9f7;cursor:pointer}.weekly-material-choice.selected{border-color:#32d28b;background:#0c2a2b}.weekly-material-choice input{width:18px!important;margin:2px 0 0!important;accent-color:#32d28b}.weekly-material-choice b,.weekly-material-choice small{display:block}.weekly-material-choice small{margin-top:4px;color:var(--muted);font-size:11px}.weekly-settings{display:grid;grid-template-columns:220px 190px minmax(260px,1fr);gap:12px;align-items:end;margin-top:14px}.weekly-settings label{margin:0!important}
.statuses-standalone #stats,.statuses-standalone #owner-notice,.statuses-standalone #launch-guide,.statuses-standalone .toolbar,.statuses-standalone .tabs,.statuses-standalone #orders,.statuses-standalone #licenses,.statuses-standalone #devices,.statuses-standalone #events{display:none!important}.statuses-standalone .shell{max-width:1320px}.statuses-standalone header{margin-bottom:14px}.statuses-standalone #statuses{display:block!important}
.stats{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
@media(max-width:600px){.header-actions{grid-column:1/-1}.header-actions button,.header-actions .admin-link{flex:1}.toolbar{align-items:stretch;flex-direction:column}.form-row,.duration-picker{grid-template-columns:1fr}}
@media(max-width:600px){
  .shell{padding-top:14px}.login{margin:6vh auto;padding:24px 18px}.login h2{font-size:24px}
  header{gap:12px;margin-bottom:18px}.header-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .header-actions button,.header-actions .admin-link{min-height:44px;padding:9px;font-size:12px}
  .stats{grid-template-columns:1fr 1fr}.stat{padding:15px}.stat strong{font-size:24px}.stat span{font-size:12px}
  .owner-notice{display:grid;font-size:13px}
  .launch-guide{grid-template-columns:1fr}
  .launch-guide p{min-height:0}
  .tabs{overflow-x:auto;padding-bottom:5px}.tabs button{flex:0 0 auto;padding:10px 12px}
  .panel{padding:4px;border-radius:14px}table{min-width:760px}th,td{padding:12px 9px}
  .status-admin-head,.status-license-bar{display:grid}.status-admin-grid{grid-template-columns:1fr}.status-license-bar label{min-width:0}.status-targets{grid-template-columns:1fr}.status-ready-card{margin:10px 0}.status-ready-list{grid-template-columns:1fr}
  .weekly-box{margin:0 0 14px}.weekly-head{display:grid}.weekly-days,.weekly-settings,.weekly-material-grid{grid-template-columns:1fr}.weekly-picker-head{align-items:flex-start}
  body.statuses-standalone{background:linear-gradient(180deg,#06111f,#071827 42%,#06111f)}
  .statuses-standalone .shell{width:100%;padding:0 10px 28px}
  .statuses-standalone header{position:sticky;top:0;z-index:20;grid-template-columns:1fr auto;gap:10px;margin:0 -10px 10px;padding:10px 12px;border-bottom:1px solid rgba(148,176,214,.14);background:rgba(6,16,28,.92);backdrop-filter:blur(14px)}
  .statuses-standalone header>div:not(.header-actions){display:none}
  .statuses-standalone .brand{font-size:15px}.statuses-standalone .brand span{width:34px;height:34px;border-radius:10px}
  .statuses-standalone .header-actions{display:flex!important;width:auto;grid-column:auto}.statuses-standalone #create-license,.statuses-standalone #export-clients,.statuses-standalone #download-app,.statuses-standalone #refresh{display:none!important}.statuses-standalone #logout{min-height:36px;padding:7px 11px;font-size:11px;border-radius:999px}
  .statuses-standalone #statuses{border:0!important;background:transparent!important;padding:0!important;overflow:visible}.statuses-standalone .card{box-shadow:none}
  .statuses-standalone .status-admin-head{padding:12px;border:1px solid rgba(139,115,255,.18);border-radius:18px;background:linear-gradient(145deg,rgba(33,31,76,.68),rgba(8,20,34,.86));box-shadow:0 18px 42px rgba(0,0,0,.16)}.statuses-standalone .status-admin-head h2{font-size:22px}.statuses-standalone .status-admin-head p{font-size:12px;line-height:1.45}.statuses-standalone .status-admin-head .admin-link{min-height:38px;padding:8px 11px}
  .statuses-standalone .status-license-bar{margin-top:10px;padding:12px;border:1px solid rgba(148,176,214,.14);border-radius:16px;background:rgba(8,20,34,.78)}
  .statuses-standalone .status-ready-card{padding:12px;border-radius:18px;background:linear-gradient(145deg,rgba(37,32,82,.62),rgba(7,19,34,.9))}.statuses-standalone .status-ready-head strong{font-size:16px}.statuses-standalone .status-ready-list{gap:7px}.statuses-standalone .status-ready-step{grid-template-columns:24px minmax(0,1fr) auto;padding:9px;border-radius:12px}.statuses-standalone .status-ready-step small{display:none}.statuses-standalone .status-ready-step .ready-action{grid-column:auto;min-height:30px;margin:0;padding:6px 9px;font-size:10px;border-radius:999px}
  .statuses-standalone .status-admin-grid{gap:10px;padding:10px 0}.statuses-standalone .status-box{padding:13px;border-radius:18px;background:rgba(8,20,34,.82)}.statuses-standalone .status-box h3{font-size:18px}.statuses-standalone .status-box label{font-size:12px}.statuses-standalone .status-box input,.statuses-standalone .status-box select,.statuses-standalone .status-box textarea{min-height:46px;padding:10px 12px;border-radius:13px;font-size:15px}
  .statuses-standalone .status-catalog-hub{margin:10px 0 12px;padding:14px;border-radius:20px;background:linear-gradient(145deg,rgba(8,44,47,.92),rgba(8,20,34,.94));box-shadow:0 18px 44px rgba(0,0,0,.18)}.statuses-standalone .status-catalog-head h3{font-size:24px}.statuses-standalone .status-catalog-head p{font-size:13px;line-height:1.45}.statuses-standalone .status-catalog-actions{display:grid;grid-template-columns:1fr;gap:8px}.statuses-standalone .status-catalog-actions button{min-height:46px;border-radius:14px}.statuses-standalone .status-material-card{grid-template-columns:34px minmax(0,1fr);padding:12px;border-radius:16px}.statuses-standalone .status-material-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1fr;width:100%;gap:7px}.statuses-standalone .status-material-actions button{min-height:38px;border-radius:12px;font-size:11px}.statuses-standalone .status-material-copy b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.statuses-standalone .status-material-copy small{white-space:nowrap}
  .statuses-standalone .status-targets label{display:flex;align-items:center;gap:9px;padding:12px;border-radius:14px}.statuses-standalone .status-targets input{width:18px;height:18px;accent-color:#8b73ff}
  .statuses-standalone .weekly-head{gap:10px}.statuses-standalone .weekly-head p{font-size:13px;line-height:1.45}.statuses-standalone .weekly-days{gap:10px}.statuses-standalone .weekly-day{padding:12px;border-radius:18px;background:rgba(8,20,34,.86)}.statuses-standalone .weekly-day.active{background:linear-gradient(145deg,rgba(45,40,102,.86),rgba(8,20,34,.92))}.statuses-standalone .weekly-day span{font-size:18px}.statuses-standalone .weekly-day span input{width:22px;height:22px}.statuses-standalone .week-pick-day{min-height:48px;border-radius:14px;background:linear-gradient(135deg,#8b72ff,#6049dc);font-size:14px}.statuses-standalone .weekly-day small{font-size:12px}
  .statuses-standalone .weekly-picker{grid-column:1/-1;margin-top:-2px;padding:12px;border-radius:18px;background:linear-gradient(145deg,rgba(10,33,39,.9),rgba(9,21,37,.94));border-color:rgba(50,210,139,.32)}.statuses-standalone .weekly-picker-head{grid-template-columns:minmax(0,1fr) auto;align-items:start}.statuses-standalone .weekly-picker-head strong{font-size:15px;line-height:1.28}.statuses-standalone .weekly-count-badge{min-width:56px;padding:8px 10px!important}.statuses-standalone .weekly-material-grid{max-height:420px;gap:8px}.statuses-standalone .weekly-material-choice{min-height:58px;border-radius:14px}.statuses-standalone .weekly-material-choice input{width:22px!important;height:22px!important}.statuses-standalone .weekly-settings{gap:9px}.statuses-standalone .status-item{grid-template-columns:minmax(0,1fr);align-items:start}.statuses-standalone .status-item button{width:100%;margin-top:5px}
}

@media(max-width:620px){
  html,body{max-width:100%;overflow-x:hidden}
  .shell{
    width:100%;
    max-width:100%;
    min-width:0;
    padding-left:14px;
    padding-right:14px;
    overflow-x:hidden;
  }
  .login,
  .login *,
  .login form,
  .login input,
  .login button,
  .login .login-hints{
    max-width:100%;
    min-width:0;
  }
  .login{
    width:100%;
    margin:6vh auto;
    overflow:hidden;
  }
  .login form{
    width:100%;
    display:grid;
    gap:10px;
  }
  .login input,
  .login button{
    width:100%;
  }
  .login p,
  .login h2,
  .login .error,
  .login .login-hints span{
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
}

/* Phone anti-drift guard for the full admin login and owner mobile workspace. */
@media(max-width:760px){
  html,
  body{
    width:100%;
    max-width:100vw;
    min-width:0;
    overflow-x:hidden!important;
  }
  body:not(.statuses-standalone) .shell{
    width:100%!important;
    max-width:100vw!important;
    min-width:0!important;
    margin:0!important;
    padding:14px!important;
    overflow-x:hidden!important;
  }
  body:not(.statuses-standalone) header{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    margin-bottom:16px!important;
    overflow:hidden!important;
  }
  body:not(.statuses-standalone) .brand,
  body:not(.statuses-standalone) header>div,
  body:not(.statuses-standalone) .header-actions,
  body:not(.statuses-standalone) .login,
  body:not(.statuses-standalone) .login form,
  body:not(.statuses-standalone) .login-hints{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  body:not(.statuses-standalone) .login *{
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  body:not(.statuses-standalone) .brand{
    width:auto!important;
  }
  body:not(.statuses-standalone) .login .lock{
    width:58px!important;
    height:58px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body:not(.statuses-standalone) .login{
    margin:5vh 0 0!important;
    padding:22px 14px!important;
    border-radius:18px!important;
  }
  body:not(.statuses-standalone) .login form{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body:not(.statuses-standalone) .login input,
  body:not(.statuses-standalone) .login button{
    width:100%!important;
    max-width:100%!important;
  }
  body:not(.statuses-standalone) .login p,
  body:not(.statuses-standalone) .login h2,
  body:not(.statuses-standalone) .login .error,
  body:not(.statuses-standalone) .login-hints span{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word;
  }
}

@media(max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  body.statuses-standalone{width:100%;min-width:0;overflow-x:hidden}
  .statuses-standalone *,
  .statuses-standalone *::before,
  .statuses-standalone *::after{box-sizing:border-box;min-width:0}
  .statuses-standalone .shell{width:100%;max-width:100vw;margin:0;padding:0 12px 30px;overflow:hidden}
  .statuses-standalone header{width:calc(100% + 24px);max-width:none;margin:0 -12px 12px;padding:10px 12px}
  .statuses-standalone #dashboard,
  .statuses-standalone #statuses,
  .statuses-standalone .status-admin-head,
  .statuses-standalone .status-license-bar,
  .statuses-standalone .status-ready-card,
  .statuses-standalone .status-catalog-hub,
  .statuses-standalone .status-admin-grid,
  .statuses-standalone .status-box,
  .statuses-standalone .weekly-box,
  .statuses-standalone .weekly-days,
  .statuses-standalone .weekly-day,
  .statuses-standalone .weekly-picker,
  .statuses-standalone .weekly-material-grid,
  .statuses-standalone .status-material-list,
  .statuses-standalone .status-material-card{width:100%;max-width:100%;margin-left:0;margin-right:0;overflow-x:hidden}
  .statuses-standalone .status-admin-grid,
  .statuses-standalone .status-queue-grid,
  .statuses-standalone .weekly-days,
  .statuses-standalone .weekly-settings,
  .statuses-standalone .weekly-material-grid{grid-template-columns:1fr!important}
  .statuses-standalone .status-license-bar select,
  .statuses-standalone .status-license-bar button,
  .statuses-standalone .status-box input,
  .statuses-standalone .status-box select,
  .statuses-standalone .status-box textarea,
  .statuses-standalone .status-box button,
  .statuses-standalone .weekly-day input,
  .statuses-standalone .weekly-day button{width:100%;max-width:100%}
  .statuses-standalone .status-catalog-head{grid-template-columns:minmax(0,1fr) auto}
  .statuses-standalone .status-material-card{grid-template-columns:minmax(0,1fr);gap:10px;padding:13px}
  .statuses-standalone .status-material-number{display:none}
  .statuses-standalone .status-material-copy b,
  .statuses-standalone .weekly-material-choice b,
  .statuses-standalone .status-item b{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
  .statuses-standalone .status-material-copy small,
  .statuses-standalone .weekly-material-choice small,
  .statuses-standalone .status-item small{white-space:normal;overflow-wrap:anywhere}
  .statuses-standalone .status-material-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .statuses-standalone .status-material-actions button:first-child{grid-column:1/-1}
  .statuses-standalone .status-material-actions button{width:100%;min-height:42px}
  .statuses-standalone .weekly-day{display:grid;gap:10px;padding:13px}
  .statuses-standalone .weekly-day input{margin-top:0!important}
  .statuses-standalone .week-pick-day{margin-top:0}
  .statuses-standalone .weekly-day small{margin-top:0}
  .statuses-standalone .weekly-picker{margin-top:0}
  .statuses-standalone .weekly-material-choice{width:100%;display:grid!important;grid-template-columns:26px minmax(0,1fr);align-items:start}
  .statuses-standalone .status-ready-step{grid-template-columns:24px minmax(0,1fr);gap:8px}
  .statuses-standalone .status-ready-step .ready-action{grid-column:1/-1;width:100%}
  .statuses-standalone .status-item{grid-template-columns:1fr!important;gap:8px}
  .statuses-standalone .status-item button{width:100%;min-height:40px}
}

.weekly-picker-close{
  min-height:36px;
  padding:8px 13px;
  border:1px solid rgba(139,115,255,.34);
  border-radius:999px;
  background:#17233e;
  color:#e7e3ff;
  font:inherit;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.weekly-material-index{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:9px;
  background:rgba(139,115,255,.16);
  color:#d8d2ff;
  font-size:11px;
  font-weight:900;
}
.weekly-material-copy{min-width:0;display:block}
.weekly-material-copy b{
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.28;
}

.status-catalog-hub{
  box-shadow:0 20px 55px rgba(0,0,0,.16);
}
.status-material-list{
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
  align-items:stretch;
}
.status-material-card{
  min-height:76px;
  align-items:start;
  padding:13px;
  border-radius:16px;
  background:
    radial-gradient(circle at 100% 0,rgba(50,210,139,.08),transparent 35%),
    linear-gradient(145deg,rgba(8,24,39,.96),rgba(7,19,34,.92));
  transition:border-color .18s,transform .18s,background .18s;
}
.status-material-card:hover{
  transform:translateY(-1px);
  border-color:rgba(139,115,255,.34);
  background:
    radial-gradient(circle at 100% 0,rgba(139,115,255,.1),transparent 35%),
    linear-gradient(145deg,rgba(10,30,49,.98),rgba(7,19,34,.94));
}
.status-material-number{
  width:34px;
  height:34px;
  border-radius:12px;
}
.status-material-copy b{
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  white-space:normal!important;
  overflow:hidden;
  line-height:1.28;
}
.status-material-copy small{
  display:flex!important;
  flex-wrap:wrap;
  gap:6px;
  margin-top:7px;
  white-space:normal!important;
}
.status-material-copy small span{
  max-width:100%;
  padding:4px 7px;
  border:1px solid rgba(148,176,214,.12);
  border-radius:999px;
  background:rgba(148,176,214,.045);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.status-material-actions{
  display:grid;
  grid-template-columns:repeat(3,auto);
  gap:7px;
  align-self:center;
}
.status-material-actions button{
  min-height:36px;
  border-radius:11px;
}
.status-queue-grid{
  grid-template-columns:1fr!important;
}
.status-queue-box{
  max-width:none;
}
.status-item{
  margin-bottom:8px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(8,24,39,.92),rgba(7,19,34,.86));
}
.status-item:last-child{
  margin-bottom:0;
  border-bottom:1px solid var(--line);
}
.status-item b{
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  white-space:normal!important;
  overflow:hidden;
  line-height:1.3;
}
.status-item small{
  display:block;
  margin-top:7px;
  white-space:normal;
  line-height:1.45;
}
.status-item button{
  min-height:38px;
  border-radius:11px;
}

@media(max-width:700px){
  .statuses-standalone .weekly-picker{
    position:fixed!important;
    inset:0!important;
    z-index:80!important;
    display:flex!important;
    flex-direction:column!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:12px 12px calc(16px + env(safe-area-inset-bottom))!important;
    border:0!important;
    border-radius:0!important;
    background:
      radial-gradient(circle at top right,rgba(139,115,255,.22),transparent 34%),
      linear-gradient(180deg,#081522 0%,#06111f 100%)!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  .statuses-standalone .weekly-picker-head{
    flex:0 0 auto;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:10px!important;
    align-items:start!important;
    width:100%!important;
    margin:0 0 10px!important;
    padding:8px 2px 10px!important;
    border-bottom:1px solid rgba(148,176,214,.14);
  }
  .statuses-standalone .weekly-picker-head small{
    font-size:9px!important;
    color:#72c8ff!important;
  }
  .statuses-standalone .weekly-picker-head strong{
    display:block!important;
    margin-top:5px!important;
    font-size:18px!important;
    line-height:1.18!important;
  }
  .statuses-standalone .weekly-count-badge{
    min-width:58px!important;
    height:38px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px 11px!important;
    border-radius:999px!important;
  }
  .statuses-standalone .weekly-picker-close{
    grid-column:1/-1;
    width:100%;
    min-height:48px;
    margin:0;
    border-radius:15px;
    background:linear-gradient(135deg,#8b72ff,#6049dc);
    color:#fff;
    font-size:15px;
  }
  .statuses-standalone .weekly-material-grid{
    flex:1 1 auto!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    width:100%!important;
    max-width:100%!important;
    max-height:none!important;
    min-height:0!important;
    padding:2px 0 10px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  .statuses-standalone .weekly-material-choice{
    width:100%!important;
    min-height:74px!important;
    display:grid!important;
    grid-template-columns:28px 34px minmax(0,1fr)!important;
    gap:9px!important;
    align-items:center!important;
    margin:0!important;
    padding:10px!important;
    border-radius:16px!important;
    background:#071322!important;
    overflow:hidden!important;
  }
  .statuses-standalone .weekly-material-choice.selected{
    border-color:rgba(50,210,139,.42)!important;
    background:linear-gradient(145deg,rgba(18,62,55,.82),rgba(7,19,34,.96))!important;
  }
  .statuses-standalone .weekly-material-choice input{
    width:24px!important;
    height:24px!important;
    margin:0!important;
  }
  .statuses-standalone .weekly-material-index{
    width:30px;
    height:30px;
    border-radius:10px;
  }
  .statuses-standalone .weekly-material-copy b{
    font-size:13px!important;
    line-height:1.28!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }
  .statuses-standalone .weekly-material-copy small{
    display:block!important;
    margin-top:5px!important;
    font-size:11px!important;
    color:#88a0b7!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

/* Final mobile guard for the status catalog. Keep this block last: desktop card
   styles above intentionally use wide grids, but Android WebView must never
   inherit those widths. */
@media(max-width:760px){
  .statuses-standalone{
    max-width:100vw!important;
    overflow-x:hidden!important;
  }
  .statuses-standalone .shell,
  .statuses-standalone #statuses,
  .statuses-standalone .status-catalog-hub,
  .statuses-standalone .status-material-list,
  .statuses-standalone .status-material-card,
  .statuses-standalone .status-material-copy,
  .statuses-standalone .status-material-actions{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  .statuses-standalone .status-material-list{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  .statuses-standalone .status-material-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    padding:13px!important;
    border-radius:18px!important;
  }
  .statuses-standalone .status-material-number{
    display:none!important;
  }
  .statuses-standalone .status-material-copy{
    display:block!important;
  }
  .statuses-standalone .status-material-copy b{
    display:-webkit-box!important;
    max-width:100%!important;
    -webkit-line-clamp:3!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    font-size:15px!important;
    line-height:1.28!important;
  }
  .statuses-standalone .status-material-copy small{
    display:flex!important;
    max-width:100%!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    overflow:hidden!important;
    white-space:normal!important;
  }
  .statuses-standalone .status-material-copy small span{
    max-width:100%!important;
    min-width:0!important;
  }
  .statuses-standalone .status-material-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    justify-content:stretch!important;
    align-self:stretch!important;
  }
  .statuses-standalone .status-material-actions button{
    width:100%!important;
    max-width:100%!important;
    min-height:46px!important;
    margin:0!important;
    padding:10px 8px!important;
    border-radius:14px!important;
  }
  .statuses-standalone .status-material-actions button:first-child{
    grid-column:1/-1!important;
  }
}

/* The same catalog safety for the regular admin statuses tab on phones. */
@media(max-width:760px){
  #statuses .status-material-list{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  #statuses .status-material-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:10px!important;
    padding:13px!important;
    overflow-x:hidden!important;
  }
  #statuses .status-material-number{
    display:none!important;
  }
  #statuses .status-material-copy,
  #statuses .status-material-actions{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  #statuses .status-material-copy b{
    display:-webkit-box!important;
    -webkit-line-clamp:3!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  #statuses .status-material-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    justify-content:stretch!important;
  }
  #statuses .status-material-actions button{
    width:100%!important;
    min-height:46px!important;
    margin:0!important;
  }
  #statuses .status-material-actions button:first-child{
    grid-column:1/-1!important;
  }
}
