/* ===== Support tickets ===== */
.sup{padding:34px 0 80px}
.sup-grid{display:grid;grid-template-columns:1fr 330px;gap:22px;align-items:start}
.sup-cats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:6px}
.sup-cat,.field .sup-cat{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:14px 8px;border-radius:12px;background:var(--bg2);border:1px solid var(--line2);cursor:pointer;font-size:13.5px;font-weight:600;color:var(--muted);transition:border-color .15s,background .15s,color .15s}
.sup-cat .ic{width:22px;height:22px;color:var(--k,var(--gold))}
.sup-cat:hover{border-color:#3b4f78;color:var(--text)}
.sup-cat.on{border-color:var(--k,var(--gold));background:color-mix(in srgb,var(--k,var(--gold)) 10%,var(--bg2));color:var(--text)}
.sup-cat input{position:absolute;opacity:0;pointer-events:none}
.sup-form .row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.sup-form textarea.input{min-height:150px;resize:vertical}
.sup-form .foot{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:6px}
.sup-form .foot .muted{font-size:13px}
.sup-side .card{padding:18px}
.sup-side .card+.card{margin-top:14px}
.sup-side h4{font-size:15px;margin:0 0 6px;display:flex;align-items:center;gap:8px}
.sup-side h4 .ic{width:18px;height:18px;color:var(--gold)}
.sup-side p{font-size:14px;color:var(--muted);margin:0 0 10px}
.sup-side ul{margin:0;padding-left:18px;color:var(--muted);font-size:14px}
.sup-side li{margin:4px 0}
.label-opt{font-weight:400;color:var(--dim);font-size:12.5px;margin-left:4px}
/* ticket view */
.tk-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:6px}
.tk-head h2{margin:0;font-size:22px}
.tk-meta{color:var(--muted);font-size:14px;display:flex;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.tk-st{white-space:nowrap;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:99px}
.tk-st::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.tk-st.open{background:rgba(251,191,36,.12);color:var(--gold)}
.tk-st.answered{background:rgba(74,222,128,.12);color:var(--green)}
.tk-st.closed{background:var(--card2);color:var(--muted)}
.tk-link{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:rgba(74,222,128,.07);border:1px solid rgba(74,222,128,.3);border-radius:12px;padding:14px 16px;margin-bottom:20px;color:#bbf7d0;font-size:14.5px}
.tk-link .ic{width:20px;height:20px;color:var(--green);flex:none}
.tk-link code{flex:1;min-width:200px}
.msgs{display:flex;flex-direction:column;gap:14px}
.msg{display:grid;grid-template-columns:40px 1fr;gap:12px}
.msg .av{width:40px;height:40px;border-radius:9px;display:grid;place-items:center;font:700 16px var(--font);background:var(--card2);border:1px solid var(--line2);color:var(--text);image-rendering:pixelated}
.msg .bub{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 15px}
.msg .mwho{display:flex;align-items:center;gap:8px;font-size:13.5px;margin-bottom:4px}
.msg .mwho b{font-weight:700}
.msg .mwho time{color:var(--dim);font-size:12.5px;margin-left:auto}
.msg .bub p{margin:0;color:#cfd7e8;font-size:15px;white-space:pre-line}
.msg.staff .bub{background:linear-gradient(180deg,rgba(251,191,36,.07),rgba(251,191,36,.02));border-color:rgba(251,191,36,.28)}
.msg.staff .av{background:linear-gradient(180deg,#fcd34d,#f59e0b);color:#1a1205;border-color:#fcd34d}
.msg.note .bub{background:repeating-linear-gradient(135deg,rgba(167,139,250,.06) 0 10px,transparent 10px 20px);border-style:dashed;border-color:rgba(167,139,250,.45)}
.msg.note .av{background:rgba(167,139,250,.15);color:var(--violet);border-color:rgba(167,139,250,.4)}
/* staff role pill: crown / shield / gavel */
.rolechip{display:inline-flex;align-items:center;gap:5px;font:700 11.5px/1 var(--font);padding:4px 9px 4px 7px;border-radius:7px;letter-spacing:.02em;border:1px solid;white-space:nowrap}
.rolechip .ic{width:13px;height:13px;stroke-width:2.2}
.rolechip.r-owner{color:#1a1205;border-color:#fde68a;background:linear-gradient(180deg,#fde68a,#f59e0b);box-shadow:0 2px 10px -3px rgba(245,158,11,.7),inset 0 -2px 0 rgba(0,0,0,.15)}
.rolechip.r-admin{color:#fecaca;border-color:rgba(248,113,113,.55);background:linear-gradient(180deg,rgba(248,113,113,.28),rgba(220,38,38,.18))}
.rolechip.r-mod{color:#bfdbfe;border-color:rgba(96,165,250,.55);background:linear-gradient(180deg,rgba(96,165,250,.26),rgba(37,99,235,.16))}
.rolechip.r-staff{color:#ccfbf1;border-color:rgba(45,212,191,.5);background:rgba(45,212,191,.15)}
.rolechip.r-note{color:#ddd6fe;border-color:rgba(167,139,250,.5);background:rgba(167,139,250,.15)}
.msg .sys{font-size:12.5px;color:var(--dim);margin-top:6px}
.tk-reply{margin-top:20px}
.tk-reply textarea.input{min-height:110px}
.tk-reply .acts{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:10px}
.tk-reply .acts .spacer{flex:1}
.chk{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);cursor:pointer}
.chk input{accent-color:var(--violet);width:16px;height:16px}
/* admin list */
.tk-tabs{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.tk-tabs a{padding:7px 14px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);background:var(--card);border:1px solid var(--line)}
.tk-tabs a.on{color:var(--gold);border-color:rgba(251,191,36,.4);background:rgba(251,191,36,.08)}
.tk-tabs a span{margin-left:6px;font-size:12px;background:var(--card2);border-radius:99px;padding:1px 7px;color:var(--text)}
.tk-tabs a.on span{background:var(--gold);color:#1a1205}
.tbl .first{color:var(--muted);font-size:13.5px;max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tbl .pl{display:flex;align-items:center;gap:9px;font-weight:600}
.tbl .pl i{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;font-style:normal;font-size:12px;background:var(--card2);border:1px solid var(--line2)}
.tbl tr.unread td:first-child{box-shadow:inset 3px 0 0 var(--gold)}
.tbl .age{color:var(--dim);font-size:13px;white-space:nowrap}
.tk-admin{display:grid;grid-template-columns:1fr 280px;gap:20px;align-items:start}
.tk-admin aside .card{padding:16px}
.tk-admin aside dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:8px 12px;font-size:14px}
.tk-admin aside dt{color:var(--dim)}
.tk-admin aside dd{margin:0}
.tk-admin aside .btn{width:100%;margin-top:8px}
@media (max-width:900px){.sup-grid,.tk-admin{grid-template-columns:1fr}.sup-cats{grid-template-columns:repeat(3,1fr)}.sup-form .row2{grid-template-columns:1fr}}
.tbl .chip{white-space:nowrap}

.msg-sys{text-align:center;font-size:12.5px;color:var(--dim);display:flex;align-items:center;gap:12px}
.msg-sys::before,.msg-sys::after{content:"";flex:1;height:1px;background:var(--line)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.sup-cats.need .sup-cat{border-color:rgba(248,113,113,.6)}
.sup-mine{list-style:none;padding:0!important;margin:0}
.sup-mine li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid var(--line)}
.sup-mine li:first-child{border-top:0}
.sup-mine a{color:var(--text);font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sup-mine a b{color:var(--gold)}
.tk-wrap{max-width:860px}
.tk-foot{font-size:13px;margin-top:14px;text-align:center}
.tk-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:40px;color:var(--muted)}
.tk-empty .ic{width:30px;height:30px;color:var(--green)}
.tk-empty p{margin:0}
.tk-tbl tr[data-href]{cursor:pointer}
.tbl a.first{display:block;color:var(--text)}
.tk-reply.noting textarea.input{border-color:rgba(167,139,250,.55);background:repeating-linear-gradient(135deg,rgba(167,139,250,.05) 0 10px,transparent 10px 20px),var(--bg2)}
.tk-admin aside form{margin:0}
.tk-del{color:var(--red)!important}
.sup-form [hidden]{display:none!important}
