/* S5: settings, security, help, states gallery, admin. Needs home.css, v4.css, app.css. */
.s5-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.s5-panels { display: grid; gap: 12px; min-width: 0; }
.s5-panel { display: grid; gap: 12px; min-width: 0; }
.s5-panel[hidden], .adm-panel[hidden] { display: none !important; }
.s5-tabs { position: sticky; top: 90px; display: grid; gap: 2px; padding: 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.s5-tabs a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: .9rem; color: var(--text-2); }
.s5-tabs a .qq-ic { width: 18px; height: 18px; }
.s5-tabs a:hover { background: var(--surface-2); color: var(--text); }
.s5-tabs a.is-on { background: var(--bg-2); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.s5-tabs a.is-on .qq-ic { color: var(--accent); }
/* cards + rows */
.s5-card { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; align-content: start; padding: 20px; }
.s5-card__t { font-size: 1.05rem; font-weight: 800; }
.s5-card__s { margin: -8px 0 0; color: var(--text-2); font-size: .86rem; }
.s5-card__s code { font-family: var(--mono); font-size: .8rem; }
.s5-card__foot { display: flex; flex-wrap: wrap; gap: 8px; }
.s5-card__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.s5-card__headrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s5-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--line); }
.s5-row:first-of-type { border-top: 0; padding-top: 0; }
.s5-row > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.s5-row b { font-size: .92rem; }
.s5-row small { color: var(--text-2); font-size: .8rem; }
.s5-row__ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.s5-row__ic .qq-ic { width: 17px; height: 17px; }
.s5-row__ic--ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.s5-badge { display: inline-block; padding: 1px 8px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 700; font-style: normal; vertical-align: 1px; }
.s5-btnrow { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.s5-btnrow--c { justify-content: center; }
.s5-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.s5-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.s5-emailrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 6px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.s5-emailrow b { font-size: .9rem; }
/* avatar */
.s5-avatarrow { display: flex; align-items: center; gap: 14px; }
.s5-avatar { position: relative; display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--ink); color: var(--on-ink); overflow: hidden; }
.s5-avatar em { font-style: normal; font-weight: 800; font-size: 1.2rem; }
.s5-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s5-avatar img[hidden] { display: none; }
.s5-avatarrow > div { flex: 1; min-width: 0; display: grid; }
.s5-avatarrow small { color: var(--text-2); font-size: .82rem; }
.s5-upload { cursor: pointer; }
/* own dropdown */
.s5-dd { position: relative; }
.s5-dd__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font: 500 .9rem var(--font); color: var(--text); cursor: pointer; }
.s5-dd__btn:hover { border-color: var(--ink); }
.s5-dd__btn .qq-ic { width: 14px; height: 14px; color: var(--text-2); flex: none; }
.s5-dd__pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; display: grid; gap: 2px; max-height: 260px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: ap-in .15s ease; }
.s5-dd__pop[hidden] { display: none; }
.s5-dd__pop button { display: grid; gap: 1px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.s5-dd__pop button:hover { background: var(--surface-2); }
.s5-dd__pop button b { font-size: .88rem; font-weight: 600; }
.s5-dd__pop button small { color: var(--text-2); font-size: .76rem; }
.s5-dd__pop button.is-on b { color: var(--accent); }
/* switches (button reset; track comes from .qq-toggle) */
button.qq-toggle { border: 0; background: none; padding: 5px 0 5px 5px; font: inherit; cursor: pointer; flex: none; }
button.qq-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
/* tables */
.s5-tablewrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.s5-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .86rem; }
.s5-table th { text-align: left; padding: 10px 12px; background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); white-space: nowrap; }
.s5-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.s5-table tbody tr:hover { background: var(--bg-2); }
.s5-table tr[hidden] { display: none; }
.s5-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s5-cell > span:last-child { display: grid; }
.s5-cell b { font-size: .88rem; } .s5-cell small { color: var(--text-2); font-size: .76rem; }
.s5-matrix { min-width: 480px; }
.s5-matrix th:nth-child(n+2), .s5-matrix td:nth-child(n+2) { text-align: center; width: 110px; }
.s5-tdact { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.qq-st--fail::before { background: #c2321f; }
.qq-st--pending::before { background: #d97706; }
.s5-chip { display: inline-block; padding: 3px 10px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; }
.s5-chip--owner { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.s5-scopes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.s5-scopes i { font-style: normal; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .7rem; font-family: var(--mono); color: var(--text-2); }
.s5-mini-av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: .72rem; font-weight: 800; }
/* [hidden] must always win (no global rule; auth.css is not loaded on app pages) */
.s5-checkrow[hidden], .s5-banner[hidden], .ap-empty[hidden], .au-link[hidden] { display: none !important; }
.au-err { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .8rem; color: #c2321f; }
.au-err .qq-ic { width: 14px; height: 14px; flex: none; }
.au-err[hidden] { display: none; }
.au-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.au-meter i { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .25s; }
.au-meter[data-s="1"] i:nth-child(-n+1) { background: #c2321f; }
.au-meter[data-s="2"] i:nth-child(-n+2) { background: #d97706; }
.au-meter[data-s="3"] i:nth-child(-n+3) { background: #65a30d; }
.au-meter[data-s="4"] i { background: var(--accent); }
/* modals */
.s5-mbox { text-align: left; }
.s5-mbox h2 { text-align: center; }
.s5-mbox > p { text-align: center; }
.s5-mbox--wide { width: min(560px, 100%); }
.s5-mbox .au-field { text-align: left; }
.s5-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #fef3c7; color: #92400e; font-size: .86rem; text-align: left !important; }
:root[data-theme="dark"] .s5-warn { background: rgba(217, 119, 6, .16); color: #fcd34d; }
.s5-warn .qq-ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.s5-navrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s5-navrow .qq-btn { width: 100%; }
.s5-hint { color: var(--text-2); font-size: .8rem; text-align: center; }
.s5-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; color: var(--text-2); }
.s5-rules li { display: flex; align-items: center; gap: 8px; }
.s5-rules li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.s5-rules li.is-ok { color: var(--text); }
.s5-rules li.is-ok::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
/* 2FA wizard */
.s5-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.s5-steps li { position: relative; padding-top: 12px; font-size: .76rem; font-weight: 700; color: var(--text-2); text-align: center; }
.s5-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--surface-3); }
.s5-steps li.is-on { color: var(--text); }
.s5-steps li.is-on::before, .s5-steps li.is-done::before { background: var(--accent); }
.s5-methods { display: grid; gap: 8px; }
.s5-method { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.s5-method:hover { border-color: var(--ink); }
.s5-method.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.s5-method > span:last-child { display: grid; gap: 1px; }
.s5-method b { font-size: .92rem; } .s5-method small { color: var(--text-2); font-size: .8rem; }
.s5-qr { display: grid; place-items: center; padding: 14px; }
.s5-qr i { display: block; width: 168px; padding: 10px; border-radius: 16px; background: #fff; color: #0a0a0a; border: 1px solid var(--line); }
.s5-qr .qq-qrsvg { width: 100%; height: auto; display: block; }
.s5-manual { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .84rem; }
.s5-manual[hidden] { display: none; }
.s5-otp { display: flex; justify-content: center; gap: 8px; }
.s5-otp input { width: 46px; height: 54px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font: 700 1.3rem var(--mono); color: var(--text); text-align: center; outline: none; }
.s5-otp input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.s5-otp.is-bad input { border-color: #c2321f; animation: s5-shake .4s ease; }
@keyframes s5-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.s5-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.s5-codes code { display: block; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font: 600 .86rem var(--mono); text-align: center; }
.s5-savecheck { justify-content: center; font-weight: 600; }
.s5-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: s5-spin .8s linear infinite; }
@keyframes s5-spin { to { transform: rotate(360deg); } }
.s5-browser { display: grid; justify-items: center; gap: 8px; padding: 18px; text-align: center; }
.s5-checkrow { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; }
.s5-checkrow .s5-spinner { width: 22px; height: 22px; }
.s5-checkrow.is-ok b { color: var(--accent); }
/* brand, team, api, data */
.s5-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s5-swatches button[data-c] { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-2); cursor: pointer; }
.s5-swatches button[data-c].is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.s5-hex input { width: 92px; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font: 600 .84rem var(--mono); color: var(--text); }
.s5-drop { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface); text-align: center; cursor: pointer; }
.s5-drop:hover { border-color: var(--ink); }
.s5-drop .qq-ic { width: 26px; height: 26px; color: var(--text-2); }
.s5-drop b { font-size: .9rem; } .s5-drop small { color: var(--text-2); font-size: .8rem; }
.s5-drop--sm { padding: 16px; }
.s5-drop.is-file { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }
.au-input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--text); resize: vertical; padding: 10px 0; }
.s5-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 50px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.s5-chips:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.s5-chips input { flex: 1; min-width: 160px; border: 0; outline: 0; background: none; font: inherit; color: var(--text); padding: 0 8px; }
.s5-chipmail { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 11px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: .8rem; font-weight: 600; }
.s5-chipmail button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: inherit; cursor: pointer; font-size: .9rem; line-height: 1; }
.s5-roleexp { color: var(--text-2); font-size: .84rem; }
.s5-checks { display: grid; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.s5-intgrid { display: grid; gap: 8px; }
.s5-int { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.s5-int > div { flex: 1; min-width: 0; display: grid; }
.s5-int small { color: var(--text-2); font-size: .8rem; }
.s5-how { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; }
.s5-testres { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: .86rem; font-weight: 600; }
.s5-testres[hidden] { display: none; }
.s5-testres.is-bad { background: rgba(194, 50, 31, .1); color: #c2321f; }
.s5-progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.s5-progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.s5-danger { border-color: #f0b4ac; }
:root[data-theme="dark"] .s5-danger { border-color: #7a2e22; }
.s5-danger__btn { color: #b91c1c; }
:root[data-theme="dark"] .s5-danger__btn { color: #fca5a5; }
.s5-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.s5-reasons .ap-tag.is-on span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
/* account menu + notifications drawer (built by JS from templates) */
.ap-user { position: relative; }
.ap-user:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.s5-acc { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 70; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: ap-in .15s ease; }
.s5-acc[hidden] { display: none; }
.s5-acc__head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.s5-acc__head b { display: block; font-size: .88rem; } .s5-acc__head small { color: var(--text-2); font-size: .76rem; }
.s5-acc__sep { height: 1px; background: var(--line); margin: 6px 4px; }
.s5-ntf { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 24px)); padding: 18px 16px 16px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-3); animation: s5-slidein .25s cubic-bezier(.2,.7,.2,1); }
@keyframes s5-slidein { from { transform: translateX(40px); opacity: 0; } }
.s5-ntf[hidden] { display: none; }
.s5-ntf__head { display: flex; align-items: center; gap: 8px; }
.s5-ntf__head > div { flex: 1; display: grid; }
.s5-ntf__head b { font-size: 1.1rem; } .s5-ntf__head small { color: var(--text-2); font-size: .78rem; }
.s5-ntf__tabs { width: 100%; }
.s5-ntf__tabs button { flex: 1; justify-content: center; }
.s5-ntf__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow-y: auto; }
.s5-ntf__list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.s5-ntf__list li[hidden] { display: none; }
.s5-ntf__list div { flex: 1; min-width: 0; display: grid; }
.s5-ntf__list b { font-size: .86rem; } .s5-ntf__list small { color: var(--text-2); font-size: .76rem; }
.s5-ntf__list i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
.s5-ntf__list li.is-read i { display: none; }
.s5-ntf__ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.s5-ntf__ic .qq-ic { width: 16px; height: 16px; }
.s5-ntf__foot { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; font-size: .86rem; text-decoration: none; }
.s5-ntf__foot .qq-ic { width: 15px; height: 15px; }
/* help */
.s5-helphead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.s5-helphead h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.s5-helphead p { color: var(--text-2); margin: 2px 0 0; }
.s5-helphead__act { display: flex; gap: 8px; }
.s5-helpsearch { max-width: none; min-height: 48px; }
.s5-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s5-cat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.s5-cat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.s5-cat.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.s5-cat > span:last-child { display: grid; }
.s5-cat small { color: var(--text-2); font-size: .78rem; }
.s5-art { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.s5-art:first-of-type { border-top: 0; }
.s5-art:hover b { text-decoration: underline; }
.s5-art > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.s5-art small { color: var(--text-2); font-size: .78rem; }
.s5-art > .qq-ic { width: 15px; height: 15px; color: var(--text-2); flex: none; }
.s5-art[hidden] { display: none; }
.s5-artcat { color: var(--accent); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.s5-artfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: .82rem; }
.s5-keys { display: grid; gap: 6px; }
.s5-keys div { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.s5-keys div:first-child { border-top: 0; }
.s5-keys kbd { min-width: 44px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); font: 700 .8rem var(--mono); text-align: center; }
.s5-sheet { width: min(440px, 100%); }
/* states gallery */
.s5-note { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .86rem; margin: 0; }
.s5-note .qq-ic { width: 16px; height: 16px; }
.s5-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.s5-banner > div { flex: 1; min-width: 0; display: grid; }
.s5-banner small { color: var(--text-2); font-size: .8rem; }
.s5-banner--quota { border-color: var(--accent-line); background: var(--accent-soft); }
.s5-egrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.s5-ecard { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px; }
.s5-ecard p { margin: 0 0 6px; color: var(--text-2); font-size: .86rem; }
.s5-eimg { max-width: 260px; }
.s5-erow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s5-skel { display: block; border-radius: 10px; background: var(--surface-3); animation: s5-shimmer 1.4s ease-in-out infinite; }
@keyframes s5-shimmer { 50% { opacity: .45; } }
.s5-skelrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.s5-skelrow i { height: 64px; }
.s5-skeltable { display: grid; gap: 6px; margin-top: 10px; }
.s5-skeltable i { height: 34px; }
.s5-skelchart { display: flex; align-items: flex-end; gap: 6px; height: 110px; margin-top: 10px; }
.s5-skelchart i { flex: 1; }
.s5-skelchart i:nth-child(1) { height: 40%; } .s5-skelchart i:nth-child(2) { height: 65%; } .s5-skelchart i:nth-child(3) { height: 50%; } .s5-skelchart i:nth-child(4) { height: 80%; } .s5-skelchart i:nth-child(5) { height: 60%; } .s5-skelchart i:nth-child(6) { height: 92%; } .s5-skelchart i:nth-child(7) { height: 70%; }
.s5-quotaimg { max-width: 320px; margin: 0 auto; }
/* admin shell */
.adm { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); overflow: auto; }
.adm-badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0 8px 8px; padding: 3px 12px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.adm-badge .qq-ic { width: 14px; height: 14px; }
.adm-main { min-width: 0; }
.adm-note { display: flex !important; align-items: center; gap: 6px; }
.adm-note .qq-ic { width: 14px; height: 14px; color: var(--accent); }
.adm-panel { display: grid; gap: 12px; }
.adm-bars { display: flex; align-items: flex-end; gap: 5px; height: 170px; padding-top: 6px; }
.adm-bars i { flex: 1; min-width: 0; border-radius: 5px 5px 2px 2px; background: var(--ink); opacity: .8; }
.adm-bars i:last-child { background: var(--accent); opacity: 1; }
.s5-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(400px, calc(100vw - 24px)); padding: 20px 18px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-3); overflow-y: auto; animation: s5-slidein .25s cubic-bezier(.2,.7,.2,1); }
.s5-drawer[hidden] { display: none; }
.s5-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.s5-drawer__head b { display: block; font-size: 1.1rem; } .s5-drawer__head small { color: var(--text-2); }
.s5-drawer__body { display: grid; gap: 10px; }
.s5-kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; }
.s5-kv span { color: var(--text-2); }
.s5-cap { display: inline-flex; align-items: center; gap: 8px; }
.s5-cap input { width: 100px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font: 700 .9rem var(--font); color: var(--text); }
.s5-tplbody { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-size: .88rem; display: grid; gap: 8px; }
.s5-tplbody p { margin: 0; text-align: left; color: var(--text-2); }
.s5-abuse .ap-thumb i { display: block; width: 32px; }
.s5-abuse .ap-thumb .qq-qrsvg { width: 100%; height: auto; display: block; }
.s5-abuse .s5-tdact { flex-wrap: wrap; justify-content: flex-end; }
/* responsive */
@media (max-width: 1180px) {
  .s5-egrid { grid-template-columns: 1fr 1fr; }
  .s5-cats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .s5-wrap { grid-template-columns: 1fr; }
  .s5-tabs { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .s5-tabs::-webkit-scrollbar { display: none; }
  .s5-tabs a { flex: none; white-space: nowrap; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--sh-3); }
  .adm.is-nav .adm-side { transform: none; }
  .adm-top .ap-burger { display: inline-grid; }
  .s5-erow { grid-template-columns: 1fr; }
  .s5-grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .s5-grid2, .s5-grid3 { grid-template-columns: 1fr; }
  .s5-egrid, .s5-cats { grid-template-columns: 1fr; }
  .s5-card { padding: 16px; }
  .s5-banner { flex-wrap: wrap; }
  .s5-otp input { width: 40px; height: 50px; }
  .s5-skelrow { grid-template-columns: 1fr 1fr; }
  .s5-codes { grid-template-columns: 1fr 1fr; }
  .s5-navrow { grid-template-columns: 1fr; }
  .s5-row { flex-wrap: wrap; }
  .s5-row > .qq-btn, .s5-row > .au-link, .s5-row > .s5-cap { margin-left: auto; }
}

/* Settings and admin controls */
[hidden] { display: none !important; }
.au-input > .qq-ic { flex: none; width: 17px; height: 17px; color: var(--text-2); }
.s5-card__tools .ap-tsearch { min-width: 0; flex: 1 1 190px; }
/* Keep the global font preview and transient feedback from covering app controls. */
.qq-fontbar { display: none; }
.ap-toast { pointer-events: none; }

/* S13: horizontal sub-tabs (rule 11: left-aligned, compact, active underlined) */
.s5-subtabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.s5-subtabs::-webkit-scrollbar { display: none; }
.s5-subtabs a { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 9px 10px 11px; text-decoration: none; font-size: .86rem; font-weight: 500; color: var(--text-2); white-space: nowrap; position: relative; }
.s5-subtabs a .qq-ic { width: 15px; height: 15px; }
.s5-subtabs a:hover { color: var(--text); background: var(--surface-2); border-radius: 8px 8px 0 0; }
.s5-subtabs a.is-on { color: var(--text); font-weight: 600; }
.s5-subtabs a.is-on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.s5-subhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.s5-subhead .s5-card__s { margin: 2px 0 0; }
.s5-subhead .qq-btn { flex: none; }
[data-subpanel] { display: grid; gap: 12px; min-width: 0; }
[data-subpanel][hidden] { display: none !important; }

/* S13: calm danger zone (neutral card, consequence list, red outline button) */
.s5-danger-calm { border-color: var(--line); }
.s5-conseq { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.s5-conseq li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.s5-conseq .qq-ic { width: 16px; height: 16px; color: var(--text-2); flex: none; }
.s5-btn-outline-danger { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #dc2626; background: transparent; color: #b91c1c; font-weight: 700; }
.s5-btn-outline-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.s5-btn-outline-danger .qq-ic { width: 15px; height: 15px; }
:root[data-theme="dark"] .s5-btn-outline-danger { color: #fca5a5; border-color: #f87171; }
:root[data-theme="dark"] .s5-btn-outline-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
/* legacy harsh red block kept for reference, no longer used */
.s5-danger { border-color: #f0b4ac; }

/* S13: export human challenge (generic, no third-party branding) */
.s5-human { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); max-width: 420px; }
.s5-human small { color: var(--text-2); font-size: .8rem; }
.s5-human__box { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: .9rem; }
.s5-human__box input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s5-human__tick { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); color: transparent; }
.s5-human__tick .qq-ic { width: 14px; height: 14px; }
.s5-human__spin { display: none; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--accent); animation: s5-spin .8s linear infinite; }
.s5-human.is-busy .s5-human__tick { display: none; }
.s5-human.is-busy .s5-human__spin { display: block; }
.s5-human.is-ok .s5-human__tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.s5-human__ok { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; font-weight: 600; color: var(--accent); }
.s5-human__ok .qq-ic { width: 16px; height: 16px; }
.s5-human__ok[hidden] { display: none; }
.s5-cooldown { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.s5-cooldown > div { display: grid; gap: 1px; }
.s5-cooldown small { color: var(--text-2); font-size: .82rem; }

/* S13: brand previews */
.s5-brandgrid { display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: start; }
.s5-preview { position: sticky; top: 90px; }
.s5-qrprev { display: grid; justify-items: center; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.s5-qrprev i { display: block; width: 150px; padding: 10px; border-radius: 12px; background: #fff; color: #0a0a0a; border: 1px solid var(--line); }
.s5-qrprev .qq-qrsvg { width: 100%; height: auto; display: block; }
.s5-qrprev b { font-size: .9rem; }
.s5-qrprev[data-frame="none"] b { display: none; }
.s5-qrprev[data-frame="badge"] b { padding: 3px 12px; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); font-size: .78rem; }
.s5-themes { display: grid; gap: 8px; }
.s5-theme { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.s5-theme:hover { border-color: var(--ink); }
.s5-theme.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.s5-theme > span:last-child { display: grid; gap: 1px; }
.s5-theme small { color: var(--text-2); font-size: .78rem; }
.s5-theme__sw { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--line); }
.s5-theme__sw--light { background: #fff; }
.s5-theme__sw--midnight { background: #0a0a0a; }
.s5-theme__sw--meadow { background: #f0fdf4; box-shadow: inset 0 -8px 0 #166534; }
.s5-cardprev { display: grid; justify-items: center; gap: 4px; padding: 20px 16px; border-radius: 16px; border: 1px solid var(--line); text-align: center; }
.s5-cardprev--light { background: #fff; color: #0a0a0a; }
.s5-cardprev--midnight { background: #0a0a0a; color: #fafafa; border-color: #27272a; }
.s5-cardprev--meadow { background: #f0fdf4; color: #052e16; border-color: #bbf7d0; }
.s5-cardprev__av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: currentColor; color: var(--surface); font-weight: 800; font-size: .9rem; position: relative; }
.s5-cardprev__av::after { content: "AO"; position: absolute; color: #fff; mix-blend-mode: difference; }
.s5-cardprev small { opacity: .7; font-size: .8rem; }
.s5-cardprev__links { display: grid; gap: 6px; width: 100%; margin-top: 8px; }
.s5-cardprev__links i { font-style: normal; padding: 8px; border-radius: 10px; border: 1px solid currentColor; opacity: .9; font-size: .82rem; font-weight: 600; }
.s5-cardprev__qr { width: 64px; margin-top: 8px; padding: 4px; border-radius: 8px; background: #fff; color: #0a0a0a; }
.s5-cardprev__qr .qq-qrsvg { width: 100%; height: auto; display: block; }

/* S13: kit tables inside settings sub-panels */
[data-keys] .ap-tpage, [data-hooks] .ap-tpage { gap: 12px; }
[data-keys] .ap-table, [data-hooks] .ap-table { font-size: .84rem; }
[data-keys] .ap-mono, [data-hooks] .ap-mono { font-family: var(--mono); font-size: .76rem; }
.ap-table.hide-prefix .ap-col-prefix, .ap-table.hide-scopes .ap-col-scopes, .ap-table.hide-lastused .ap-col-lastused, .ap-table.hide-events .ap-col-events, .ap-table.hide-delivery .ap-col-delivery { display: none; }
@media (max-width: 1180px) { .s5-brandgrid { grid-template-columns: 1fr; } .s5-preview { position: static; } }
@media (max-width: 640px) {
  .s5-subtabs a { padding: 8px 8px 10px; font-size: .82rem; }
  .s5-subhead { flex-wrap: wrap; }
  .s5-human { max-width: none; }
  [data-keys] .ap-table, [data-hooks] .ap-table { min-width: 0; }
  [data-keys] .ap-tr, [data-hooks] .ap-tr { grid-template-columns: 28px 1fr auto !important; }
  [data-keys] .ap-tpage .ap-tr > .ap-act { width: auto; gap: 8px; opacity: 1; }
  [data-keys] .ap-tpage .ap-tr > .ap-act > [data-key-revoke] { display: inline-block !important; }
  [data-keys] .ap-col-prefix, [data-keys] .ap-col-scopes, [data-keys] .ap-col-created, [data-keys] .ap-col-lastused,
  [data-hooks] .ap-col-events, [data-hooks] .ap-col-delivery { display: none; }
}
