/* ============================================================
   GuildPlan — Design System
   Dark WoW UI theme with gold accents
   ============================================================ */

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

[hidden] { display: none !important; }

:root {
  --bg:           #0a0c12;
  --surface:      #111520;
  --surface-alt:  #161b2e;
  --border:       #252b40;
  --border-light: #2e3550;

  --gold:         #c8a951;
  --gold-bright:  #f0d080;
  --gold-dim:     #7a6330;

  --text:         #ddd5c0;
  --text-muted:   #767060;

  --success-bg:   #162e1a;
  --success-bdr:  #1e4a22;
  --success-text: #5cb87a;

  --danger-bg:    #2e1616;
  --danger-bdr:   #4a1e1e;
  --danger-text:  #e05555;

  --font-heading: 'Cinzel', Georgia, serif;
  --font-body:    'Open Sans', system-ui, sans-serif;

  --radius:       4px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.6);
  --transition:   0.18s ease;

  --header-h:     60px;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--gold);
  line-height: 1.2;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--gold-bright); }

/* === Layout — App Shell === */
.app-shell {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 280px minmax(0, 1440px);
  justify-content: center;
  align-items: start;
  background: var(--bg);
  overflow-y: auto;
}

.app-shell--full {
  min-height: 100vh;
}

.app-panel {
  background: var(--bg);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  justify-content: center;
  min-height: 100%;
}

.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 102px;
  align-self: start;
  height: fit-content;
  margin-top: 102px;
  margin-left: 30px;
  margin-right: 30px;
}

.app-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.app-sidebar__nav-label {
  display: block;
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 10px 20px 4px;
  margin-top: 10px;
}

.app-sidebar__nav-item {
  display: block;
  padding: 8px 20px 8px 17px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar__nav-item:hover {
  color: var(--text);
  background-color: rgba(200, 169, 81, 0.05);
}

.app-sidebar__nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background-color: rgba(200, 169, 81, 0.08);
}

.app-sidebar__footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  flex-shrink: 0;
}

.app-content {
  width: 100%;
  padding: 32px 30px;
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
}

.app-content--fill {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* === Page === */
.page__header {
  margin-bottom: 28px;
}

.page__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page__title {
  font-size: 1.8rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.page__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === Card === */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card--sm {
  max-width: 560px;
}

/* === Forms === */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 7px;
}

.form-control {
  display: block;
  width: 100%;
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 13px;
  transition: border-color var(--transition);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  border-color: var(--gold-dim);
}

/* === form-input (alias of form-control, used in admin forms) === */
.form-input {
  display: inline-block;
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 13px;
  transition: border-color var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--gold-dim);
}

.form-input--sm {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.form-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(to bottom, var(--gold), var(--gold-dim));
  color: #120e00;
  border-color: var(--gold-dim);
}
.btn--primary:hover {
  background: linear-gradient(to bottom, var(--gold-bright), var(--gold));
  color: #120e00;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn--ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 0.75rem;
}

.btn--full {
  width: 100%;
  margin-top: 6px;
}

/* === Alerts === */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.alert--danger {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-bdr);
  color: var(--danger-text);
}

.alert--success {
  background-color: var(--success-bg);
  border: 1px solid var(--success-bdr);
  color: var(--success-text);
}

/* === Guild Table === */
.guild-table {
  width: 100%;
  border-collapse: collapse;
}

.col--shrink { width: 1%; white-space: nowrap; }

/* Roster table column widths */
.roster-table th:nth-child(1),
.roster-table td:nth-child(1) { width: 20%; }
.roster-table th:nth-child(2),
.roster-table td:nth-child(2) { width: 8%; }
.roster-table th:nth-child(3),
.roster-table td:nth-child(3) { width: 30%; }
.roster-table th:nth-child(4),
.roster-table td:nth-child(4) { width: 42%; }

.guild-table th {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.guild-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

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

.boss-row--separator td {
  padding-top: 30px;
  border-top: 2px solid var(--border);
}

/* === Boss cards === */
.boss-card {
  border-top: 1px solid var(--border);
}

.boss-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.boss-card__header:hover {
  background: rgba(255,255,255,0.02);
}

.boss-card__chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.boss-card__chevron--up {
  transform: rotate(-180deg);
}

.boss-card__num {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 18px;
  flex-shrink: 0;
  text-align: right;
}

.boss-card__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.boss-card__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.boss-card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.boss-card__actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.boss-card__body {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.boss-card__body--collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.boss-card__edit {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.guild-table tbody tr:hover td {
  background-color: var(--surface-alt);
}


.guild-table .col-actions {
  white-space: nowrap;
}

/* === Empty state === */
.empty-state {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-style: italic;
  margin: 0;
}

/* === Utility === */
.text-muted { color: var(--text-muted); }
.text-gold  { color: var(--gold); }

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(ellipse at 50% 40%, #161b2e 0%, var(--bg) 70%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 620px;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo h1 {
  font-size: 1.7rem;
  letter-spacing: 0.1em;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   Guild Public Page
   ============================================================ */
.guild-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(ellipse at 50% 40%, #161b2e 0%, var(--bg) 70%);
  text-align: center;
  padding: 24px;
}

.guild-page__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.guild-page__server {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.guild-page__name {
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.1em;
}

.guild-page__badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   404 Page
   ============================================================ */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.error-page__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.error-page__code {
  font-family: var(--font-heading);
  font-size: 7rem;
  color: var(--gold-dim);
  opacity: 0.25;
  line-height: 1;
}

.error-page__title {
  font-size: 1.5rem;
}

.error-page__message {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.error-page__btn {
  margin-top: 20px;
}

/* ============================================================
   Discord Button
   ============================================================ */
:root {
  --battlenet: #0074E0;
  --battlenet-hover: #005ec2;
}

.btn--battlenet {
  background-color: var(--battlenet);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
.btn--battlenet:hover {
  background-color: var(--battlenet-hover);
  color: #fff;
}
.btn--battlenet .btn__icon {
  filter: brightness(0) invert(1);
}

.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn__icon {
  width: 2.2em;
  height: 2.2em;
  flex-shrink: 0;
  object-fit: contain;
}

/* ============================================================
   Region Selector
   ============================================================ */
.region-selector {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.region-chip {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.region-chip:hover {
  border-color: var(--gold-dim);
  background: var(--surface-alt);
  color: var(--text);
}

.region-chip--active {
  border-color: var(--gold);
  background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--gold-dim);
}

.region-chip--active .region-chip__name {
  color: var(--gold);
}

.region-chip__flag {
  width: 18px;
  height: 14px;
  object-fit: cover;
  border-radius: 1px;
  display: block;
  flex-shrink: 0;
}

.region-chip__name {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

/* ============================================================
   Landing Page
   ============================================================ */
.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 100px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(22, 27, 46, 0.9) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(200, 169, 81, 0.06) 0%, transparent 70%),
    var(--bg);
}

.hero__inner {
  max-width: 660px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.hero__subtitle {
  max-width: 500px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero__alert {
  width: 100%;
  max-width: 400px;
  margin: 0;
}

.hero__cta-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -6px;
}

/* Features */
.features {
  padding: 80px 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
}

.features__title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 48px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--gold-dim); }

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card__title {
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.feature-card__body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   App Header — sticky top bar on all app pages
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background-color: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.app-header__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header__greeting {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-right: 4px;
}
.app-header__brand {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.app-header__brand:hover { color: var(--gold-bright); }

/* Landing footer */
.landing-footer {
  text-align: center;
  padding: 28px 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   User Dashboard
   ============================================================ */
/* === WoW Class Colors === */
.wow-class-druid    { color: #FF7C0A !important; }
.wow-class-hunter   { color: #AAD372 !important; }
.wow-class-mage     { color: #3FC7EB !important; }
.wow-class-paladin  { color: #F48CBA !important; }
.wow-class-priest   { color: #FFFFFF !important; }
.wow-class-rogue    { color: #FFF468 !important; }
.wow-class-shaman   { color: #0070DD !important; }
.wow-class-warlock  { color: #8788EE !important; }
.wow-class-warrior  { color: #C69B6D !important; }
.coming-soon-card {
  max-width: 480px;
  text-align: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.coming-soon-card__icon {
  font-size: 2.5rem;
}

.coming-soon-card__title {
  font-size: 1.1rem;
}

.coming-soon-card__body {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* User guilds section */
.user-guilds {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-guilds__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-guilds__title {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

/* Danger button */
.btn--danger {
  background: linear-gradient(to bottom, #c0392b, #922b21);
  color: #fff;
  border-color: #7b241c;
}
.btn--danger:hover {
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  color: #fff;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}

.modal__title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.modal__body {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal__body strong {
  color: var(--text);
}

.modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  align-items: center;
}

/* ============================================================
   Guild Management
   ============================================================ */
.manage-section__title {
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin: 0;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge--approved {
  background-color: var(--success-bg);
  border: 1px solid var(--success-bdr);
  color: var(--success-text);
}

/* Generic badges (game version toggles, etc.) */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge--active {
  background-color: var(--success-bg);
  border: 1px solid var(--success-bdr);
  color: var(--success-text);
}

.badge--inactive {
  background-color: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
}

.badge--published {
  background-color: var(--success-bg);
  border: 1px solid var(--success-bdr);
  color: var(--success-text);
}

.badge--draft {
  background-color: rgba(255, 200, 50, 0.08);
  border: 1px solid rgba(255, 200, 50, 0.25);
  color: #c8a951;
}

.badge--recruiting {
  background-color: rgba(51, 147, 127, 0.12);
  border: 1px solid rgba(51, 147, 127, 0.35);
  color: #33937f;
}

.badge--planning {
  background-color: rgba(61, 133, 224, 0.12);
  border: 1px solid rgba(61, 133, 224, 0.35);
  color: #5b9fdf;
}

.badge--ongoing {
  background-color: rgba(255, 200, 50, 0.08);
  border: 1px solid rgba(255, 200, 50, 0.25);
  color: #c8a951;
}

.badge--finished {
  background-color: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
}

/* ============================================================
   Raid Builder
   ============================================================ */

/* Header */
.raid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.raid-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.raid-header__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold);
  margin: 0;
  line-height: 1.2;
}

.raid-header__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.raid-header__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Body split */
.raid-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Groups area (scrollable column of roster sections) */
.raid-groups {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.raid-groups::-webkit-scrollbar {
  width: 6px;
}
.raid-groups::-webkit-scrollbar-track {
  background: transparent;
}
.raid-groups::-webkit-scrollbar-thumb {
  background-color: var(--gold-dim);
  border-radius: 3px;
}
.raid-groups::-webkit-scrollbar-button {
  display: none;
}

/* Roster section (wraps header + group cards) */
.raid-roster-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  flex-shrink: 0;
}

.raid-roster-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.raid-roster-section__chevron {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--gold-dim);
  margin-right: 8px;
  transition: transform var(--transition);
  display: inline-block;
}

.raid-roster-section--collapsed .raid-roster-section__chevron {
  transform: rotate(-90deg);
}

.raid-roster-section--collapsed .raid-roster-section__body {
  display: none;
}

.raid-roster-section--collapsed {
  border-bottom: none;
}

.raid-roster-section__name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.raid-roster-section__name-input {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold);
  outline: none;
  width: 14rem;
  padding: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.icon-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.icon-btn--active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(197,155,58,0.12);
}

.icon-btn--danger {
  color: var(--danger-text) !important;
  border-color: transparent !important;
  opacity: 0.7;
}
.icon-btn--danger:hover {
  opacity: 1;
  border-color: var(--danger-bdr) !important;
}

.raid-roster-section__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
}

/* ── Roster tabs ─────────────────────────────────────────────── */
/* ── Assignments pane ────────────────────────────────────────── */
.assignments-pane {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}

/* ── Boss tabs ────────────────────────────────────────────────── */
.assignments-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px 0;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.assignments-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  transition: color var(--transition), background var(--transition);
  position: relative;
  bottom: -1px;
}

.assignments-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.assignments-tab--active {
  color: var(--gold);
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
}

.assignments-tab__icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Tab content area ─────────────────────────────────────────── */
.assignments-tab-content {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

/* ── Entities strip (draggable boss + adds) ───────────────────── */
.assignments-entities-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.assignments-entities-strip .boss-pill {
  width: auto;
  flex: 0 0 auto;
}

.assignments-entities-strip .boss-pill--add {
  margin-left: 0;
  width: auto;
  font-style: italic;
}

.boss-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius);
  cursor: grab;
  width: 100%;
  border-left: 3px solid var(--gold-dim);
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}

.boss-pill:hover {
  background: rgba(255, 255, 255, 0.07);
}

.boss-pill:active {
  cursor: grabbing;
}

.boss-pill--active {
  border-left-color: var(--gold);
  background: rgba(200, 169, 81, 0.08);
}

.boss-pill--dragging {
  opacity: 0.35;
}

.boss-pill--add {
  margin-left: 16px;
  width: calc(100% - 16px);
  border-left-color: rgba(255, 255, 255, 0.15);
  font-style: italic;
}

.boss-pill__icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.boss-pill__icon--placeholder {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.boss-pill__name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignments-canvas-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  min-height: 260px;
  position: relative;
  overflow: hidden;
}

.assignments-canvas-area img {
  max-width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
}

.assignments-canvas-empty,
.assignments-no-instance {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.5;
  text-align: center;
  padding: 24px;
  width: 100%;
}

/* ── Assignments main panel (kept for compatibility) ─────────── */
.assignments-main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--bg);
}

.assignments-blocks-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
}

/* ── Single assignment block ─────────────────────────────────── */
.assignment-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
}

.assignment-block__header {
  padding: 7px 12px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: #3a1010;
  border-bottom: 1px solid var(--border);
}

/* ── Assignment table (generic_table, source_target, interrupt) ─ */
.assignment-table {
  width: 100%;
  border-collapse: collapse;
}

.assignment-table th {
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.assignment-table tr {
  border-bottom: 1px solid var(--border);
}
.assignment-table tr:last-child { border-bottom: none; }

.assignment-table td {
  padding: 4px 8px;
  font-size: 0.82rem;
}

.assignment-table__label {
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Player select ───────────────────────────────────────────── */
.assignment-player-select {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 4px;
  width: 100%;
  cursor: pointer;
}

.assignment-player-select:focus {
  outline: 1px solid var(--gold-dim);
  border-color: var(--gold-dim);
}

/* ── Assign slot (drag-and-drop target) ──────────────────────── */
.assign-slot {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s;
}

.assign-slot--over {
  border-color: var(--gold);
  background: rgba(197,153,57,.1);
}

.assign-slot--filled {
  border-color: var(--border-active, #555);
}

.assign-slot__label {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  pointer-events: none;
}

.assign-slot--filled .assign-slot__label {
  /* color comes from inline style set by JS */
}

.assign-slot__select {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}

.assign-slot--text,
.assign-slot--number {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 4px 8px;
  min-height: 30px;
  width: 100%;
  box-sizing: border-box;
  display: block;
  transition: border-color 0.15s;
}
.assign-slot--text:focus,
.assign-slot--number:focus {
  outline: none;
  border-color: var(--gold);
}

.assign-slot--number {
  width: 80px;
}

.assign-slot--checkbox {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  min-height: 30px;
}
.assign-slot--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--gold, #c8a951);
}

/* ── Labeled groups ──────────────────────────────────────────── */
.assignment-groups-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.assignment-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 160px;
}

.assignment-group__label {
  padding: 5px 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.06em;
}

.assignment-group__slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-top: 1px solid var(--border);
}

.assignment-group__slot-num {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 14px;
  text-align: right;
  flex-shrink: 0;
}

/* "Añadir nuevo roster" button */
.raid-add-roster-btn {
  align-self: flex-start;
  margin: 0;
  color: var(--gold-dim) !important;
  border-color: var(--border) !important;
  border-style: dashed !important;
}
.raid-add-roster-btn:hover {
  color: var(--gold) !important;
  border-color: var(--gold-dim) !important;
}

/* Individual group card */
.group-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 172px;
  flex-shrink: 0;
}

.group-card__header {
  padding: 4px 8px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.group-card__slots {
  display: flex;
  flex-direction: column;
}

/* Single slot inside a group */
.group-slot {
  min-height: 28px;
  padding: 2px 6px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

.group-slot:last-child {
  border-bottom: none;
}

.group-slot--over {
  background: rgba(200, 169, 81, 0.10);
  outline: 1px dashed var(--gold-dim);
  outline-offset: -2px;
}

.group-slot__empty {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.45;
  pointer-events: none;
}

/* Character pill */
.char-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  border-radius: var(--radius);
  cursor: grab;
  width: 100%;
  border-left: 3px solid var(--class-color, #888);
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--transition);
  user-select: none;
}

.char-pill:hover {
  background: rgba(255, 255, 255, 0.07);
}

.char-pill:active {
  cursor: grabbing;
}

.char-pill--dragging {
  opacity: 0.35;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #3a1a1a;
  color: #f87171;
  border: 1px solid #7f1d1d;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 480px;
  text-align: center;
  white-space: pre-wrap;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.char-pill__icons {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.char-pill__icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.char-pill__spec-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.char-pill__spec-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  right: 0;
  white-space: nowrap;
  background: #161b2e;
  color: #c8cfe8;
  border: 1px solid #252b40;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-body);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.char-pill__spec-wrap:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.char-pill__spec-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.char-pill__name {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--class-color, var(--text));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Roster sidebar */
.raid-sidebar {
  width: 272px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease;
}

.raid-sidebar--collapsed {
  width: 36px;
}

.raid-sidebar--collapsed .raid-roster {
  display: none;
}

.raid-sidebar__icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.raid-sidebar__label {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-sidebar--collapsed .raid-sidebar__label {
  display: none;
}

.raid-sidebar--collapsed .raid-sidebar__toggle {
  display: none;
}

.raid-sidebar--collapsed .raid-sidebar__header {
  justify-content: center;
  gap: 0;
  padding: 10px 0;
}

.raid-sidebar__header {
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  gap: 6px;
  overflow: hidden;
}

.raid-sidebar__header:hover {
  color: var(--gold);
}

.raid-sidebar__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  margin-left: auto;
}

.raid-roster {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
}

.raid-groups--over {
  background: rgba(200, 80, 80, 0.04);
  outline: 2px dashed rgba(200, 80, 80, 0.4);
  outline-offset: -6px;
}

.raid-roster--over {
  background: rgba(200, 169, 81, 0.05);
  outline: 1px dashed var(--gold-dim);
  outline-offset: -4px;
}

.raid-roster .char-pill {
  width: 100%;
}

.account-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(255, 200, 80, 0.45);
  border-radius: 6px;
  padding: 4px;
  background: rgba(255, 200, 80, 0.04);
}

.roster-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* Save status indicator */
.save-status {
  font-size: 0.76rem;
  font-family: var(--font-body);
  padding: 4px 11px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.save-status--saved {
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid var(--success-bdr);
}

.save-status--saving {
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.save-status--error {
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid var(--danger-bdr);
}

/* === Page header flex variant === */
.page__header--flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* === Card modifiers === */
.card--flush {
  padding: 0;
  overflow: hidden;
}

.card--compact {
  padding: 16px 24px;
}

.card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.card__header--flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* === Faction colors === */
.faction--alliance { color: #4fa3e0; }
.faction--horde    { color: #c23b22; }

/* === Semantic text colors === */
.text-danger  { color: var(--danger-text); }
.text-success { color: var(--success-text); }

/* === Section count (inside manage-section__title) === */
.section-count {
  font-size: .8rem;
  font-weight: 400;
  font-family: var(--font-body);
}

/* === Table utilities === */
.td-icon {
  width: 1px;
  white-space: nowrap;
  padding-right: 4px;
}

.td-sm {
  font-size: .82rem;
  color: var(--text-muted);
}

.tr-clickable {
  cursor: pointer;
}

/* === Game icons === */
.icon-sm {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.icon-md {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

.spec-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  border-radius: 2px;
}

.prof-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* === Item lists (specs / professions) === */
.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.item-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.empty-dash {
  font-style: italic;
}

/* === Spec badge (main / off indicator) === */
.spec-badge {
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.4;
}

.spec-badge--main {
  background: var(--gold);
  color: #000;
}

.spec-badge--off {
  background: var(--border);
  color: var(--text-muted);
}

/* === Inline form (no margin) === */
.form-inline {
  margin: 0;
}

/* === Version / Boss icon drop-zone === */
.version-icon-drop {
  position: relative;
  width: 64px;
  height: 64px;
  border: 2px dashed var(--border, #444);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, width 0.2s, height 0.2s;
  background: var(--surface-alt, #1a1a2e);
}

.version-icon-drop--has-image {
  width: auto;
  height: auto;
  max-width: 180px;
  max-height: 180px;
  display: inline-flex;
}

.version-icon-drop:hover,
.version-icon-drop.dragover {
  border-color: var(--gold, #c89b3c);
  background: rgba(200, 155, 60, 0.08);
}

.version-icon-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  max-width: 180px;
  max-height: 180px;
}

.version-icon-drop--has-image .version-icon-preview {
  width: auto;
  height: auto;
}

.version-icon-placeholder {
  font-size: 0.6rem;
  color: var(--text-muted, #888);
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

/* === Version / Boss image upload form (hidden) === */
.version-icon-form {
  display: none;
}

/* === Encounter map section (per boss) === */
.encounter-map-section {
  border-bottom: 1px solid var(--border, #333);
}

.encounter-map-section__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  user-select: none;
  transition: color 0.15s;
}

.encounter-map-section__toggle:hover {
  color: var(--gold, #c89b3c);
}

.encounter-map-section__chevron {
  flex-shrink: 0;
  transform: rotate(-90deg);
  transition: transform 0.2s;
}

.encounter-map-section__body {
  padding: 10px 16px 12px;
}

.encounter-map-drop {
  position: relative;
  border: 2px dashed var(--border, #444);
  border-radius: 6px;
  cursor: pointer;
  background: var(--surface-alt, #1a1a2e);
  transition: border-color 0.2s, background 0.2s;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.encounter-map-drop--has-image {
  display: block;
  background: transparent;
  border-style: solid;
}

.encounter-map-drop:hover,
.encounter-map-drop.dragover {
  border-color: var(--gold, #c89b3c);
  background: rgba(200, 155, 60, 0.06);
}

.encounter-map-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.encounter-map-placeholder {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  text-align: center;
  padding: 16px;
  line-height: 1.4;
}

/* === Collapsible instance cards === */
.instance-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.instance-card__header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.instance-card__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.instance-card__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin: 0;
}

.instance-card__chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.instance-card__chevron--up {
  transform: rotate(-180deg);
}

.instance-card__body {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 2000px;
  opacity: 1;
}

.instance-card__body--collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* === Version pill (instances page) === */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.version-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold-dim);
  font-size: 0.82rem;
  font-weight: 500;
}

.version-pill__icon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.version-pill__icon--placeholder {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: var(--border);
  flex-shrink: 0;
  display: inline-block;
}

.version-pill__name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-pill__region {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.version-pill__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 2px;
  line-height: 1;
  font-size: 1rem;
  flex-shrink: 0;
  transition: color var(--transition);
}

.version-pill__remove:hover {
  color: var(--danger-text);
}

/* === Form label hint === */
.form-label__hint {
  font-weight: 400;
  text-transform: none;
  font-size: .8rem;
  color: var(--text-muted);
}

/* === Form hint error state === */
.form-hint--danger {
  color: var(--danger-text);
  margin-top: 6px;
}

/* ── Template-edit split layout ──────────────────────────────── */
.te-split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.te-split__left {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.te-split__right {
  flex: 0 0 420px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: auto;
}
@media (max-width: 1100px) {
  .te-split {
    flex-direction: column;
  }
  .te-split__right {
    flex: unset;
    position: static;
    max-height: none;
    width: 100%;
  }
}

/* ── Preview mock player pill (small inline) ─────────────────── */
.preview-player {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.preview-player__cls-icon,
.preview-player__spec-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}
.preview-player__name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Draggable player pool above preview ─────────────────────── */
.te-player-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 0;
  margin-bottom: 10px;
}
.te-player-pool .char-pill {
  font-size: 0.78rem;
  padding: 2px 7px 2px 4px;
}

/* === Auto-fill picker grid === */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

/* === Modal form grid === */
.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-form-grid__full {
  grid-column: 1 / -1;
}

/* === Radio row === */
.radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* === Hidden radio input === */
.radio-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* === Hint box (collapsible subsection) === */
.hint-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: 6px;
}

/* === Config message === */
.config-msg {
  margin-top: 12px;
  font-size: .85rem;
}

/* === Modal modifiers === */
.modal--sm { max-width: 560px; }
.modal--md { width: fit-content; min-width: 620px; max-width: 1200px; }
.modal--lg { max-width: 660px; }

.modal__title--spaced { margin-bottom: 20px; }
.modal__title--sub    { margin-bottom: 4px; }

.modal__title--gold {
  font-family: var(--font-heading);
  color: var(--gold);
  letter-spacing: .06em;
}

.modal-meta {
  font-size: .8rem;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-desc-text {
  white-space: pre-wrap;
  font-size: .9rem;
  margin: 0;
  color: var(--text-muted);
}

/* === Modal signup sections === */
.modal-list-label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.signup-grid {
  display: grid;
  column-gap: 12px;
  row-gap: 4px;
  margin-bottom: 4px;
  align-items: start;
}

.signup-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 4px;
}

.signup-item__name {
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signup-form-card {
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

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

.signup-form-char {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.spec-single {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  color: var(--text-muted);
}

.spec-options {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.spec-name {
  font-size: .82rem;
}

/* === Signed / GM badges === */
.badge--main {
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--gold);
  color: #000;
  line-height: 1.4;
}

.badge--signed {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(106, 191, 105, .18);
  color: var(--success-text);
  border: 1px solid var(--success-text);
  white-space: nowrap;
}

.badge--gm {
  background: rgba(212, 175, 55, .15);
  color: var(--gold);
}

/* === Utilities === */
.ml-auto  { margin-left: auto; }
.text-xs  { font-size: .78rem; }
.resize-v { resize: vertical; }

/* === Count label (small secondary text in sidebar/header) === */
.count-label {
  font-size: .78rem;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}

/* === Guild Control hub === */
.gc-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.gc-hub-card {
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.gc-hub-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.gc-hub-card__title {
  font-family: var(--font-heading);
  color: var(--gold);
  letter-spacing: .06em;
  font-size: 1rem;
  margin: 0 0 8px;
}

.gc-hub-card__body {
  font-size: .85rem;
  margin: 0;
}

/* === GM Raid Cards (guild-control/raids.ejs) === */
.gc-raid-card {
  margin-bottom: 16px;
}

.gc-raid-card--past {
  opacity: .7;
}

.gc-raid-card--empty {
  margin-bottom: 28px;
}

.gc-raid-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.gc-raid-card__title {
  font-size: 1.05rem;
  font-family: var(--font-heading);
  color: var(--gold);
  letter-spacing: .06em;
  margin: 0 0 4px;
}

.gc-raid-card__desc {
  margin: 0 0 12px;
  font-size: .88rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.gc-raid-card__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gc-raid-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* === Section label (e.g. "Siguientes raids", "Historial de raids") === */
.section-label {
  font-size: .8rem;
  font-family: var(--font-heading);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* === Raid Cards === */
.raid-card {
  margin-bottom: 16px;
  cursor: pointer;
}

.raid-card--past {
  opacity: .7;
}

.raid-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.raid-card__body {
  flex: 1;
  min-width: 0;
}

.raid-card__title {
  font-size: 1.05rem;
  font-family: var(--font-heading);
  color: var(--gold);
  letter-spacing: .06em;
  margin: 0 0 8px;
}

.raid-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .8rem;
  color: var(--text-muted);
}

.raid-card__meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.raid-card__meta-row svg {
  flex-shrink: 0;
  color: inherit;
}

.raid-card__signup-status {
  display: flex;
  align-items: center;
  gap: 4px;
}

.raid-card .badge {
  white-space: nowrap;
  align-self: center;
}

.raid-card__desc {
  margin: 10px 0 0;
  font-size: .88rem;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.raid-card__signed {
  color: var(--success-text);
}

.raid-card__unsigned {
  color: var(--danger-text);
}

