/* VizzySMP staff area. Layered on styles.css + support.css (which supplies
   the ticket list, pills and message bubbles this page reuses). */

.staff-main{
  max-width:1240px;
  margin:0 auto;
  padding:36px 5vw 90px;
}

/* ---- tabs ----------------------------------------------------------- */

.staff-tabs{
  display:flex;
  gap:6px;
  border-bottom:1px solid var(--line);
  margin-bottom:34px;
  flex-wrap:wrap;
}
.staff-tab{
  background:none;
  border:none;
  border-bottom:2px solid transparent;
  color:var(--muted);
  padding:13px 18px;
  cursor:pointer;
  font-family:"Press Start 2P",monospace;
  font-size:9px;
  display:flex;
  align-items:center;
  gap:8px;
  transition:.15s;
}
.staff-tab:hover{color:var(--text)}
.staff-tab.active{color:var(--green2);border-bottom-color:var(--green)}
.badge{
  background:var(--green);
  color:#1a0e02;
  border-radius:20px;
  padding:3px 7px;
  font-size:8px;
}

/* ---- dashboard ------------------------------------------------------ */

.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:16px;
  margin-bottom:28px;
}
.stat{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:22px;
}
.stat span{
  display:block;
  font-family:"Press Start 2P",monospace;
  font-size:26px;
  color:var(--green2);
  margin-bottom:12px;
}
.stat small{color:var(--muted);font-size:12.5px}

.delivery-warning{
  background:rgba(237,66,69,.1);
  border:1px solid rgba(237,66,69,.45);
  border-radius:10px;
  padding:16px 18px;
  margin-bottom:32px;
  font-size:14px;
  line-height:1.65;
  color:#ffc4c5;
}
.delivery-warning strong{color:#fff}

.staff-heading{
  font-family:"Press Start 2P",monospace;
  font-size:13px;
  margin:44px 0 18px;
}

.runbook{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(270px,1fr));
  gap:16px;
}
.runbook > div{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:20px;
}
.runbook h3{margin:0 0 9px;font-size:15.5px}
.runbook p{margin:0;color:var(--muted);font-size:13.5px;line-height:1.7}
.runbook strong{color:#d7dbd4}
.runbook code{
  background:#080d0a;
  border:1px solid var(--line);
  border-radius:4px;
  padding:1px 5px;
  font-size:12.5px;
}

/* ---- chat ----------------------------------------------------------- */

.chat-layout{
  display:grid;
  grid-template-columns:250px 1fr;
  gap:20px;
  align-items:start;
}
.chat-sidebar{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:20px;
  position:sticky;
  top:100px;
}
.chat-sidebar h3{
  font-family:"Press Start 2P",monospace;
  font-size:8px;
  color:var(--muted);
  margin:0 0 12px;
  letter-spacing:.5px;
}
.chat-sidebar h3:not(:first-child){margin-top:26px}

.channel-list{display:grid;gap:3px}
.channel{
  background:none;
  border:none;
  border-radius:7px;
  color:var(--muted);
  text-align:left;
  padding:9px 11px;
  cursor:pointer;
  font-size:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  transition:.13s;
}
.channel:hover{background:rgba(255,255,255,.04);color:var(--text)}
.channel.active{background:rgba(240,138,18,.13);color:var(--green2)}
.admin-only{
  font-style:normal;
  font-size:9px;
  color:#8b938b;
  border:1px solid var(--line);
  border-radius:4px;
  padding:2px 5px;
}

.here-list{display:flex;flex-wrap:wrap;gap:6px}
.here{
  background:rgba(59,165,93,.12);
  border:1px solid rgba(59,165,93,.4);
  color:#8fe3aa;
  border-radius:20px;
  padding:4px 10px;
  font-size:12px;
}
.empty-inline{color:#7d857d;font-size:12.5px}

.chat-privacy{
  margin:26px 0 0;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:#7d857d;
  font-size:11.5px;
  line-height:1.6;
}

.chat-main{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  min-height:600px;
}
.chat-head{
  border-bottom:1px solid var(--line);
  padding:16px 20px;
  display:flex;
  align-items:baseline;
  gap:14px;
  flex-wrap:wrap;
}
.chat-head strong{font-family:"Press Start 2P",monospace;font-size:11px}
.chat-head span{color:var(--muted);font-size:13px}

.chat-messages{
  flex:1;
  overflow-y:auto;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:58vh;
}
.chat-msg-head{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:5px;
  font-size:13.5px;
}
.chat-msg-head time{color:#6f776f;font-size:11.5px}
.admin-tag{
  background:#b07cff;
  color:#1b0e33;
  font-family:"Press Start 2P",monospace;
  font-size:7px;
  padding:3px 6px;
  border-radius:4px;
}
.chat-msg-body{
  font-size:14.5px;
  line-height:1.65;
  color:#dfe3dc;
  word-break:break-word;
}

.chat-form{
  border-top:1px solid var(--line);
  padding:14px 20px;
  display:flex;
  gap:12px;
  align-items:flex-end;
}
.chat-form textarea{
  flex:1;
  background:#080d0a;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--text);
  padding:12px 14px;
  font:inherit;
  resize:none;
  max-height:160px;
}
.chat-form textarea:focus{outline:none;border-color:var(--green)}
#chat-status{padding:0 20px 12px;margin:0}

/* ---- tickets -------------------------------------------------------- */

.ticket-filters{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.filter{
  background:none;
  border:1px solid var(--line);
  border-radius:20px;
  color:var(--muted);
  padding:7px 15px;
  cursor:pointer;
  font-size:13px;
  transition:.15s;
}
.filter:hover{color:var(--text);border-color:rgba(240,138,18,.4)}
.filter.active{background:rgba(240,138,18,.13);border-color:var(--green);color:var(--green2)}

/* The staff ticket rows are <button>s, so they need the anchor styling
   from support.css plus a reset of the browser's button defaults. */
.ticket-list button.ticket-row{
  width:100%;
  background:none;
  border:none;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:inherit;
  text-align:left;
  cursor:pointer;
  font:inherit;
}
.ticket-list button.ticket-row:last-child{border-bottom:none}

#s-status-select{
  background:#080d0a;
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--text);
  padding:11px 13px;
  font:inherit;
  font-size:14px;
}
#s-status-select:focus{outline:none;border-color:var(--green)}

/* ---- access revoked mid-session ------------------------------------- */

.access-lost{
  max-width:520px;
  margin:80px auto;
  text-align:center;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:40px 30px;
}
.access-lost h2{margin:0 0 14px;font-size:22px}
.access-lost p{color:var(--muted);line-height:1.7;margin:0 0 26px}

@media (max-width:900px){
  .chat-layout{grid-template-columns:1fr}
  .chat-sidebar{position:static}
  .chat-messages{max-height:52vh}
}

/* ---------------------------------------------------------------- */
/* Store admin (admins only)                                         */
/* ---------------------------------------------------------------- */

.tab-lock{font-size:10px;opacity:.75;margin-left:2px}

.store-admin-intro{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:20px 22px;
  margin-bottom:22px;
}
.store-admin-intro p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.75;
  max-width:70ch;
}
.store-admin-intro strong{color:#d7dbd4}
.store-admin-intro em{color:var(--green2);font-style:normal}

.placeholder-key{
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  padding:14px 16px;
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:16px;
}
.placeholder-key span{color:var(--muted);font-size:12.5px}
.placeholder-key code{
  background:rgba(240,138,18,.14);
  color:var(--green2);
  padding:2px 6px;
  border-radius:5px;
  font-size:12px;
  margin-right:6px;
}

.store-admin-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}

.store-admin-list{display:grid;gap:16px}

.store-product{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px 20px;
  display:grid;
  gap:14px;
}

.store-product-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.store-product-head strong{display:block;font-size:15.5px;margin-bottom:4px}
.store-product-head small{color:var(--muted);font-size:12.5px}
.store-product-head code{
  background:rgba(255,255,255,.06);
  padding:1px 5px;
  border-radius:4px;
  font-size:11.5px;
}

.store-product label{display:grid;gap:6px}
.store-product label > span{font-size:12.5px;color:var(--muted)}

.store-product textarea{
  width:100%;
  background:rgba(0,0,0,.32);
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--text);
  padding:11px 13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12.5px;
  line-height:1.65;
  resize:vertical;
}
.store-product textarea:focus{outline:none;border-color:var(--green)}
.store-product textarea::placeholder{color:#5d655d}

.store-product-row{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.store-product-row label.inline{
  display:flex;
  align-items:center;
  gap:8px;
}
.store-product-row label.inline > span{white-space:nowrap}
.store-product-row input[name="roleId"]{
  background:rgba(0,0,0,.32);
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--text);
  padding:7px 10px;
  font-size:12.5px;
  width:180px;
}
.store-product-row input[name="roleId"]:focus{outline:none;border-color:var(--green)}
.store-product-row input[type="checkbox"]{accent-color:var(--green)}

.apply-btn.small{padding:8px 16px;font-size:12px}

.store-product-status{margin:0;font-size:12.5px;color:var(--muted)}

@media (max-width:640px){
  .store-product-row{align-items:stretch;flex-direction:column}
  .store-product-row input[name="roleId"]{width:100%}
}
