/* ===================================================================
   Guild HQ — Modern Dark Theme
   =================================================================== */

/* ── Reset & Base ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0e18;
  --bg-panel: #131824;
  --bg-elevated: #1c2235;
  --bg-hover: #212843;
  --border: #2a3352;
  --border-light: #374166;
  --gold: #d4943a;
  --gold-light: #f0b554;
  --blue: #4f7cf5;
  --blue-hover: #3a67e8;
  --blue-muted: rgb(79 124 245 / 15%);
  --text: #e8eaf0;
  --text-muted: #8b95b0;
  --text-dim: #535d7a;
  --green: #2ed573;
  --green-bg: rgb(46 213 115 / 12%);
  --red: #ff4757;
  --red-bg: rgb(255 71 87 / 12%);
  --success-bg: rgb(46 213 115 / 10%);
  --success-text: #2ed573;
  --success-border: rgb(46 213 115 / 25%);
  --error-bg: rgb(255 71 87 / 10%);
  --error-text: #ff6b7a;
  --error-border: rgb(255 71 87 / 25%);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgb(0 0 0 / 40%);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 30%);
  --nav-height: 60px;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Navbar ───────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.15em;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.nav-brand:hover {
  color: var(--gold-light);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition:
    color 0.2s,
    background 0.2s;
  font-size: 0.9em;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-username {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 4px;
}

/* ── Page shell ───────────────────────────────────────────────────── */
.page-shell {
  padding-top: calc(var(--nav-height) + 32px);
  padding-bottom: 60px;
  min-height: 100vh;
}

/* ── Container ────────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section header ───────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1em;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgb(79 124 245 / 40%);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8791e);
  color: #fff;
}

.btn-gold:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-gold:hover:not(:disabled) {
  filter: brightness(1.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgb(212 148 58 / 45%);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-light);
}

.btn-danger {
  background: rgb(255 71 87 / 13%);
  color: var(--red);
  border: 1px solid rgb(255 71 87 / 30%);
}

.btn-danger:hover:not(:disabled) {
  background: rgb(255 71 87 / 22%);
  border-color: var(--red);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8em;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 0.95em;
}

.btn-full {
  width: 100%;
}

/* ── Panels ───────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-body {
  padding: 22px;
}

/* ── Forms ────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95em;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-group input::placeholder,
.form-control::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(79 124 245 / 15%);
}

.form-group input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ── Messages ─────────────────────────────────────────────────────── */
.msg-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-weight: 500;
  font-size: 0.88em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.msg-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-weight: 500;
  font-size: 0.88em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* ── Badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-need {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgb(255 71 87 / 25%);
}

.badge-owned {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgb(46 213 115 / 25%);
}

.badge-admin {
  background: rgb(212 148 58 / 15%);
  color: var(--gold);
  border: 1px solid rgb(212 148 58 / 30%);
}

/* ── Table ────────────────────────────────────────────────────────── */
.builds-table {
  width: 100%;
  border-collapse: collapse;
}

.builds-table thead tr {
  border-bottom: 1px solid var(--border);
}

.builds-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.builds-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9em;
  vertical-align: middle;
  white-space: nowrap;
}

.builds-table td.td-weapon {
  white-space: normal;
  min-width: 100px;
  max-width: 160px;
  font-weight: 600;
  font-size: 0.85em;
  line-height: 1.35;
}

.builds-table td.td-weapon-need {
  background: var(--red-bg) !important;
  color: var(--red);
  border-left: 2px solid rgb(255 71 87 / 40%);
}

.builds-table td.td-weapon-owned {
  background: var(--green-bg) !important;
  color: var(--green);
  border-left: 2px solid rgb(46 213 115 / 40%);
}

.builds-table tbody tr:last-child td {
  border-bottom: none;
}

.builds-table tbody tr:hover td {
  background: rgb(255 255 255 / 2.5%);
}

.td-character {
  font-weight: 700;
}

.td-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 0.82em;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--blue-muted);
  border: 1px solid rgb(79 124 245 / 25%);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
}

.td-link a:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.td-date {
  color: var(--text-dim);
  font-size: 0.82em;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5em;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9em;
}

/* ── Preview panel ────────────────────────────────────────────────── */
.preview-card {
  border-color: rgb(212 148 58 / 35%);
  border-top: 3px solid var(--gold);
}

.preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.preview-field {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.preview-field-label {
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.preview-field-value {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95em;
}

.preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.preview-actions .btn {
  flex: 1;
}

/* ── Weapon checkboxes ────────────────────────────────────────────── */
.weapon-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weapon-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  user-select: none;
}

.weapon-check-item:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.weapon-check-item.weapon-check-need {
  background: var(--red-bg);
  border-color: rgb(255 71 87 / 30%);
}

.weapon-check-item.weapon-check-need:hover {
  background: rgb(255 71 87 / 18%);
  border-color: var(--red);
}

.weapon-check-item.weapon-check-owned {
  background: var(--green-bg);
  border-color: rgb(46 213 115 / 30%);
}

.weapon-check-item.weapon-check-owned:hover {
  background: rgb(46 213 115 / 18%);
  border-color: var(--green);
}

.weapon-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}

.weapon-check-name {
  font-weight: 600;
  font-size: 0.92em;
  color: var(--text);
}

.weapon-check-hint {
  font-size: 0.8em;
  color: var(--text-dim);
  margin-left: auto;
}

/* ── Guild cards ──────────────────────────────────────────────────── */
.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.guild-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition:
    border-color 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guild-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.guild-card-name {
  font-size: 1.05em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.guild-card-url {
  font-size: 0.75em;
  color: var(--text-dim);
  font-family: "SF Mono", "Fira Code", monospace;
  word-break: break-all;
}

.guild-card-actions {
  display: flex;
  gap: 8px;
}

/* ── Auth ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-logo {
  font-size: 1.4em;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 28px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.auth-logo:hover {
  color: var(--gold-light);
}

.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.45em;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.88em;
  margin-bottom: 28px;
}

.auth-divider {
  text-align: center;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.85em;
}

/* stylelint-disable-next-line no-descending-specificity */
.auth-divider a {
  color: var(--blue);
  font-weight: 600;
}

.invite-notice {
  background: rgb(212 148 58 / 8%);
  border: 1px solid rgb(212 148 58 / 25%);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 20px;
  font-size: 0.87em;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Index / Hero ─────────────────────────────────────────────────── */
.hero-section {
  text-align: center;
  padding: 70px 24px 56px;
  max-width: 680px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 2.8em;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 60%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 1.05em;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 0 24px 64px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.7em;
  margin-bottom: 10px;
  display: block;
}

.feature-card h3 {
  font-size: 0.95em;
  margin-bottom: 7px;
}

.feature-card p {
  font-size: 0.87em;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Dashboard ────────────────────────────────────────────────────── */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.dash-greeting {
  font-size: 1.5em;
  font-weight: 800;
}

.dash-greeting span {
  color: var(--gold);
}

/* ── Guild sub-nav ────────────────────────────────────────────────── */
.page-shell-guild {
  padding-top: var(--nav-height);
}

.guild-subnav {
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.guild-subnav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guild-subnav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.guild-subnav-title {
  font-size: 1.05em;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-subnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Admin panel ──────────────────────────────────────────────────── */

/* ── Admin disclosure (collapsible) ──────────────────────────────── */
.admin-disclosure {
  margin-top: 20px;
}

.admin-disclosure-toggle {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  background: rgb(212 148 58 / 6%);
  border: 1px solid rgb(212 148 58 / 20%);
  border-radius: var(--radius);
  font-size: 0.8em;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s;
  user-select: none;
}

.admin-disclosure-toggle::after {
  content: "›";
  margin-left: auto;
  font-size: 1.1em;
  transition: transform 0.2s;
  display: inline-block;
}

.admin-disclosure-open .admin-disclosure-toggle::after {
  transform: rotate(90deg);
}

.admin-disclosure-toggle:hover {
  background: rgb(212 148 58 / 10%);
}

.admin-disclosure-open .admin-disclosure-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: rgb(212 148 58 / 12%);
}

.admin-disclosure-body {
  padding: 18px 20px;
  background: rgb(212 148 58 / 3%);
  border: 1px solid rgb(212 148 58 / 20%);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.invite-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.invite-generating {
  color: var(--text-muted);
  font-size: 0.88em;
  margin-top: 14px;
}

/* ── Utility ──────────────────────────────────────────────────────── */
.text-default {
  color: var(--text);
}

.text-gold {
  color: var(--gold);
}

.btn-mt {
  margin-top: 8px;
}

.panel-mb {
  margin-bottom: 28px;
}

/* ── Component helpers ────────────────────────────────────────────── */
.preview-card-flush {
  margin-bottom: 0;
}

.weapon-selection-label {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ── Role selector ────────────────────────────────────────────────── */
.role-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  flex: 1;
  justify-content: center;
}

.role-option input[type='radio'] {
  display: none;
}

.role-option:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.role-option-active {
  background: var(--blue-muted);
  border-color: var(--blue);
  color: var(--blue);
}

.role-option-icon {
  font-size: 1.1em;
}

/* ── Role badge (in table) ────────────────────────────────────────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.03em;
}

.role-badge-healer {
  background: rgb(46 213 115 / 12%);
  color: var(--green);
  border: 1px solid rgb(46 213 115 / 30%);
}

.role-badge-dps {
  background: rgb(255 71 87 / 10%);
  color: var(--red);
  border: 1px solid rgb(255 71 87 / 25%);
}

.role-badge-tank {
  background: rgb(79 124 245 / 15%);
  color: var(--blue);
  border: 1px solid rgb(79 124 245 / 30%);
}

.td-empty {
  color: var(--text-dim);
}

.builds-count {
  font-size: 0.82em;
  color: var(--text-dim);
  font-weight: 700;
}

/* ── Build Filters ────────────────────────────────────────────────── */
.builds-filter {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builds-filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.builds-filter-inputs {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.builds-filter-input {
  flex: 1;
  min-width: 160px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875em;
}

.builds-filter-input:focus {
  outline: none;
  border-color: var(--blue);
}

.builds-filter-weapon-toggle {
  display: flex;
  align-items: center;
}

.btn-weapon-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.btn-weapon-filter-toggle:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.btn-weapon-filter-toggle-active {
  background: var(--blue-muted);
  border-color: var(--blue);
  color: var(--blue);
}

.weapon-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.75em;
  font-weight: 700;
}

.weapon-filter-chevron {
  font-size: 0.65em;
  opacity: 0.7;
}

.builds-filter-weapons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weapon-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.weapon-filter-chip input[type='checkbox'] {
  display: none;
}

.weapon-filter-chip:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.weapon-filter-chip-active {
  background: var(--blue-muted);
  border-color: var(--blue);
  color: var(--blue);
}

.admin-invite-desc {
  font-size: 0.88em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.auth-divider-spaced {
  margin-top: 16px;
}

.invite-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82em;
  font-family: "SF Mono", "Fira Code", monospace;
}

/* ── Not found state ──────────────────────────────────────────────── */
.not-found-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  max-width: 420px;
  margin: 0 auto;
}

.not-found-icon {
  font-size: 3em;
  margin-bottom: 20px;
  opacity: 0.5;
}

.not-found-state h1 {
  font-size: 1.6em;
  margin-bottom: 10px;
}

.not-found-state p {
  color: var(--text-muted);
  font-size: 0.93em;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ── Invite acceptance page ───────────────────────────────────────── */
.invite-status-icon {
  font-size: 2.2em;
  margin-bottom: 12px;
  display: block;
  text-align: center;
  opacity: 0.75;
}

.invite-status-gold {
  opacity: 1;
}

.invite-accept-meta {
  text-align: center;
  font-size: 0.88em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.invite-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Divider ──────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Delete confirmation modal ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 65%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: modal-fade-in 0.15s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-dialog {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--red);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  animation: modal-slide-in 0.15s ease;
}

.modal-dialog-gold {
  border-top-color: var(--gold);
}

@keyframes modal-slide-in {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 1.15em;
  font-weight: 800;
  color: var(--text);
}

.modal-body {
  padding: 14px 24px 20px;
  color: var(--text-muted);
  font-size: 0.93em;
  line-height: 1.6;
}

.modal-body strong {
  color: var(--text);
  font-weight: 700;
}

.modal-warning {
  margin-top: 8px;
  font-size: 0.82em;
  color: var(--text-dim);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (width <=640px) {
  .preview-meta {
    grid-template-columns: 1fr;
  }

  .hero-section h1 {
    font-size: 2em;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .guild-subnav-inner {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .btn {
    width: 100%;
  }

  .auth-card {
    padding: 24px;
  }

  .preview-actions {
    flex-direction: column;
  }

  .builds-table th,
  .builds-table td {
    padding: 9px 10px;
  }

  .nav-right .btn-sm {
    display: none;
  }
}
