:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg-base: #0a0a0c;
  --bg-panel: #131316;
  --bg-panel-top: #1a1a1e;
  --line-muted: #3b3324;
  --line-strong: #7b5b2c;
  --text-main: #e8dcc3;
  --text-soft: #c9b998;
  --text-dim: #9f8f70;
  --gold: #d1a754;
  --gold-soft: #b4883b;
  --blue-accent: #4f6ea8;
  --danger: #9f4a42;
  background: var(--bg-base);
  color: var(--text-main);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -15%, rgba(209, 167, 84, 0.12), transparent 45%),
    radial-gradient(circle at 12% 8%, rgba(79, 110, 168, 0.12), transparent 38%),
    linear-gradient(180deg, #0e0e11 0%, #09090b 55%, #070709 100%);
  min-height: 100vh;
}
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.auth-gate-card {
  width: min(29rem, 100%);
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--bg-panel-top), var(--bg-panel));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 214, 145, 0.05);
  text-align: center;
}
.auth-gate-card h1 {
  margin: 0;
  font-size: 1.55rem;
}
.auth-gate-message {
  margin: 0.75rem 0 1rem;
  color: var(--text-dim);
}
.auth-gate-message.error {
  color: #ff9c9c;
}

.container {
  width: min(1700px, 90vw);
  margin: 2.25rem auto 4rem;
  display: grid;
  gap: 1.05rem;
}

.header {
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.9rem;
  row-gap: 0.45rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand-icon {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #8c652d;
  box-shadow:
    0 0 0 1px rgba(255, 214, 145, 0.08) inset,
    0 0 14px rgba(79, 110, 168, 0.28);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow:
    0 0 10px rgba(209, 167, 84, 0.42),
    0 0 24px rgba(209, 167, 84, 0.28),
    0 0 40px rgba(79, 110, 168, 0.2);
  animation: title-glow 2.8s ease-in-out infinite alternate;
}

@keyframes title-glow {
  from {
    text-shadow:
      0 0 9px rgba(209, 167, 84, 0.34),
      0 0 18px rgba(209, 167, 84, 0.2),
      0 0 28px rgba(79, 110, 168, 0.14);
  }

  to {
    text-shadow:
      0 0 12px rgba(224, 187, 112, 0.56),
      0 0 28px rgba(224, 187, 112, 0.34),
      0 0 44px rgba(79, 110, 168, 0.28);
  }
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  grid-column: 2;
  grid-row: 1;
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #8c652d;
  border-radius: 10px;
  padding: 0.5rem 0.78rem;
  background: linear-gradient(180deg, #bc8f45, #896021);
  color: #f8f1df;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  line-height: 1;
  min-height: 2.1rem;
}

.nav-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid #c65252;
  background: linear-gradient(180deg, #c73b3b, #8f2323);
  color: #ffeaea;
  padding: 0 0.38rem;
  font-size: 0.84rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 197, 197, 0.15) inset;
}

.nav-mini-badge:not([hidden]) {
  animation: nav-badge-shake 0.75s ease-in-out infinite;
  transform-origin: center;
}

@keyframes nav-badge-shake {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }

  20% {
    transform: translateX(-1px) rotate(-7deg) scale(1.03);
  }

  40% {
    transform: translateX(1px) rotate(7deg) scale(1.03);
  }

  60% {
    transform: translateX(-1px) rotate(-5deg) scale(1.02);
  }

  80% {
    transform: translateX(1px) rotate(5deg) scale(1.02);
  }
}

.nav-button:hover {
  color: #fff3d7;
  text-decoration: none;
  filter: brightness(1.08);
}

.discord-button {
  border-color: #4f5c79;
  background: linear-gradient(180deg, #4b5f89, #34486a);
}

.discord-button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.subtitle {
  grid-column: 1 / -1;
  margin: 0.4rem 0 0;
  color: var(--text-soft);
}

.auth-status {
  grid-column: 1 / -1;
  margin: 0.7rem 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.auth-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.auth-actions button {
  min-width: 10.25rem;
}

.auth-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.uid-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #5b4930;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  background: rgba(28, 23, 17, 0.65);
}

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

a:hover {
  color: #efc879;
  text-decoration: underline;
}

.card {
  background: linear-gradient(180deg, var(--bg-panel-top), var(--bg-panel));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 1rem;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 214, 145, 0.05);
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.primary-fields,
.time-slots,
.actions {
  grid-column: 1 / -1;
}

.profile-details,
.raid-select-row,
.profile-actions {
  grid-column: 1 / -1;
}

.signup-top-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 0.6rem;
  align-items: stretch;
}

.profile-module,
.raid-clock-module {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(7, 7, 9, 0.42);
}

.profile-workflow {
  grid-column: auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.profile-workflow > .help-text {
  grid-column: 1 / -1;
}

.profile-workflow-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.raid-clock-module {
  border-color: color-mix(in srgb, var(--blue-accent) 45%, var(--line-strong));
  background:
    radial-gradient(circle at 85% -10%, rgba(79, 110, 168, 0.24), transparent 42%),
    radial-gradient(circle at 15% 110%, rgba(209, 167, 84, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(16, 20, 30, 0.92), rgba(12, 12, 16, 0.9));
}

.raid-clock-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.raid-clock-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--blue-accent) 55%, var(--line-strong));
  box-shadow: 0 0 8px rgba(79, 110, 168, 0.3);
}

.raid-clock-header h3 {
  margin: 0;
  color: #d9e7ff;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.raid-clock-label {
  margin: 0.15rem 0 0.4rem;
  color: #e9d7af;
  font-weight: 600;
  font-size: 0.9rem;
}

.raid-clock-digits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.clock-digit {
  border: 1px solid color-mix(in srgb, var(--blue-accent) 45%, var(--line-muted));
  border-radius: 8px;
  background: rgba(6, 10, 16, 0.8);
  padding: 0.35rem 0.25rem;
  text-align: center;
}

.clock-digit strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.05;
  color: #d8eaff;
  text-shadow: 0 0 12px rgba(79, 110, 168, 0.38);
}

.clock-digit span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.raid-clock-sub {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: #afc5eb;
}

.section-title {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.summary-edit-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  background: rgba(13, 13, 17, 0.78);
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
}

.summary-edit-button:hover {
  border-color: var(--gold-soft);
  color: var(--gold);
}

.profile-details {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.45rem 0.55rem 0.55rem;
  background: rgba(7, 7, 9, 0.35);
}

.profile-details[open] {
  display: grid;
  gap: 0.45rem;
}

.profile-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.profile-modal {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-panel-top), var(--bg-panel));
  color: var(--text-main);
  width: min(1020px, 94vw);
  padding: 0;
}

.profile-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.profile-modal-content {
  margin: 0;
  padding: 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.profile-modal-header h3 {
  margin: 0;
  color: var(--gold);
}

.alt-characters-section {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.5rem;
  display: grid;
  gap: 0.45rem;
}

.alt-characters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.alt-characters-header h4 {
  margin: 0;
  color: var(--gold);
  font-size: 0.95rem;
}

.alt-characters-list {
  display: grid;
  gap: 0.42rem;
}

.alt-character-card {
  border: 1px solid #3a3224;
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.45);
  padding: 0.35rem 0.45rem;
}

.alt-character-card summary {
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 600;
}

.alt-character-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.45rem;
}

.alt-wide {
  grid-column: 1 / -1;
}

.alt-character-grid .spec-role-group {
  min-height: 100%;
}

.alt-class {
  border-color: #5e4b2a;
}

.alt-class[data-wow-class]:not([data-wow-class=""]) {
  border-color: var(--selected-class-color, #5e4b2a);
  color: var(--selected-class-color, var(--text-main));
}

.alt-remove-button {
  justify-self: end;
}

.primary-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.profile-modal-content .primary-fields {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.profile-modal-content .primary-fields > label:nth-child(1) {
  grid-column: 1 / -1;
}

.profile-modal-content .primary-fields > .spec-role-group {
  grid-column: span 1;
}

.primary-fields > label,
.primary-fields > .spec-role-group {
  align-self: start;
  margin-top: 0;
}

.spec-role-group {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.45rem;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.spec-role-group legend {
  color: var(--gold);
  padding: 0 0.25rem;
}

.admin-form {
  margin-bottom: 0.8rem;
}

.raid-primary-fields {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

#raidSize[readonly] {
  opacity: 0.9;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.55rem;
}

label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.95rem;
}

.slot-group {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.5rem;
  margin: 0;
  min-inline-size: 0;
  display: grid;
  gap: 0.35rem;
}

.slot-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.6rem;
}

.slot-size-inline {
  min-width: 120px;
}

.slot-group legend {
  margin: 0;
  padding: 0 0.35rem;
  color: var(--gold);
}

.help-text {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 0;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #5e4b2a;
  border-radius: 10px;
  background: #0b0b0e;
  color: var(--text-main);
  padding: 0.48rem 0.6rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(209, 167, 84, 0.2);
}

select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.visually-hidden-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wow-class-picker {
  position: relative;
}

.wow-class-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--selected-class-color, #5e4b2a) 55%, #5e4b2a);
  border-radius: 10px;
  background: #0b0b0e;
  color: var(--selected-class-color, var(--text-main));
  padding: 0.48rem 0.6rem;
}

.wow-class-trigger:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(209, 167, 84, 0.2);
}

.wow-class-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  border: 1px solid #5e4b2a;
  border-radius: 10px;
  background: #0b0b0e;
  padding: 0.35rem;
  display: grid;
  gap: 0.2rem;
  z-index: 30;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.45);
}

.wow-class-menu[hidden] {
  display: none !important;
}

.wow-class-option {
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--class-color, var(--text-main));
  text-align: left;
  font-weight: 600;
  padding: 0.42rem 0.52rem;
}

.wow-class-option:hover {
  border-color: color-mix(in srgb, var(--class-color, #876634) 60%, #876634);
  background: color-mix(in srgb, var(--class-color, #876634) 12%, transparent);
}

.wow-class-option.active {
  border-color: color-mix(in srgb, var(--class-color, #d1a754) 65%, #d1a754);
  background: color-mix(in srgb, var(--class-color, #d1a754) 16%, transparent);
}

#wowClass,
#mainSpecialization,
#offSpecialization {
  color: var(--selected-class-color, var(--text-main));
  border-color: color-mix(in srgb, var(--selected-class-color, #5e4b2a) 55%, #5e4b2a);
}

#wowClass option {
  background: #0b0b0e;
}

#wowClass option[value="Druid"] {
  color: #ff7d0a;
}

#wowClass option[value="Hunter"] {
  color: #abd473;
}

#wowClass option[value="Mage"] {
  color: #69ccf0;
}

#wowClass option[value="Paladin"] {
  color: #f58cba;
}

#wowClass option[value="Priest"] {
  color: #f4f4f4;
}

#wowClass option[value="Rogue"] {
  color: #fff569;
}

#wowClass option[value="Shaman"] {
  color: #4aa0ff;
}

#wowClass option[value="Warlock"] {
  color: #9482c9;
}

#wowClass option[value="Warrior"] {
  color: #c79c6e;
}

textarea {
  resize: vertical;
}

.actions {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

button {
  border: 1px solid #8c652d;
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  cursor: pointer;
  background: linear-gradient(180deg, #bc8f45, #896021);
  color: #f8f1df;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

button.secondary {
  border-color: #4f5c79;
  background: linear-gradient(180deg, #4b5f89, #34486a);
}

button.danger {
  border-color: #8a3a34;
  background: linear-gradient(180deg, #995149, #733630);
}

button:hover:not(:disabled) {
  filter: brightness(1.07);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.badge {
  background: linear-gradient(180deg, #5a4425, #3f2f1a);
  border: 1px solid #876634;
  color: #f1deb5;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  min-width: 2rem;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

.admin-operations-page .container,
.admin-operations-page .card,
.admin-operations-page .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.admin-operations-page th,
.admin-operations-page td {
  overflow-wrap: anywhere;
}

.admin-operations-page #characterAuditSection table {
  font-size: 0.8rem;
}

.admin-operations-page #characterAuditSection th,
.admin-operations-page #characterAuditSection td {
  white-space: nowrap;
  overflow-wrap: normal;
}

.admin-operations-page #characterAuditSection .audit-stack-cell {
  min-width: 110px;
}

.admin-operations-page #characterAuditSection .audit-history-col {
  min-width: 150px;
}

.admin-operations-page #characterAuditSection th:last-child,
.admin-operations-page #characterAuditSection td:last-child {
  min-width: 96px;
}

.request-group-row td {
  background: rgba(29, 37, 54, 0.5);
  border-top: 1px solid #3a5279;
  border-bottom: 1px solid #3a5279;
  color: #d8e9ff;
  font-weight: 700;
}

.request-action-na {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.audit-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.past-toggle-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.audit-user-name {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.access-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
  margin-top: 0.55rem;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.access-uid-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
}

.audit-stack-cell {
  min-width: 140px;
}

.audit-entry-line {
  display: block;
  line-height: 1.35;
  padding: 0.08rem 0;
  overflow-wrap: anywhere;
}

.audit-role-main {
  display: inline;
}

.audit-spec-muted {
  margin-left: 0.35rem;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.audit-entry-line + .audit-entry-line {
  border-top: 1px dashed rgba(123, 91, 44, 0.35);
  margin-top: 0.08rem;
  padding-top: 0.12rem;
}

.audit-entry-tag {
  display: inline-block;
  margin-left: 0.28rem;
  padding: 0.04rem 0.28rem;
  border-radius: 999px;
  border: 1px solid #5b4930;
  color: var(--text-soft);
  font-size: 0.7rem;
  vertical-align: middle;
}

.audit-entry-line.is-main .audit-entry-tag {
  border-color: #8a6a36;
  color: #f2ddb2;
}

.audit-entry-line.is-alt .audit-entry-tag {
  border-color: #4f5c79;
  color: #d4def4;
}

.audit-history-col {
  min-width: 150px;
  white-space: nowrap;
}

.audit-assign-col {
  min-width: 320px;
  white-space: normal;
}

.audit-assignment {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) auto;
  gap: 0.38rem;
  align-items: center;
}

.audit-assignment select,
.audit-assignment button {
  min-height: 30px;
}

.audit-assignment-actions {
  display: flex;
  gap: 0.38rem;
  align-items: center;
  flex-wrap: wrap;
}

.audit-assignment-state {
  display: inline-flex;
  align-items: center;
  border: 1px solid #5d6574;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
  background: rgba(38, 42, 50, 0.45);
  color: var(--text-dim);
}

.audit-assignment-state.is-unassigned {
  border-color: #5d6574;
  color: var(--text-dim);
}

.audit-assignment-state.is-assigned {
  background: rgba(35, 74, 42, 0.4);
  border-color: #3e8a50;
  color: #d9ffe2;
}

.audit-assignment-state.is-benched {
  background: rgba(81, 51, 24, 0.38);
  border-color: #b07a45;
  color: #ffdcb0;
}

.audit-assignment-actions .audit-action-assign {
  border-color: #3e8a50;
  background: linear-gradient(180deg, #3f9253, #2b6f3d);
  color: #e8ffed;
}

.audit-assignment-actions .audit-action-unassign {
  border-color: #8a3a34;
  background: linear-gradient(180deg, #995149, #733630);
}

@media (max-width: 980px) {
  .slot-range {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .audit-stack-cell {
    min-width: 120px;
  }

  .audit-history-col {
    min-width: 170px;
  }

  .audit-assign-col {
    min-width: 260px;
  }

  .audit-assignment {
    grid-template-columns: 1fr;
  }
}

.raid-groups {
  display: grid;
  gap: 0.85rem;
}

.raid-group {
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(7, 7, 9, 0.38);
}

.raid-group h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-past-details > summary,
.past-details > summary {
  list-style: none;
  cursor: pointer;
}

.admin-past-details > summary::-webkit-details-marker,
.past-details > summary::-webkit-details-marker {
  display: none;
}

.admin-past-details > summary::after,
.past-details > summary::after {
  content: "▾";
  color: var(--text-dim);
  margin-left: auto;
  padding-left: 0.5rem;
}

.admin-past-details[open] > summary::after,
.past-details[open] > summary::after {
  content: "▴";
}

.admin-past-details > .table-wrap,
.past-details > .table-wrap {
  margin-top: 0.45rem;
}

.current-raids h3 {
  color: #7be79b;
}

.upcoming-raids h3 {
  color: #7fb7ff;
}

.past-raids h3 {
  color: #c79aa0;
}

.current-raids .badge {
  background: linear-gradient(180deg, #1e5a34, #143c23);
  border-color: #2f7f4b;
  color: #d2f8dd;
}

.upcoming-raids .badge {
  background: linear-gradient(180deg, #264d7a, #1a3554);
  border-color: #3a6da7;
  color: #d8e9ff;
}

.past-raids .badge {
  background: linear-gradient(180deg, #5a353b, #3f2429);
  border-color: #8a555f;
  color: #f2d4da;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
}

th,
td {
  text-align: left;
  padding: 0.62rem 0.4rem;
  border-bottom: 1px solid #2f291d;
  vertical-align: top;
}

th {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(50, 34, 14, 0.25);
}

.roster-chip {
  display: inline-block;
  min-width: 3.2rem;
  text-align: center;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.roster-open {
  background: #5a2a2a;
  border-color: #9d4f4f;
  color: #ffd7d7;
}

.roster-mid {
  background: #5b4822;
  border-color: #9d7c3c;
  color: #ffe8bb;
}

.roster-full {
  background: #234a2a;
  border-color: #3e8a50;
  color: #d9ffe2;
}

.roster-need {
  margin-left: 0.35rem;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.roster-stack {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  text-align: center;
}

.roster-role-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.roster-role {
  font-size: 0.75rem;
  white-space: nowrap;
}

.roster-role strong {
  font-size: 0.8rem;
}

.roster-role-tank {
  color: #86b7ff;
}

.roster-role-healer {
  color: #7ee2a0;
}

.roster-role-dps {
  color: #ff9c9c;
}

.raid-date {
  font-weight: 600;
}

.raid-date-time {
  display: block;
  margin-top: 0.14rem;
  color: #f6dfaf;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.32;
}

.raid-time-cell {
  white-space: nowrap;
}

.raid-time-line {
  display: block;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.raid-time-cst {
  color: #f6dfaf;
  font-weight: 600;
}

.raid-time-local {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff3d7;
}

.raid-signup-select {
  width: 9.8rem;
  min-width: 9.8rem;
  max-width: 9.8rem;
  border: 1px solid #4f5c79;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a2436, #111a29);
  color: #f2f5ff;
  padding: 0.34rem 0.48rem;
  font-size: 0.82rem;
}

.raid-signup-controls {
  display: grid;
  gap: 0.3rem;
}

.raid-profile-select {
  width: 13.5rem;
  min-width: 13.5rem;
  max-width: 13.5rem;
  border: 1px solid #5e4b2a;
  border-radius: 8px;
  background: #0b0b0e;
  color: var(--text-main);
  padding: 0.34rem 0.48rem;
  font-size: 0.82rem;
}

.raid-signup-select.status-accept {
  border-color: #3e8a50;
  color: #d9ffe2;
  background: linear-gradient(180deg, #1f3e2a, #162d1f);
}

.raid-signup-select.status-requested {
  border-color: #4f6ea8;
  color: #d8e9ff;
  background: linear-gradient(180deg, #22395c, #18283f);
}

.raid-signup-select.status-tentative {
  border-color: #b07a45;
  color: #ffdcb0;
  background: linear-gradient(180deg, #4a2f1a, #332113);
}

.raid-signup-select.status-decline {
  border-color: #9d4f4f;
  color: #ffd7d7;
  background: linear-gradient(180deg, #4a2222, #321818);
}

.raid-signup-select.status-withdrawn {
  border-color: #9d4f4f;
  color: #ffd7d7;
  background: linear-gradient(180deg, #4a2222, #321818);
}

.raid-signup-select.status-denied {
  border-color: #b34848;
  color: #ffe2e2;
  background: linear-gradient(180deg, #5a1f1f, #3b1414);
}

.raid-signup-select.status-none {
  border-color: #4f5c79;
  color: #f2f5ff;
  background: linear-gradient(180deg, #1a2436, #111a29);
}

.raid-signup-select.accepted-locked {
  opacity: 0.78;
  border-style: dashed;
  cursor: not-allowed;
}

.signup-control-disabled {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.signup-status-badge {
  display: inline-block;
  margin-top: 0.26rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #5b4930;
  font-size: 0.76rem;
  line-height: 1.1;
}

.status-accept {
  background: rgba(35, 74, 42, 0.4);
  border-color: #3e8a50;
  color: #d9ffe2;
}

.status-requested {
  background: rgba(29, 56, 97, 0.42);
  border-color: #4f6ea8;
  color: #d8e9ff;
}

.status-tentative {
  background: rgba(81, 51, 24, 0.38);
  border-color: #b07a45;
  color: #ffdcb0;
}

.status-withdrawn,
.status-decline,
.status-none {
  background: rgba(90, 42, 42, 0.36);
  border-color: #9d4f4f;
  color: #ffd7d7;
}

.status-denied {
  background: rgba(92, 28, 28, 0.4);
  border-color: #b34848;
  color: #ffe2e2;
}

tbody tr:hover {
  background: rgba(209, 167, 84, 0.08);
}

.raid-detail-row:hover {
  background: transparent;
}

.schedule-toggle {
  border: 1px solid #4f5c79;
  border-radius: 8px;
  background: linear-gradient(180deg, #4b5f89, #34486a);
  color: #f2f5ff;
  padding: 0.34rem 0.56rem;
  font-size: 0.84rem;
}

.raid-detail-wrap {
  border: 1px solid #2f291d;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: rgba(8, 8, 10, 0.55);
}

.role-summary {
  display: grid;
  gap: 0.32rem;
  margin-bottom: 0.45rem;
}

.role-summary-label {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.role-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.14rem 0.44rem;
  border-radius: 999px;
  border: 1px solid #5b4930;
  font-size: 0.8rem;
}

.role-tank {
  background: rgba(80, 108, 148, 0.25);
  border-color: #4b678c;
  color: #d8e7ff;
}

.role-healer {
  background: rgba(42, 109, 71, 0.25);
  border-color: #3d8a60;
  color: #d3ffe6;
}

.role-dps {
  background: rgba(118, 54, 54, 0.25);
  border-color: #9f4b4b;
  color: #ffd9d9;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
}

.detail-table th,
.detail-table td {
  padding: 0.44rem 0.35rem;
  border-bottom: 1px solid #2a261e;
  font-size: 0.9rem;
}

.class-colored-name {
  font-weight: 600;
}

.detail-table th {
  background: rgba(50, 34, 14, 0.18);
}

.detail-table a {
  color: #7fb7ff;
}

.detail-table a:hover {
  color: #a9ceff;
}

td .row-actions {
  display: flex;
  gap: 0.5rem;
}

td .row-actions button {
  padding: 0.4rem 0.6rem;
}

.message {
  min-height: 1.2rem;
  margin: 0.7rem 0 0;
  color: var(--text-soft);
}

.message.error {
  color: #f1a39a;
}

@media (max-width: 800px) {
  .container {
    width: 92vw;
  }

  .header {
    padding: 0 0.35rem;
    grid-template-columns: 1fr;
    row-gap: 0.4rem;
  }

  .top-nav {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .brand-icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .nav-button {
    padding: 0.45rem 0.6rem;
    font-size: 0.84rem;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }

  .signup-top-grid {
    grid-template-columns: 1fr;
  }

  .profile-workflow {
    grid-template-columns: 1fr;
  }

  .raid-clock-digits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-fields {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .raid-primary-fields {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .time-slots {
    grid-template-columns: 1fr;
  }

  .slot-range {
    grid-template-columns: 1fr;
  }

  .audit-filters {
    grid-template-columns: 1fr;
  }

  .access-form,
  .access-grid {
    grid-template-columns: 1fr;
  }

  th:nth-child(7),
  td:nth-child(7),
  th:nth-child(8),
  td:nth-child(8) {
    max-width: 170px;
  }
}

@media (max-width: 520px) {
  .primary-fields {
    grid-template-columns: 1fr;
  }

  .raid-primary-fields {
    grid-template-columns: 1fr;
  }
}
