@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #080a0f;
  --bg2: #0e1118;
  --surface: rgba(18, 22, 32, 0.72);
  --surface2: rgba(26, 32, 48, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --text: #f0f3fa;
  --muted: #8b95ad;
  --accent: #7c6cff;
  --accent2: #a89bff;
  --accent-glow: rgba(124, 108, 255, 0.35);
  --ok: #2dd4a8;
  --warn: #fbbf24;
  --err: #f87171;
  --discord: #5865f2;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --control-h: 42px;
}

* { box-sizing: border-box; }

*::selection {
  background: rgba(124, 108, 255, 0.32);
  color: #fff;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 108, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(88, 101, 242, 0.12), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }
.view { min-height: 100vh; }

/* Login */
.login-card {
  max-width: 420px;
  margin: 7vh auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand { text-align: center; margin-bottom: 1.5rem; }
.logo {
  width: 58px; height: 58px; margin: 0 auto .75rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #5b4fd4);
  border-radius: 16px; font-size: 1.5rem;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.brand h1 { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.brand p { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; }

.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; background: var(--bg2); padding: .25rem; border-radius: 12px; }
.tab {
  flex: 1; padding: .55rem; border: none;
  background: transparent; color: var(--muted);
  border-radius: 9px; cursor: pointer; font-weight: 500; font-family: inherit;
}
.tab.active { background: var(--surface2); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.25); }

label { display: block; margin: .65rem 0 .3rem; color: var(--muted); font-size: .8rem; font-weight: 500; }
input, textarea, select {
  width: 100%; padding: .62rem .8rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(14, 17, 24, 0.72);
  color: var(--text);
  font-family: inherit;
  font-size: .88rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color-scheme: dark;
}
input, select { height: var(--control-h); }
textarea { padding: .7rem .85rem; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  background: rgba(14, 17, 24, 0.86);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
input:hover, textarea:hover, select:hover {
  border-color: var(--border2);
}
textarea { resize: vertical; min-height: 80px; font-size: .85rem; }
code { font-size: .78rem; color: var(--muted); background: var(--bg2); padding: .1rem .35rem; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .62rem 1rem;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-weight: 600; font-size: .88rem; font-family: inherit;
  text-decoration: none; transition: transform .12s, filter .12s, box-shadow .14s, border-color .14s;
}
a.btn { text-align: center; }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #6554e8);
  color: #fff;
  width: 100%;
  margin-top: .75rem;
  box-shadow: 0 10px 28px rgba(124, 108, 255, 0.18), 0 4px 16px var(--accent-glow);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn.discord { background: var(--discord); color: #fff; width: 100%; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.danger { background: var(--err); color: #fff; }
.btn.small { padding: .38rem .65rem; font-size: .78rem; border-radius: 8px; }
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* Panel context: buttons not full-width by default */
.content .btn {
  width: auto !important;
  margin-top: 0 !important;
}
.content .btn.primary {
  height: 38px;
  padding: .52rem .95rem;
  box-shadow: 0 14px 34px rgba(124, 108, 255, 0.20), 0 0 0 1px rgba(124, 108, 255, 0.22) inset;
}
.content .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border2);
  color: var(--text);
}
.content .btn.small { height: 30px; padding: .35rem .65rem; }

.divider { text-align: center; color: var(--muted); margin: 1rem 0; font-size: .78rem; }

.alert {
  padding: .65rem .85rem; border-radius: var(--radius-sm); margin-bottom: .75rem;
  background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca;
  font-size: .85rem;
}

/* Dashboard shell */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.88); backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: .45rem; }
.topbar-left strong { font-weight: 700; letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: .75rem; font-size: .88rem; color: var(--muted); }
.badge {
  margin-left: .5rem; padding: .18rem .55rem; border-radius: 999px;
  background: rgba(124, 108, 255, 0.15); color: var(--accent2); font-size: .72rem; font-weight: 600;
}

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 53px); }
.sidebar {
  border-right: 1px solid var(--border);
  padding: 1rem .65rem;
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.82), rgba(12, 14, 20, 0.56));
  position: sticky;
  top: 53px;
  height: calc(100vh - 53px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.nav-btn {
  display: block; width: 100%; text-align: left;
  padding: .6rem .82rem; margin-bottom: .28rem;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: .88rem; font-weight: 500;
  transition: background .12s, color .12s, border-color .12s;
  border: 1px solid transparent;
}
.nav-btn.active {
  background: linear-gradient(100deg, rgba(124, 108, 255, 0.2), rgba(124, 108, 255, 0.04));
  color: var(--text);
  border-color: rgba(124, 108, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.18);
}
.nav-btn:hover:not(.active) { background: var(--surface2); color: var(--text); }
.nav-btn:focus-visible { outline: 2px solid var(--accent2); outline-offset: 1px; }

.content { padding: 1.4rem 1.7rem 2.4rem; max-width: 1180px; width: 100%; }
.section-title { margin: 0 0 1rem; font-size: 1.24rem; font-weight: 700; letter-spacing: -0.02em; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.card h3 { margin: 0 0 .35rem; font-size: .79rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.card .stat { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.03em; }
.card .sub { color: var(--muted); font-size: .8rem; margin-top: .2rem; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: .7rem .85rem; border-bottom: 1px solid var(--border); text-align: left; }
th { background: rgba(255,255,255,.03); color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.01); }

.guild-row { display: flex; align-items: center; gap: .75rem; }
.guild-row img { width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); }

.form-grid { display: grid; gap: .75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.toggle-row { display: flex; align-items: center; gap: .5rem; }
.toggle-row input { width: auto; }

.pill { display: inline-block; padding: .12rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.pill.ok { background: rgba(45, 212, 168, 0.15); color: var(--ok); }
.pill.warn { background: rgba(251, 191, 36, 0.15); color: var(--warn); }

/* Guild config panel */
.guild-config { animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

.gc-loading { color: var(--muted); padding: 2rem; text-align: center; }

.gc-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem; padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(124, 108, 255, 0.14), var(--surface));
  border: 1px solid var(--border);
  border-left: 4px solid rgba(124, 108, 255, 0.6);
  border-radius: var(--radius); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.gc-header-main { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.gc-icon { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
.gc-icon.ph {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--surface2), var(--bg2));
  border: 1px solid var(--border);
  font-size: 1.1rem; font-weight: 700; color: var(--accent2);
}

.status-dot {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.status-dot.on { background: rgba(45, 212, 168, 0.12); color: var(--ok); }
.status-dot.off { background: rgba(248, 113, 113, 0.1); color: var(--err); }

.gc-header h2 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-header p { margin: .25rem 0 0; font-size: .82rem; color: var(--muted); }
.gc-switch { max-width: 220px; margin: 0; }

.cfg-tabs {
  display: flex; gap: .35rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding: .3rem;
  background: var(--bg2); border-radius: 12px; border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.cfg-tab {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .85rem; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  letter-spacing: 0.01em;
  transition: all .12s;
  border: 1px solid transparent;
}
.ui-ico {
  display: block;
  flex-shrink: 0;
  color: var(--muted);
  transition: color .12s;
}
.ui-ico-tab {
  width: 1.05rem;
  height: 1.05rem;
}
.ui-ico-block {
  width: .95rem;
  height: .95rem;
  padding: .15rem;
  border-radius: 5px;
  background: rgba(124, 108, 255, 0.1);
  color: var(--accent2);
}
.cfg-tab.active .ui-ico-tab { color: var(--accent2); }
.cfg-tab:hover .ui-ico-tab { color: var(--text); }

.tab-label { line-height: 1.2; }

.cfg-tab.active {
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.26), rgba(124, 108, 255, 0.08));
  color: var(--text);
  box-shadow:
    0 14px 30px rgba(124, 108, 255, 0.12),
    0 0 0 1px rgba(124, 108, 255, 0.35) inset;
  border: 1px solid rgba(124, 108, 255, 0.35);
}
.cfg-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
}

.cfg-panels {
  min-height: 240px;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid var(--border);
}
.cfg-panel { display: none; }
.cfg-panel.active { display: block; animation: fadeUp .2s ease; }

.cfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem 1.05rem;
}
.cfg-block {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.cfg-block h4 {
  display: flex; align-items: center; gap: .4rem;
  margin: 0 0 .6rem; font-size: .82rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.field label { margin-top: 0; }
.hint { display: block; margin-top: .25rem; color: var(--muted); font-size: .75rem; }

/* Toggle switch */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .65rem .75rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.switch-row:hover { border-color: var(--border2); background: var(--surface2); }
.switch-meta { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.switch-meta strong { font-size: .9rem; font-weight: 650; letter-spacing: -0.01em; }
.switch-meta small { font-size: .75rem; color: var(--muted); }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--border2);
  transition: background .2s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 2px; top: 2px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.75));
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
  transition: transform .2s;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* Role chips */
.role-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.role-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .65rem; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: .78rem; cursor: pointer; user-select: none;
  transition: all .12s;
  color: var(--text);
  font-family: inherit;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
}
.role-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.role-chip.on { background: rgba(124, 108, 255, 0.2); border-color: var(--accent); color: var(--accent2); }
.role-chip.static { cursor: default; pointer-events: none; }
.role-empty { margin: 0; }

.role-create-card { margin-bottom: 0; }
.color-input {
  padding: .25rem;
  height: 42px;
  cursor: pointer;
}

.role-relative-wrap { margin-top: .5rem; }
.role-position-row { margin-bottom: 0; }

.modmail-pick-list { max-height: 200px; overflow-y: auto; margin-top: .5rem; }

.perm-picker { margin-top: .5rem; }
.perm-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}
.perm-presets .btn { margin: 0; padding: .4rem .75rem; font-size: .8rem; }
.perm-groups {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: .25rem;
}
.perm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .45rem;
  font-size: .82rem;
  color: var(--muted);
}
.perm-group-actions { display: flex; gap: .5rem; }
.perm-link-btn {
  background: none;
  border: none;
  color: var(--accent2);
  font-size: .75rem;
  cursor: pointer;
  padding: 0;
}
.perm-link-btn:hover { text-decoration: underline; }
.perm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.perm-chip {
  padding: .28rem .55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: .72rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.perm-chip:hover { border-color: var(--border2); color: var(--text); }
.perm-chip.on {
  background: rgba(124, 108, 255, 0.18);
  border-color: var(--accent);
  color: var(--accent2);
}

.members-layout { display: flex; flex-direction: column; gap: 1rem; }
.members-search label { margin-top: 0; }
.members-body {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1rem;
  align-items: start;
}
.members-col-title {
  margin: 0 0 .5rem;
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.member-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 420px;
  overflow-y: auto;
}
.member-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  transition: border-color .12s, background .12s;
}
.member-row img { border-radius: 50%; flex-shrink: 0; background: var(--bg2); }
.member-row:hover { border-color: var(--border2); background: var(--surface2); }
.member-row.active { border-color: var(--accent); background: rgba(124, 108, 255, 0.08); }
.member-profile { display: flex; gap: 1rem; align-items: flex-start; }
.member-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  flex-shrink: 0;
  background: var(--bg2);
}
.member-profile h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.member-meta { margin: .2rem 0; font-size: .82rem; color: var(--muted); }
.members-detail-col { min-height: 280px; }

.gc-overview { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }

.cfg-tabs.scroll-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}
.cfg-tabs.scroll-tabs .cfg-tab { white-space: nowrap; flex-shrink: 0; }

.muted-inline { color: var(--muted); font-size: .85rem; margin: 0 0 1rem; }
.table-wrap.compact table { font-size: .8rem; }
.custom-resp { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.custom-add { margin-bottom: 1rem; align-items: end; }

.tools-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-card .sub { margin-top: .25rem; }
.inline-actions { margin-top: 1rem; }

.gc-savebar {
  position: sticky; bottom: 0; margin-top: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem;
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.92), rgba(12, 14, 20, 0.98));
  border: 1px solid rgba(124, 108, 255, 0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: 0 -18px 40px rgba(0,0,0,.35);
}
.gc-save-hint { font-size: .8rem; color: var(--muted); }
.gc-savebar .btn.primary { width: auto; margin: 0; min-width: 140px; }

.toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 100;
  padding: .75rem 1.1rem; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-size: .88rem;
  animation: fadeUp .2s ease;
  max-width: min(92vw, 440px);
}
.toast.ok { border-color: rgba(45, 212, 168, 0.4); }
.toast.err { border-color: rgba(248, 113, 113, 0.4); }

.link-home { color: var(--accent2); text-decoration: none; font-weight: 500; }
.link-home:hover { text-decoration: underline; }

.login-legal {
  text-align: center;
  margin: 1.25rem auto 0;
  max-width: 420px;
  font-size: .75rem;
  color: var(--muted);
}

.login-legal a {
  color: var(--muted);
  text-decoration: none;
}

.login-legal a:hover { color: var(--accent2); }

.status-dot.warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }

.section-subtitle {
  margin: 2.5rem 0 .75rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-hint {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

.page-hint a { color: var(--accent2); }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent2);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: var(--text); }

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 2rem !important;
  font-size: .9rem;
}

.muted-inline { color: var(--muted); font-size: .82rem; }

.topbar-home {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  margin-right: .35rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #5b4fd4);
  text-decoration: none;
  font-size: .95rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.badge.tier { margin-left: .35rem; font-size: .72rem; }
.badge.tier-pro { background: rgba(45, 212, 168, 0.15); color: var(--ok); }
.badge.tier-free { background: rgba(251, 191, 36, 0.12); color: var(--warn); }

.upgrade-inline {
  margin: .35rem 0 0;
  font-size: .82rem;
  color: var(--muted);
}
.upgrade-inline a { color: var(--accent2); }

.gc-admin-warn {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--warn);
  font-size: .88rem;
  line-height: 1.5;
}

.gc-admin-warn a { color: var(--accent2); font-weight: 600; }

.card-hint { margin: .5rem 0 0; font-size: .8rem; }
.card-hint a { color: var(--accent2); }

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    display: flex; overflow-x: auto; border-right: none;
    border-bottom: 1px solid var(--border); padding: .5rem;
    position: static;
    height: auto;
  }
  .nav-btn { width: auto; white-space: nowrap; }
  .content { padding: 1rem 1rem 1.6rem; }
  .gc-header { flex-direction: column; align-items: stretch; }
  .gc-switch { max-width: none; }
  .cfg-grid { grid-template-columns: 1fr; }
  .members-body { grid-template-columns: 1fr; }
  .gc-savebar { flex-direction: column; align-items: stretch; }
  .gc-savebar .btn.primary { width: 100%; }
  th { position: static; }
}
