:root{color-scheme:light;--bg:#f3f6f4;--card:#fff;--ink:#192d22;--muted:#52675c;--line:#cbd7d0;--accent:#147a51;--blue:#246bc2;--surface:#f4f7f5;--selection:#dcefe2}
.brand-mark{display:grid;place-items:center;flex-shrink:0;width:34px;height:36px;border:2px solid var(--accent);color:var(--accent);border-radius:11px 3px 11px 3px;font:700 22px system-ui}
@media(max-width:600px){.brand-mark{width:27px;height:30px;font-size:18px}}
:root[data-theme=dark]{color-scheme:dark;--bg:#0c1214;--card:#131b1e;--ink:#e6eff0;--muted:#86969d;--line:#273238;--accent:#67dfb3;--blue:#72a8ee;--surface:#0e171b;--selection:#244338}
.theme-switch{display:flex;flex:0 0 auto;align-items:center;gap:2px;border:1px solid var(--line);border-radius:7px;padding:3px;background:var(--surface)}
.theme-switch button{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;border-radius:4px;background:transparent}
.theme-switch img{width:19px;height:19px}.theme-switch button[aria-pressed="true"]{background:var(--selection)}
[data-theme="dark"] .theme-switch img{filter:invert(1)}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.7 "Malgun Gothic",system-ui,sans-serif}a{color:var(--accent);text-underline-offset:4px}button,input,select{font:inherit;color:var(--ink)}button,input,select{border:1px solid var(--line);border-radius:6px;background:var(--card);padding:8px 12px}button{cursor:pointer;white-space:nowrap}button:disabled{opacity:.45;cursor:default}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.admin-top{background:var(--card);border-bottom:1px solid var(--line)}.admin-top-inner,main{max-width:1280px;margin:auto;padding:20px 24px}.brand-row,.actions,.heading,.controls{display:flex;align-items:center;gap:12px}.brand-row,.heading{justify-content:space-between}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:18px;font-weight:700}.brand img{width:40px;height:40px}.brand small{display:block;font-size:12px;font-weight:400;color:var(--muted)}.actions{flex-wrap:wrap;justify-content:flex-end}nav{display:flex;gap:24px;margin-top:18px;overflow-x:auto;white-space:nowrap}nav a{text-decoration:none}.controls{flex-wrap:wrap;align-items:flex-end}.controls label{display:flex;flex-direction:column;gap:4px}input{width:300px;max-width:100%}h1{font-size:26px;margin:16px 0}h2{font-size:20px;margin:0}h3{font-size:16px;margin:24px 0 12px}section{scroll-margin-top:20px;margin:24px 0;padding:24px;background:var(--card);border:1px solid var(--line);border-radius:10px}.heading{flex-wrap:wrap;margin-bottom:16px}.note{color:var(--muted);font-size:13px}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th,td{border-bottom:1px solid var(--line);padding:10px 12px;white-space:nowrap}th{background:var(--bg);font-weight:600}td{max-width:420px;overflow:hidden;text-overflow:ellipsis}.pagination{margin-top:16px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stat-card{padding:18px 20px;border:1px solid var(--line);border-radius:8px}.stat-card span{display:block;color:var(--muted)}.stat-card strong{font-size:30px;font-weight:700}.stat-card:first-child strong{color:var(--accent)}.trend{min-height:220px}.trend svg{width:100%;height:auto;display:block}.legend{display:flex;gap:20px;font-size:13px}.legend span:before{content:"";display:inline-block;width:18px;height:3px;background:var(--accent);margin-right:6px;vertical-align:middle}.legend span+span:before{background:var(--blue)}summary{cursor:pointer;color:var(--muted)}#adminStatus{overflow-wrap:anywhere}main{padding-bottom:64px}
@media(max-width:640px){.admin-top-inner,main{padding:16px}.brand-row{align-items:flex-start;flex-direction:column}.actions{justify-content:flex-start}section{padding:16px}.stat-grid{grid-template-columns:1fr}.stat-card{padding:12px 16px}.stat-card strong{font-size:26px}.controls label{max-width:100%}nav{gap:18px}.trend{min-height:140px}}

.member-tier{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.member-tier select{font:inherit;padding:5px 8px}.member-tier button{padding:5px 8px}.member-tier [role="status"]{font-size:11px}

/* Keep editable controls large enough to avoid mobile focus zoom. */
@media (max-width: 650px), (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

.chart-access-table{min-width:680px}.chart-access-table td{white-space:normal;vertical-align:top;max-width:none;overflow:visible}.chart-access-table th:first-child{width:150px}.chart-access-table td:nth-child(2){width:58%}.access-all{display:flex;gap:8px;align-items:center;font-weight:700}.access-all input{width:auto}.access-chips{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.access-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 7px;background:var(--surface);border:1px solid var(--line);border-radius:6px;font-size:12px}.access-chip button{padding:0 5px;border:0;background:transparent;font-size:18px}.access-add{display:flex;gap:6px;align-items:center}.access-add select{min-width:0;max-width:320px;width:100%}.access-add button{flex-shrink:0}
.table-scroll .chart-access-table { min-width: 1080px; }
.table-scroll .chart-access-table td:nth-child(2) { width: 36%; }
.table-scroll .chart-access-table td:nth-child(4) { min-width: 240px; }
