@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Source+Sans+3:wght@400;600;700&display=swap');

/* Theme */
:root {
  --amber: #d9b56b;
  --amber-strong: #f3c96b;
  --ember: #c08a3e;
  --obsidian: #0c1116;
  --stone: #131a21;
  --panel: rgba(16, 20, 26, 0.88);
  --panel-border: rgba(217, 181, 107, 0.25);
  --text: #efe7d6;
  --muted: #d5c8b1;
  --success: #22c55e;
  --danger: #ef4444;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base */
body {
  min-height: 100vh;
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 20% -10%, rgba(217, 181, 107, 0.25), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(63, 94, 140, 0.18), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #111822 45%, #0b0f14 100%);
}

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

a:hover {
  color: var(--amber);
  text-decoration: underline;
}

/* Layout */
.wrapper {
  min-height: 100vh;
  padding-top: 56px;
}

/* Header + Nav */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: rgba(12, 16, 20, 0.7);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(6px);
}

.main-header .navbar-nav:first-child {
  padding-left: 8px;
}

.main-header .navbar-nav.ms-auto {
  padding-right: 8px;
}

.main-header .nav-link {
  color: var(--text);
  text-decoration: none;
}

.main-header .nav-link:hover {
  color: var(--amber-strong);
  text-decoration: none;
}

.nav-title {
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: inherit;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand-home {
  padding-right: 0.2rem;
}

.nav-brand-name {
  padding-left: 0;
}

.nav-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
  position: relative;
}

.nav-title-user {
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.9rem;
  color: inherit;
}

.nav-character {
  gap: 0.35rem;
}

.nav-character-dropdown {
  position: relative;
  top: 1px;
}

.nav-character-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(11, 15, 20, 0.7);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-character-toggle:hover,
.nav-character-toggle:focus {
  color: var(--amber-strong);
  border-color: rgba(217, 181, 107, 0.4);
  background: rgba(11, 15, 20, 0.9);
}

.nav-character-menu {
  background: rgba(11, 15, 20, 0.98);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 220px;
}

.nav-character-menu .dropdown-header {
  color: rgba(255, 236, 196, 0.75);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.75rem;
}

.nav-character-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.nav-character-menu .character-badges-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-character-menu .character-badges-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-character-menu .dropdown-divider {
  border-top: 1px solid rgba(217, 181, 107, 0.4);
  margin: 0.45rem 0;
}

.nav-character-menu .dropdown-item:hover {
  background: rgba(217, 181, 107, 0.12);
  color: var(--amber-strong);
}

.nav-character-menu .dropdown-item.active,
.nav-character-menu .dropdown-item:disabled {
  background: rgba(217, 181, 107, 0.18);
  color: var(--amber-strong);
}

.nav-character-menu .dropdown-item:disabled {
  cursor: default;
  opacity: 0.85;
}

.nav-character-menu .badge-pill {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
}

.badge-pill.badge-dark {
  background: rgba(217, 181, 107, 0.18);
  color: var(--amber-strong);
  border-color: transparent;
}

/* Banner */
.site-banner {
  background: rgba(217, 181, 107, 0.12);
  border-bottom: 1px solid rgba(217, 181, 107, 0.2);
  padding: 0.55rem 1.2rem;
  text-align: center;
}

.site-banner a {
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
}

.site-banner a:hover {
  color: var(--amber);
}

.site-banner-author {
  font-weight: 700;
}

/* Guild Hero */
.guild-hero-description {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.guild-hero-description .text-muted {
  max-width: 640px;
}

.guild-desc-edit {
  margin-top: 0.1rem;
}

.guild-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.guild-login-btn {
  min-width: 180px;
  text-align: center;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

.guild-post-visibility {
  max-width: 150px;
}

.guild-raid-list {
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 0.75rem;
  padding-right: 0;
}

.nav-level {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.guild-pill {
  color: var(--text);
  background: rgba(105, 204, 240, 0.12);
  border-color: rgba(105, 204, 240, 0.4);
}

.guild-pill-link {
  text-decoration: none;
  color: var(--text);
}

.guild-pill-link:hover {
  text-decoration: none;
  color: var(--text);
  border-color: rgba(105, 204, 240, 0.65);
}

/* Posts */
.guild-post {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.18);
  background: rgba(12, 16, 20, 0.6);
  margin-bottom: 0.75rem;
}

.guild-post.is-pinned {
  border-color: rgba(217, 181, 107, 0.5);
  box-shadow: 0 0 0 1px rgba(217, 181, 107, 0.2);
}

.guild-post-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-time {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.post-time:hover {
  color: var(--amber);
  text-decoration: none;
}

.post-menu {
  margin-left: auto;
}

.post-menu .dropdown-toggle {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
}

.post-menu .dropdown-toggle:hover {
  color: var(--text-strong);
}

.post-menu .dropdown-menu {
  background: #0f1419;
  border: 1px solid rgba(217, 181, 107, 0.2);
  color: var(--text);
}

.post-menu .dropdown-item {
  color: var(--text);
}

.post-menu .dropdown-item:hover {
  background: rgba(217, 181, 107, 0.12);
  color: var(--text-strong);
}

.guild-post-title {
  font-weight: 600;
  color: var(--text-strong);
  text-decoration: none;
}

.guild-post-title:hover {
  color: var(--amber);
  text-decoration: none;
}

.guild-post-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.guild-post-body {
  color: var(--text);
  white-space: pre-wrap;
}

.guild-post-body.is-collapsed {
  max-height: 6.5em;
  overflow: hidden;
  position: relative;
}

.post-body-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--amber);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.35rem;
}

.post-body-toggle:hover {
  color: var(--amber-strong);
}

.guild-post-body a {
  color: var(--amber-strong);
  text-decoration: underline;
}

.guild-post-body a:hover {
  color: var(--amber);
}

.guild-post-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.post-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.post-comment-form {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.comment-textarea {
  min-height: 2.25rem;
  resize: vertical;
}

.post-divider {
  border: none;
  border-top: 1px solid rgba(217, 181, 107, 0.15);
  margin: 1rem 0;
}

.heart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.6);
  color: var(--text);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
}

.heart-btn.active {
  color: var(--amber);
  border-color: rgba(217, 181, 107, 0.6);
  box-shadow: 0 0 0 1px rgba(217, 181, 107, 0.2);
}

.comment-count {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Comments */
.comment-preview {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.4rem;
}

.comment-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.12);
  background: rgba(12, 16, 20, 0.55);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

.comment-action:hover {
  color: var(--amber);
}

.comment-action[disabled] {
  opacity: 0.6;
  cursor: default;
  text-decoration: none;
}

.comment-body {
  color: var(--text);
  font-size: 0.9rem;
}

.mention-link {
  color: var(--amber-strong);
  text-decoration: none;
  font-weight: 600;
}

.mention-link:hover {
  color: var(--amber);
  text-decoration: underline;
}

.admin-report-title a {
  color: var(--text);
  text-decoration: none;
}

.admin-report-title a:hover {
  color: var(--amber);
  text-decoration: underline;
}

/* Embeds */
.yt-embed {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  height: auto;
  padding-top: 0;
  display: block;
  max-height: calc(720px * 9 / 16);
  margin-top: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: #000;
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .yt-embed {
    width: 100%;
    max-width: 720px;
    height: 0;
    padding-top: 56.25%;
    max-height: none;
  }
}

.post-composer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.post-visibility {
  max-width: 160px;
}

/* Chat */
.guild-chat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.guild-chat-log {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#raidChatLog,
#lfgChatLog {
  height: 280px;
  max-height: 280px;
  overflow-y: auto;
}

.guild-chat-line {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.guild-chat-meta {
  color: var(--muted);
  white-space: nowrap;
}

.guild-chat-text {
  color: var(--text);
  word-break: break-word;
}

.guild-chat-text a {
  color: var(--amber-strong);
  text-decoration: underline;
}

.guild-chat-text a:hover {
  color: var(--amber);
}

.guild-chat-meta a {
  color: inherit;
  text-decoration: none;
}

.guild-chat-meta a:hover {
  text-decoration: underline;
}

.guild-chat-form {
  display: flex;
  gap: 0.6rem;
}

.guild-chat-form .form-control {
  flex: 1;
}

.guild-chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: rgba(12, 16, 20, 0.95);
  border: 1px solid rgba(217, 181, 107, 0.35);
  border-radius: 12px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.guild-chat-widget.is-collapsed .guild-chat-body {
  display: none;
}

.guild-chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(18, 22, 27, 0.95);
  cursor: pointer;
}

.guild-chat-title {
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-chat-unread {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(217, 181, 107, 0.9);
  color: #1a1208;
  font-size: 0.75rem;
  font-weight: 700;
}

.guild-chat-toggle {
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.guild-chat-body {
  display: flex;
  flex-direction: column;
  height: 320px;
}

.guild-chat-widget .guild-chat-log {
  flex: 1;
  max-height: none;
  border: none;
  background: transparent;
}

.guild-chat-input {
  border-radius: 0;
  border-top: 1px solid rgba(217, 181, 107, 0.2);
}

/* Typeahead */
.typeahead-wrap {
  position: relative;
  flex: 1;
}

.typeahead-wrap .form-control {
  width: 100%;
}

.typeahead-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: rgba(12, 16, 20, 0.95);
  border: 1px solid rgba(217, 181, 107, 0.3);
  border-radius: 8px;
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 180px;
  overflow-y: auto;
  z-index: 5;
}

.typeahead-list.is-open {
  display: flex;
}

.typeahead-item {
  background: transparent;
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.typeahead-item:hover {
  border-color: rgba(217, 181, 107, 0.6);
  color: var(--amber-strong);
}

/* Roster */
.guild-roster {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.guild-roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.guild-roster .roster-left {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.guild-roster .roster-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guild-roster .badge-pill {
  font-size: 0.65rem;
  padding: 0.18rem 0.45rem;
}

.class-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.signup-header-main .class-icon,
.signup-card .class-icon {
  width: 15px;
  height: 15px;
}

.profile-name .class-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
}

.raid-list {
  display: grid;
  gap: 0.75rem;
}

.raid-upcoming-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.raid-upcoming-list .guild-post {
  min-width: 0;
  overflow-x: hidden;
}

.raid-upcoming-list .guild-post-header {
  min-width: 0;
  flex-wrap: nowrap;
}

.raid-upcoming-list .guild-post-title {
  max-width: 100%;
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-upcoming-list .guild-post-badge {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 50%;
  overflow: hidden;
}

.raid-upcoming-list .guild-post-header > .text-muted {
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-upcoming-list .guild-post-badge .badge-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-upcoming-list .guild-post-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.raid-upcoming-list .raid-notes-preview {
  margin-top: 0.25rem;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
}

/* Guild / Profile Links */
.guild-banner {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.2);
}

.guild-banner img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.profile-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.profile-link:hover {
  text-decoration: none;
  color: inherit;
}

.player-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
}

.player-link:hover {
  text-decoration: none;
  filter: brightness(1.1);
}

.linked-characters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.linked-character {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.raid-signup-card.is-syncing {
  opacity: 0.6;
  outline: 1px dashed rgba(217, 181, 107, 0.6);
  outline-offset: -2px;
}

/* Sidebar */
.main-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 220px;
  padding: 1rem 0.75rem;
  background: rgba(12, 16, 20, 0.8);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  padding-bottom: 0.55rem;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(217, 181, 107, 0.25);
  border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 181, 107, 0.4);
}

.nav-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-sidebar .nav-link .nav-icon {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  color: inherit;
}

.nav-sidebar .nav-link p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link:focus {
  background: rgba(217, 181, 107, 0.12);
  color: var(--amber-strong);
  text-decoration: none;
}

.nav-sidebar .nav-link:hover .nav-icon,
.nav-sidebar .nav-link:focus .nav-icon {
  color: inherit;
}

.nav-sidebar .nav-header {
  margin: 0.75rem 0 0.4rem;
  padding: 0 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.sidebar-bmc {
  flex: 0 0 auto;
  padding: 0.65rem 0.5rem 0.25rem;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, rgba(12, 16, 20, 0), rgba(12, 16, 20, 0.92) 45%);
  border-top: 1px solid rgba(217, 181, 107, 0.12);
}

.bmc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1206;
  background: var(--amber-strong);
  border: 1px solid rgba(0, 0, 0, 0.25);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.bmc-link:hover,
.bmc-link:focus {
  color: #1b1206;
  background: #f3c96b;
  text-decoration: none;
}

.bmc-icon {
  font-size: 0.85rem;
}

.nav-sidebar .nav-link.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.soon-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-strong);
  border: 1px solid rgba(217, 181, 107, 0.3);
  vertical-align: center;
}

.guild-badge {
  display: inline-block;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.02em;
}

.content-wrapper {
  min-height: calc(100vh - 56px);
  margin-left: 220px;
  padding: 2.5rem 2rem 3rem;
  transition: margin-left 0.25s ease;
}

/* Cards + Modals */
.login-box {
  width: 100%;
  max-width: 460px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.card-header {
  border-bottom: 1px solid rgba(217, 181, 107, 0.18);
  background: rgba(12, 16, 20, 0.8);
}

.card-header h3,
.card-header h4 {
  font-family: "Cinzel", "Source Sans 3", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-strong);
  margin: 0;
}

.card-body {
  color: var(--text);
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.modal-header,
.modal-footer {
  border-color: rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.85);
}

.modal-title {
  font-family: "Cinzel", "Source Sans 3", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-strong);
  font-size: 0.95rem;
}

.modal .btn-close {
  filter: invert(1) brightness(0.9);
  opacity: 0.65;
}

.modal .btn-close:hover {
  opacity: 1;
}

.signup-modal .modal-dialog {
  max-width: min(92vw, 680px);
}

.signup-modal .modal-body {
  padding: 1rem 1.2rem 1.1rem;
}

.nav-tabs {
  border-bottom: 1px solid rgba(217, 181, 107, 0.25);
  gap: 0.45rem;
}

.nav-tabs .nav-link {
  color: var(--muted);
  background: rgba(9, 12, 16, 0.5);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.nav-tabs .nav-link:hover {
  color: var(--amber);
  border-color: rgba(217, 181, 107, 0.4);
  text-decoration: none;
}

.nav-tabs .nav-link.active {
  color: var(--amber-strong);
  background: rgba(14, 18, 24, 0.9);
  border-color: rgba(217, 181, 107, 0.4);
  border-bottom-color: transparent;
}

.login-box-msg {
  color: var(--muted);
}

.form-control {
  background: rgba(9, 12, 16, 0.8);
  border: 1px solid rgba(217, 181, 107, 0.2);
  color: var(--text);
  border-radius: 10px;
}

.form-control::placeholder {
  color: rgba(226, 210, 170, 0.55);
  opacity: 1;
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.6);
}

.input-group-text {
  background: rgba(12, 16, 20, 0.92);
  border: 1px solid rgba(217, 181, 107, 0.24);
  color: var(--amber-strong);
}

.form-select {
  background-color: rgba(9, 12, 16, 0.8);
  border: 1px solid rgba(217, 181, 107, 0.2);
  color: var(--text);
  border-radius: 10px;
}

select.form-control {
  background-color: rgba(9, 12, 16, 0.8);
  border: 1px solid rgba(217, 181, 107, 0.2);
  color: var(--text);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.1rem;
  background-image: linear-gradient(45deg, transparent 50%, rgba(226, 210, 170, 0.85) 50%),
    linear-gradient(135deg, rgba(226, 210, 170, 0.85) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-select option {
  background-color: #0c1014;
  color: var(--text);
}

.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.6);
}

select.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.6);
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
textarea:disabled,
input:disabled,
select:disabled {
  background-color: rgba(9, 12, 16, 0.62) !important;
  border-color: rgba(217, 181, 107, 0.2) !important;
  color: rgba(239, 231, 214, 0.78) !important;
  -webkit-text-fill-color: rgba(239, 231, 214, 0.78);
  opacity: 1;
  cursor: not-allowed;
}

.form-select:disabled {
  background-image: linear-gradient(45deg, transparent 50%, rgba(226, 210, 170, 0.5) 50%),
    linear-gradient(135deg, rgba(226, 210, 170, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select.form-control:disabled {
  background-image: linear-gradient(45deg, transparent 50%, rgba(226, 210, 170, 0.5) 50%),
    linear-gradient(135deg, rgba(226, 210, 170, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Raid Signup + Overview */
.raid-signup-panel {
  display: none;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
}

.raid-signup-panel.is-open {
  display: flex;
}

.raid-signup-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.signup-modal .raid-signup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
}

.signup-modal .raid-signup-row .raid-role-select,
.signup-modal .raid-signup-row .raid-status-select {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.signup-modal .raid-signup-row .btn {
  flex: 0 0 auto;
  min-width: 170px;
}

.raid-overview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.raid-overview-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.raid-overview-status {
  display: flex;
  align-items: center;
}

.raid-signup-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--amber-strong);
  background: rgba(217, 181, 107, 0.12);
  border: 1px solid rgba(217, 181, 107, 0.35);
  white-space: nowrap;
}

.raid-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.2rem;
}

.raid-overview-meta {
  display: grid;
  gap: 0.4rem;
}

.raid-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.raid-meta-label {
  min-width: 90px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
}

.raid-meta-value {
  color: var(--text);
  font-size: 0.95rem;
}

.raid-overview-stats {
  display: grid;
  gap: 0.6rem;
}

.raid-stat {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.55);
}

.raid-stat-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.raid-stat-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.raid-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.35);
  color: var(--amber-strong);
  font-size: 0.75rem;
  background: rgba(217, 181, 107, 0.12);
}

.raid-role-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
}

.signup-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.85rem;
}

.signup-role-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
}

.signup-role-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--muted);
}

.signup-status-icon {
  margin-left: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.signup-status-icon.is-confirmed {
  color: #7fe3a1;
}

.signup-status-icon.is-waitlist {
  color: #e6c66e;
}

.signup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.signup-header-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.signup-level-badge {
  font-size: 0.65rem;
  padding: 0.18rem 0.45rem;
  white-space: nowrap;
}

.signup-header-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.raid-role-select {
  max-width: 160px;
  width: 160px;
  flex: 0 0 160px;
}

.raid-reserve-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.raid-reserve-select {
  max-width: 120px;
  width: 120px;
  flex: 0 0 120px;
}

.raid-reserve-input {
  min-width: 180px;
}

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

.raid-reserve-active {
  font-size: 0.9rem;
}

.raid-reserve-search-wrap {
  display: grid;
  gap: 0.65rem;
}

.raid-reserve-results {
  display: grid;
  gap: 0.45rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.raid-reserve-result {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.raid-reserve-results .loot-item {
  grid-template-columns: 44px 1fr;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
}

.raid-reserve-results .loot-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.raid-reserve-results .loot-name {
  font-size: 0.92rem;
  margin-bottom: 0.1rem;
}

.raid-reserve-results .loot-meta {
  font-size: 0.78rem;
  line-height: 1.25;
}

.raid-reserve-results .loot-desc {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.raid-reserve-result:hover {
  border-color: rgba(217, 181, 107, 0.45);
  background: rgba(217, 181, 107, 0.08);
}

.raid-reserve-result-body {
  min-width: 0;
}

.raid-reserve-picked {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.raid-reserve-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.raid-reserve-existing-list {
  display: grid;
  gap: 0.45rem;
}

.raid-reserve-existing-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.15);
  background: rgba(12, 16, 20, 0.55);
}

.raid-reserve-existing-type {
  font-weight: 700;
  color: var(--amber-strong);
  min-width: 28px;
}

.raid-reserve-inline {
  display: grid;
  grid-template-columns: 96px repeat(3, minmax(0, 0.9fr)) minmax(0, 1.4fr);
  gap: 0.65rem;
  align-items: center;
}

.raid-reserve-inline .form-select,
.raid-reserve-inline .form-control {
  min-width: 0;
}

.raid-hr-assign-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.9fr)) minmax(0, 1.35fr);
  gap: 0.65rem;
  align-items: center;
}

.raid-hr-assign-result {
  width: 100%;
  text-align: left;
}

@media (max-width: 1200px) {
  .raid-reserve-inline {
    grid-template-columns: 96px repeat(2, minmax(0, 1fr));
  }

  .raid-hr-assign-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .raid-reserve-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.raid-reserve-existing-name {
  flex: 1;
  min-width: 0;
}

.raid-reserve-remove {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .raid-reserve-inline {
    grid-template-columns: 1fr;
  }

  .raid-hr-assign-filters {
    grid-template-columns: 1fr;
  }
}

.raid-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.35);
  color: var(--amber-strong);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.raid-group-select {
  max-width: 140px;
}

.raid-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
}

@media (max-width: 980px) {
  .raid-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .raid-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

.raid-group-col {
  background: rgba(10, 12, 16, 0.7);
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  padding: 0.6rem;
  min-height: 140px;
  min-width: 0;
}

.raid-group-header {
  font-family: "Cinzel", "Source Sans 3", serif;
  color: var(--amber-strong);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.raid-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 80px;
}

.raid-group-list.is-drop-target,
.raid-group-col.is-drop-target {
  outline: 2px dashed rgba(217, 181, 107, 0.5);
  outline-offset: 4px;
  border-radius: 10px;
  background: rgba(217, 181, 107, 0.08);
}

.raid-signup-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.9);
  border-radius: 10px;
  padding: 0.5rem;
}

.raid-signup-manage-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.raid-manage-status-select {
  min-width: 150px;
}

.raid-signup-reserves {
  display: none;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(217, 181, 107, 0.25);
  gap: 0.35rem;
  flex-direction: column;
}

.raid-signup-reserves.is-open {
  display: flex;
}

.raid-srplus-switch {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin: 0.1rem 0 0.2rem;
  padding-left: 2.65rem;
  color: var(--muted);
}

.raid-srplus-switch .form-check-input {
  cursor: pointer;
  margin-top: 0;
  margin-right: 0.4rem;
  background-color: rgba(148, 163, 184, 0.28);
  border-color: rgba(148, 163, 184, 0.42);
}

.raid-srplus-switch .form-check-input:checked {
  background-color: var(--amber-strong);
  border-color: var(--amber-strong);
}

.raid-srplus-switch .form-check-label {
  cursor: pointer;
  font-size: 0.9rem;
}

.raid-reserve-line {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  align-items: center;
  flex-wrap: wrap;
}

.raid-reserve-line-type {
  min-width: 24px;
  font-weight: 700;
  color: var(--amber-strong);
}

.raid-reserve-line-item {
  flex: 1;
  min-width: 160px;
}

.raid-reserve-srplus-editor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.raid-reserve-srplus-editor .form-control {
  width: 78px;
  min-width: 78px;
  height: 1.8rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
}

.btn-xs {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  line-height: 1.1;
}

.raid-signup-card.drag-enabled {
  cursor: grab;
}

.raid-signup-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.raid-dashboard-shell {
  align-items: flex-start;
}

.raid-calendar-card .card-body {
  padding: 1rem;
}

.raid-calendar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.raid-calendar-toggle .btn.active {
  background: rgba(217, 181, 107, 0.18);
  border-color: rgba(217, 181, 107, 0.42);
  color: var(--amber-strong);
}

#raidCalendar {
  --fc-border-color: rgba(217, 181, 107, 0.16);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(12, 16, 20, 0.48);
  --fc-today-bg-color: rgba(217, 181, 107, 0.10);
  --fc-event-bg-color: rgba(217, 181, 107, 0.18);
  --fc-event-border-color: rgba(217, 181, 107, 0.42);
  --fc-event-text-color: var(--text);
}

#raidCalendar .fc {
  color: var(--text);
}

#raidCalendar .fc-scrollgrid,
#raidCalendar .fc-theme-standard td,
#raidCalendar .fc-theme-standard th {
  border-color: rgba(217, 181, 107, 0.16);
}

#raidCalendar .fc-col-header-cell-cushion,
#raidCalendar .fc-daygrid-day-number,
#raidCalendar .fc-timegrid-axis-cushion,
#raidCalendar .fc-timegrid-slot-label-cushion {
  color: var(--text);
  text-decoration: none;
}

#raidCalendar .fc-daygrid-day,
#raidCalendar .fc-timegrid-col,
#raidCalendar .fc-timegrid-slot {
  background: rgba(12, 16, 20, 0.35);
}

#raidCalendar .fc-event {
  border-radius: 10px;
  padding: 2px 4px;
}

#raidCalendar .fc-event:hover {
  background: rgba(217, 181, 107, 0.24);
  border-color: rgba(217, 181, 107, 0.55);
}

.raid-calendar-reset-switch {
  display: inline-flex;
  align-items: center;
  margin: 0;
  min-height: 0;
  padding-left: 2.5rem;
  color: var(--muted);
  white-space: nowrap;
}

.raid-calendar-reset-switch .form-check-input {
  cursor: pointer;
  margin-top: 0;
  margin-right: 4px;
  background-color: rgba(148, 163, 184, 0.28);
  border-color: rgba(148, 163, 184, 0.4);
}

.raid-calendar-reset-switch .form-check-input:checked {
  background-color: var(--amber-strong);
  border-color: var(--amber-strong);
}

.raid-calendar-reset-switch .form-check-label {
  cursor: pointer;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .raid-srplus-switch {
    padding-left: 2.45rem;
    line-height: 1.35;
  }
}

.raid-reset-list {
  display: grid;
  gap: 0.75rem;
}

.raid-timer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

#raidTimersModal .modal-dialog {
  max-width: 1080px;
}

#raidTimersModal .modal-body {
  max-height: min(72vh, 760px);
  overflow-y: auto;
  padding: 1rem;
}

.raid-reset-item {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.4rem;
  min-height: 122px;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.14);
  background: rgba(12, 16, 20, 0.55);
}

.raid-reset-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
}

.raid-reset-name {
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.raid-reset-countdown {
  display: inline-flex;
  align-items: baseline;
  justify-self: end;
  gap: 0.28rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--amber-strong);
  font-weight: 700;
}

.raid-reset-countdown .seconds {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 2.4ch;
  text-align: right;
}

.raid-reset-sub {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.3;
  min-height: 2.6em;
}

.raid-reset-date {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

#raidCalendar .fc-event.fc-raid-reset,
#raidCalendar .fc-daygrid-event.fc-raid-reset,
#raidCalendar .fc-timegrid-event.fc-raid-reset {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.56);
  font-size: 0.72rem;
  line-height: 1.1;
  padding: 1px 4px;
  min-height: 18px;
}

#raidCalendar .fc-event.fc-raid-reset:hover,
#raidCalendar .fc-daygrid-event.fc-raid-reset:hover,
#raidCalendar .fc-timegrid-event.fc-raid-reset:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.26);
}

#raidCalendar .fc-event.fc-raid-reset .fc-event-time,
#raidCalendar .fc-daygrid-event.fc-raid-reset .fc-event-time,
#raidCalendar .fc-timegrid-event.fc-raid-reset .fc-event-time {
  display: none !important;
}

#raidCalendar .fc-event.fc-raid-reset .fc-event-title,
#raidCalendar .fc-daygrid-event.fc-raid-reset .fc-event-title,
#raidCalendar .fc-timegrid-event.fc-raid-reset .fc-event-title {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.9;
}

.raid-reset-popover {
  min-width: 220px;
}

.raid-reset-popover-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.raid-reset-popover-sub {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.raid-reset-popover-time {
  font-size: 0.84rem;
  color: var(--amber-strong);
}

#raidCalendar .fc-event.fc-raid-public,
#raidCalendar .fc-daygrid-event.fc-raid-public,
#raidCalendar .fc-timegrid-event.fc-raid-public,
#raidCalendar .fc-event.fc-raid-guild,
#raidCalendar .fc-daygrid-event.fc-raid-guild,
#raidCalendar .fc-timegrid-event.fc-raid-guild,
#raidCalendar .fc-event.fc-raid-external,
#raidCalendar .fc-daygrid-event.fc-raid-external,
#raidCalendar .fc-timegrid-event.fc-raid-external {
  line-height: 1.1;
  padding: 1px 4px;
  min-height: 18px;
}

#raidCalendar .fc-event.fc-raid-public .fc-event-time,
#raidCalendar .fc-daygrid-event.fc-raid-public .fc-event-time,
#raidCalendar .fc-timegrid-event.fc-raid-public .fc-event-time,
#raidCalendar .fc-event.fc-raid-guild .fc-event-time,
#raidCalendar .fc-daygrid-event.fc-raid-guild .fc-event-time,
#raidCalendar .fc-timegrid-event.fc-raid-guild .fc-event-time,
#raidCalendar .fc-event.fc-raid-external .fc-event-time,
#raidCalendar .fc-daygrid-event.fc-raid-external .fc-event-time,
#raidCalendar .fc-timegrid-event.fc-raid-external .fc-event-time {
  display: none !important;
}

#raidCalendar .fc-event.fc-raid-public .fc-event-title,
#raidCalendar .fc-daygrid-event.fc-raid-public .fc-event-title,
#raidCalendar .fc-timegrid-event.fc-raid-public .fc-event-title,
#raidCalendar .fc-event.fc-raid-guild .fc-event-title,
#raidCalendar .fc-daygrid-event.fc-raid-guild .fc-event-title,
#raidCalendar .fc-timegrid-event.fc-raid-guild .fc-event-title,
#raidCalendar .fc-event.fc-raid-external .fc-event-title,
#raidCalendar .fc-daygrid-event.fc-raid-external .fc-event-title,
#raidCalendar .fc-timegrid-event.fc-raid-external .fc-event-title {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.95;
}

.raid-event-inline {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-event-instance {
  font-weight: 700;
}

.raid-event-by {
  opacity: 0.78;
  margin-left: 0.2rem;
}

.raid-event-creator {
  font-weight: 600;
}

.raid-event-popover {
  min-width: 250px;
}

.raid-event-popover-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.raid-event-popover-row {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.28rem;
}

.raid-event-popover-row strong {
  color: var(--text);
  font-weight: 700;
}

.raid-event-popover-actions {
  margin-top: 0.6rem;
}

.raid-event-popover-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.35);
  background: rgba(217, 181, 107, 0.12);
  color: var(--amber-strong);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.raid-event-popover-link:hover {
  background: rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.55);
  color: var(--amber-strong);
  text-decoration: none;
}

#raidCalendar + .popover,
.popover {
  --bs-popover-bg: rgba(16, 20, 26, 0.98);
  --bs-popover-border-color: rgba(217, 181, 107, 0.22);
  --bs-popover-header-bg: rgba(12, 16, 20, 0.92);
  --bs-popover-header-color: var(--amber-strong);
  --bs-popover-body-color: var(--text);
  --bs-popover-max-width: 260px;
  --bs-popover-arrow-border: rgba(217, 181, 107, 0.22);
}

.popover {
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.popover .popover-arrow::before,
.popover .popover-arrow::after {
  border-top-color: rgba(16, 20, 26, 0.98) !important;
  border-bottom-color: rgba(16, 20, 26, 0.98) !important;
}

.popover.bs-popover-top .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="top"] .popover-arrow::before,
.popover.bs-popover-top .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="top"] .popover-arrow::after {
  border-top-color: rgba(16, 20, 26, 0.98) !important;
}

.popover.bs-popover-bottom .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="bottom"] .popover-arrow::before,
.popover.bs-popover-bottom .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="bottom"] .popover-arrow::after {
  border-bottom-color: rgba(16, 20, 26, 0.98) !important;
}

.popover.bs-popover-start .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="left"] .popover-arrow::before,
.popover.bs-popover-start .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="left"] .popover-arrow::after {
  border-left-color: rgba(16, 20, 26, 0.98) !important;
}

.popover.bs-popover-end .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="right"] .popover-arrow::before,
.popover.bs-popover-end .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="right"] .popover-arrow::after {
  border-right-color: rgba(16, 20, 26, 0.98) !important;
}

.popover .popover-body {
  padding: 0.75rem 0.85rem;
}

@media (max-width: 700px) {
  .raid-timer-grid {
    grid-template-columns: 1fr;
  }

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

  .raid-reset-countdown {
    justify-self: start;
  }

  .raid-reset-date {
    white-space: normal;
  }
}

.raid-calendar-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 180px;
}

.raid-calendar-range-label {
  min-height: 1.25rem;
  font-size: 0.95rem;
}

.raid-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.raid-calendar-control-stack {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.raid-calendar-nav .btn,
.raid-calendar-toggle .btn {
  min-width: 42px;
}

.raid-calendar-scope {
  min-width: 150px;
  max-width: 170px;
  margin: 0;
}

.raid-calendar-controls .form-select,
.raid-calendar-controls .btn {
  height: 38px;
}

.raid-calendar-controls .btn[disabled],
.raid-calendar-controls .form-select[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

#raidCalendar .fc-event.fc-raid-public,
#raidCalendar .fc-daygrid-event.fc-raid-public,
#raidCalendar .fc-timegrid-event.fc-raid-public {
  background: rgba(217, 181, 107, 0.18);
  border-color: rgba(243, 201, 107, 0.65);
  color: var(--text);
}

#raidCalendar .fc-event.fc-raid-guild,
#raidCalendar .fc-daygrid-event.fc-raid-guild,
#raidCalendar .fc-timegrid-event.fc-raid-guild {
  background: rgba(30, 125, 67, 0.32);
  border-color: rgba(74, 222, 128, 0.75);
  color: #ecfff1;
}

#raidCalendar .fc-event.fc-raid-external,
#raidCalendar .fc-daygrid-event.fc-raid-external,
#raidCalendar .fc-timegrid-event.fc-raid-external {
  background: rgba(79, 120, 196, 0.32);
  border-color: rgba(147, 197, 253, 0.75);
  color: #eef5ff;
}

#raidCalendar .fc-event.fc-raid-guild:hover,
#raidCalendar .fc-daygrid-event.fc-raid-guild:hover,
#raidCalendar .fc-timegrid-event.fc-raid-guild:hover {
  background: rgba(40, 150, 80, 0.42);
  border-color: rgba(110, 231, 183, 0.95);
}

#raidCalendar .fc-event.fc-raid-external:hover,
#raidCalendar .fc-daygrid-event.fc-raid-external:hover,
#raidCalendar .fc-timegrid-event.fc-raid-external:hover {
  background: rgba(92, 133, 212, 0.42);
  border-color: rgba(191, 219, 254, 0.95);
}

#raidCalendar .fc-day-today {
  background: rgba(217, 181, 107, 0.08) !important;
}

#raidCalendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-strong);
  font-weight: 700;
}

#raidCalendar .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-strong);
  font-weight: 700;
}

#raidCalendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-number:hover,
#raidCalendar .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion:hover {
  text-decoration: none;
}

.raid-calendar-toggle-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.85rem;
}

@media (max-width: 980px) {
  .raid-calendar-header {
    align-items: stretch;
  }

  .raid-calendar-control-stack {
    width: 100%;
    align-items: stretch;
  }

  .raid-calendar-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .raid-calendar-toggle-wrap {
    align-items: center;
    justify-content: flex-start;
  }

  .raid-calendar-toggle-wrap .raid-calendar-toggle {
    width: 100%;
  }

  .raid-calendar-toggle-wrap .raid-calendar-toggle .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 700px) {
  .raid-calendar-control-stack {
    gap: 0.55rem;
  }

  .raid-calendar-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .raid-calendar-scope {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .raid-calendar-nav,
  .raid-calendar-toggle {
    width: 100%;
  }

  .raid-calendar-nav .btn,
  .raid-calendar-toggle .btn {
    flex: 1 1 auto;
  }

  .raid-calendar-toggle-wrap {
    flex-wrap: wrap;
    gap: 0.6rem 0.9rem;
  }
}

@media (max-width: 900px) {
  .raid-calendar-controls {
    width: 100%;
  }

  .raid-calendar-scope {
    min-width: 0;
    width: 100%;
  }
}

.btn-success {
  background: linear-gradient(135deg, #c8923e, #e7bd67);
  border: 1px solid rgba(255, 214, 128, 0.35);
  color: #1a1208;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  padding: 0.65rem 1.6rem;
  box-shadow: 0 10px 18px rgba(194, 138, 54, 0.18);
}

.btn-success:hover {
  background: linear-gradient(135deg, #d9a24a, #f0c86f);
  color: #160f06;
  border-color: rgba(255, 214, 128, 0.6);
}

.btn-success:focus,
.btn-success:active {
  box-shadow: 0 0 0 0.2rem rgba(217, 181, 107, 0.25);
}

.btn-success.btn-lg {
  font-size: 0.95rem;
  line-height: 1.2;
}

.btn-outline-secondary {
  border-color: rgba(217, 181, 107, 0.4);
  color: var(--text);
}

.btn-outline-secondary:hover {
  background: rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.7);
  color: var(--text);
}

.mw-250 {
  max-width: 320px;
  margin: 0 auto;
}

.text-danger {
  color: #ff6b6b !important;
}

.text-success {
  color: var(--success) !important;
}

.text-muted {
  color: var(--muted) !important;
}

.small {
  font-size: 0.85rem;
}

.reg-code-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(217, 181, 107, 0.15);
  border: 1px solid rgba(217, 181, 107, 0.4);
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-strong);
}

.reg-command {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  background: rgba(12, 16, 20, 0.9);
  color: var(--text);
  border: 1px solid rgba(217, 181, 107, 0.25);
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
}

.reg-status {
  font-size: 0.95rem;
  color: var(--success);
}

.profile-hero,
.dash-hero {
  margin-bottom: 1.5rem;
}

.profile-header,
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
  color: var(--muted);
}

.profile-name {
  font-family: "Cinzel", "Source Sans 3", serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 2rem;
  margin: 0.2rem 0 0.4rem;
  color: var(--amber-strong);
}

.profile-sub {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-sub-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-strong);
  background: rgba(217, 181, 107, 0.15);
  border: 1px solid rgba(217, 181, 107, 0.35);
}

.badge-pill.pinned {
  color: #ffe6a6;
  background: rgba(217, 181, 107, 0.25);
  border-color: rgba(217, 181, 107, 0.6);
}

.armory-refresh-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.35);
  background: rgba(12, 16, 20, 0.6);
  color: var(--amber-strong);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.armory-refresh-btn:hover {
  border-color: rgba(217, 181, 107, 0.6);
  transform: translateY(-1px);
}

.armory-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

.profile-guild-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.profile-guild-presence {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
  line-height: 1.35;
}

.profile-status {
  margin-top: 0.75rem;
  min-height: 1.2rem;
  color: var(--muted);
}

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

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(240px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.dashboard-shell.split-panels {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dashboard-main {
  display: grid;
  gap: 1.25rem;
}

.dashboard-side {
  display: grid;
  gap: 1.25rem;
  align-self: start;
}

.feed-card {
  min-height: 160px;
}

#raidChatCard,
#lfgChatCard {
  min-height: 0;
}

.module-card {
  min-height: 140px;
}

.shell-card {
  min-height: 160px;
}

.section-title {
  font-family: "Cinzel", "Source Sans 3", serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--amber-strong);
}

.dashboard-overview-list {
  display: grid;
  gap: 0.5rem;
}

.dashboard-overview-list .guild-post {
  margin-bottom: 0;
}

.dashboard-overview-compact {
  display: grid;
  gap: 0.55rem;
}

.dashboard-overview-item {
  border: 1px solid rgba(217, 181, 107, 0.18);
  background: rgba(8, 11, 15, 0.5);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.dashboard-overview-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-strong);
  font-weight: 600;
}

.dashboard-overview-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.dashboard-overview-line strong {
  color: var(--text-strong);
  font-weight: 600;
  text-align: right;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(217, 181, 107, 0.12);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-value {
  font-weight: 600;
}

.quick-links {
  display: grid;
  gap: 0.6rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.6);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quick-link i {
  color: var(--amber-strong);
}

.quick-link:hover {
  border-color: rgba(217, 181, 107, 0.5);
  background: rgba(217, 181, 107, 0.1);
  color: var(--amber-strong);
}

.loot-hero {
  margin-bottom: 1.5rem;
}

.loot-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.loot-filters {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.loot-search-primary {
  margin-top: 1.2rem;
}

.loot-filter-panel {
  margin-top: 1rem;
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.45);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.loot-filters-primary {
  margin-top: 0;
}

.loot-filters-secondary {
  margin-top: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(217, 181, 107, 0.16);
}

.loot-advanced {
  margin-top: 1rem;
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.45);
  padding: 0.65rem 0.85rem;
}

.loot-advanced > summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
}

.loot-advanced > summary::-webkit-details-marker {
  display: none;
}

.loot-advanced > summary::after {
  content: '▾';
  float: right;
  color: var(--amber-strong);
}

.loot-advanced[open] > summary::after {
  content: '▴';
}

.loot-advanced .loot-filters {
  margin-top: 0.9rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-actions {
  align-items: flex-start;
  justify-content: flex-end;
}

.level-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.loot-results-wrap {
  display: grid;
  gap: 1rem;
}

.loot-status {
  color: var(--muted);
}

.loot-results {
  display: grid;
  gap: 0.85rem;
}

.loot-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(10, 14, 18, 0.75);
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
}

.loot-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20, 24, 30, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
}

.loot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loot-name {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.loot-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.loot-desc {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.external-raid-item-row {
  grid-template-columns: 40px 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
}

.external-raid-item-row .loot-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.external-raid-character {
  font-weight: 400;
}

.external-raid-character-tank {
  color: #8cb8ff;
}

.external-raid-character-healer {
  color: #8ae2a9;
}

.external-raid-character-dps {
  color: #f2d27d;
}

.external-raid-character-unknown {
  color: var(--text);
}

.external-raid-reserve-tabs {
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.external-raid-reserve-tabs .nav-link {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
}

.external-raid-reserve-panels {
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 10px;
  background: rgba(10, 14, 18, 0.62);
  padding: 0.8rem;
}

.external-raid-reserve-panel {
  display: none;
}

.external-raid-reserve-panel.is-active {
  display: block;
}

.bis-loot-filters {
  margin-top: 0;
}

.bis-home-shell {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.95fr);
}

.bis-detail-shell {
  grid-template-columns: minmax(0, 1fr);
}

.bis-planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.9fr);
  gap: 1rem;
}

.bis-planner-grid {
  display: grid;
  gap: 0.8rem;
}

.bis-planner-armor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.bis-slot-spacer {
  min-height: 0.1rem;
}

.bis-planner-weapon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.bis-slot-card {
  border: 1px solid rgba(217, 181, 107, 0.24);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.75);
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.bis-slot-card.is-filled {
  border-color: rgba(217, 181, 107, 0.35);
}

.bis-slot-card.is-owner {
  cursor: default;
  transition: border-color 0.15s ease;
}

.bis-slot-card.is-owner:hover {
  border-color: rgba(217, 181, 107, 0.35);
}

.bis-slot-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bis-slot-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.bis-slot-item-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.bis-slot-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.bis-slot-item-meta .loot-name {
  margin-bottom: 0.2rem;
}

.bis-slot-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bis-stat-summary {
  border: 1px solid rgba(217, 181, 107, 0.24);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.65);
  padding: 0.8rem;
  height: fit-content;
}

.bis-stat-summary h6 {
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.bis-stat-list,
.bis-effect-list {
  display: grid;
  gap: 0.4rem;
}

.bis-stat-row,
.bis-effect-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.bis-effect-line {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.bis-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.bis-inline-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.2rem 0;
  padding-left: 0;
}

.bis-inline-switch .form-check-input {
  margin-top: 0;
  margin-left: 0;
  float: none;
}

.bis-pagination {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bis-loot-item {
  align-items: start;
}

.bis-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.bis-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.guides-home-shell {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.95fr);
}

.guide-home-no-side {
  grid-template-columns: minmax(0, 1fr);
}

.guide-detail-shell {
  grid-template-columns: minmax(0, 1fr);
}

.guides-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.75);
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.75rem;
}

.guides-head {
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
}

.guides-title {
  color: var(--amber-strong);
  font-weight: 700;
  font-size: 1.02rem;
}

.guides-title:hover {
  color: #ffe8b3;
}

.guides-owner-link {
  color: var(--amber-strong);
  text-decoration: none;
  font-weight: 700;
}

.guides-owner-link:hover,
.guides-owner-link:focus {
  color: #ffe8b3;
  text-decoration: underline;
}

.guides-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.84rem;
}

.guides-list-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.guides-list-controls .form-group {
  margin: 0;
  flex: 0 0 auto;
}

#guidesSortSelect {
  min-width: 170px;
  max-width: 100%;
}

.guides-vote-chip {
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(12, 16, 20, 0.55);
}

@media (max-width: 900px) {
  .guides-list-controls {
    width: 100%;
    justify-content: flex-start;
  }

  #guidesSortSelect {
    min-width: 150px;
  }
}

.guides-summary {
  margin-top: 0.65rem;
  color: var(--text);
  line-height: 1.45;
}

.guide-detail-summary {
  margin-top: 0.55rem;
  color: var(--text);
  line-height: 1.45;
  max-width: 960px;
}

.guides-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.guides-pagination {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guide-vote-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.guide-vote-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.guide-vote-buttons .btn.active {
  border-color: rgba(217, 181, 107, 0.6);
  color: var(--amber);
  box-shadow: 0 0 0 1px rgba(217, 181, 107, 0.15);
}

.guide-comment-list {
  margin-top: 0.5rem;
}

.guide-comment-item .comment-body {
  white-space: normal;
}

.guide-comment-replies {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
  border-left: 1px solid rgba(217, 181, 107, 0.15);
  padding-left: 0.7rem;
}

.guide-comment-item.depth-2 .guide-comment-replies {
  padding-left: 0;
  border-left: 0;
}

.guide-block {
  margin-bottom: 0.95rem;
}

.guide-block:last-child {
  margin-bottom: 0;
}

.guide-block-markdown {
  line-height: 1.65;
}

.guide-block-markdown h1,
.guide-block-markdown h2,
.guide-block-markdown h3,
.guide-block-markdown h4 {
  font-family: "Cinzel", "Source Sans 3", serif;
  color: var(--amber-strong);
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}

.guide-block-markdown p {
  margin-bottom: 0.7rem;
}

.guide-block-markdown ul,
.guide-block-markdown ol {
  margin-bottom: 0.7rem;
  padding-left: 1.25rem;
}

.guide-block-markdown a {
  color: var(--amber-strong);
  text-decoration: underline;
}

.guide-block-markdown a:hover {
  color: #ffe8b3;
}

.guide-block-image img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(0, 0, 0, 0.35);
}

.guide-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.guide-editor-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.guide-editor-block {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.6);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.guide-editor-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.guide-editor-type {
  color: var(--amber-strong);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.guide-editor-tools {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.guide-block-textarea {
  min-height: 140px;
}

.guide-block-note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.guide-block-preview {
  margin-top: 0.55rem;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(6, 9, 14, 0.55);
  padding: 0.55rem 0.65rem;
  line-height: 1.5;
}

.guide-block-preview h1,
.guide-block-preview h2,
.guide-block-preview h3,
.guide-block-preview h4 {
  margin-top: 0.75rem;
  margin-bottom: 0.45rem;
  color: var(--amber-strong);
}

.guide-block-preview p {
  margin-bottom: 0.55rem;
}

.guide-editor-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guide-editor-canvas {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.75);
  padding: 0.9rem;
}

.guide-editor-canvas .codex-editor__redactor {
  padding-bottom: 0 !important;
}

.guide-editor-canvas .ce-block__content,
.guide-editor-canvas .ce-toolbar__content {
  max-width: 100%;
}

.guide-editor-canvas .ce-paragraph,
.guide-editor-canvas .ce-header {
  color: var(--text);
}

.guide-editor-canvas .ce-toolbar__plus,
.guide-editor-canvas .ce-toolbar__settings-btn {
  color: var(--amber-strong) !important;
  background: rgba(217, 181, 107, 0.12) !important;
  border: 1px solid rgba(217, 181, 107, 0.42) !important;
  border-radius: 8px !important;
}

.guide-editor-canvas .ce-toolbar__plus:hover,
.guide-editor-canvas .ce-toolbar__settings-btn:hover,
.guide-editor-canvas .ce-toolbar__plus:focus,
.guide-editor-canvas .ce-toolbar__settings-btn:focus {
  color: #ffe8b3 !important;
  background: rgba(217, 181, 107, 0.2) !important;
  border-color: rgba(217, 181, 107, 0.62) !important;
}

.guide-editor-canvas .ce-toolbar__settings-btn svg,
.guide-editor-canvas .ce-toolbar__plus svg {
  fill: currentColor !important;
}

.guide-editor-canvas .ce-popover,
.guide-editor-canvas .ce-conversion-toolbar,
.guide-editor-canvas .tc-popover {
  background: #11161d !important;
  border: 1px solid rgba(217, 181, 107, 0.28) !important;
  color: var(--text) !important;
}

.guide-editor-canvas .ce-popover-item:hover,
.guide-editor-canvas .ce-popover-item--focused,
.guide-editor-canvas .ce-conversion-tool:hover {
  background: rgba(217, 181, 107, 0.16) !important;
}

.guide-block-editorjs p,
.guide-block-editorjs ul,
.guide-block-editorjs ol,
.guide-block-editorjs blockquote,
.guide-block-editorjs pre {
  margin-bottom: 0.7rem;
}

.guide-image-figure {
  margin: 0;
}

.guide-image-figure img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

.guide-image-figure figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.guide-warning {
  border: 1px solid rgba(217, 181, 107, 0.28);
  border-radius: 10px;
  background: rgba(217, 181, 107, 0.08);
  padding: 0.65rem 0.75rem;
}

.guide-warning strong {
  color: var(--amber-strong);
}

.guide-warning p {
  margin: 0.35rem 0 0;
}

.guide-editor-help {
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(10, 14, 18, 0.55);
  color: var(--muted);
  padding: 0.6rem 0.7rem;
  line-height: 1.45;
}

.guide-editor-help strong {
  color: var(--amber-strong);
}

.guide-editor-help code {
  color: #ffd37a;
  background: rgba(217, 181, 107, 0.12);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.guide-editor-popover.popover {
  --bs-popover-bg: #0b121a;
  --bs-popover-border-color: rgba(217, 181, 107, 0.35);
  --bs-popover-header-bg: #101927;
  --bs-popover-header-color: var(--amber-strong);
  --bs-popover-body-color: #dce7f7;
  --bs-popover-max-width: 360px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.guide-editor-popover .popover-body {
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: normal;
}

.guide-editor-host-popup {
  position: absolute;
  z-index: 2000;
  width: min(360px, calc(100vw - 1.5rem));
  transform: translateX(-50%);
  border: 1px solid rgba(217, 181, 107, 0.35);
  border-radius: 10px;
  background: #0b121a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color: #dce7f7;
  padding: 0.6rem 0.7rem;
}

.guide-editor-host-popup-title {
  color: var(--amber-strong);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.guide-editor-host-popup-list {
  margin: 0;
  padding-left: 1.05rem;
}

.guide-editor-host-popup-list li {
  margin: 0.15rem 0;
  line-height: 1.25;
}

.guide-editor-host-popup-tip {
  margin-top: 0.5rem;
  color: #c9d6eb;
  font-size: 0.85rem;
}

.guide-image-host-trigger {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(217, 181, 107, 0.45);
  text-underline-offset: 2px;
}

.quality-0 { color: #9ca3af; }
.quality-1 { color: #e5e7eb; }
.quality-2 { color: #4ade80; }
.quality-3 { color: #60a5fa; }
.quality-4 { color: #c084fc; }
.quality-5 { color: #fbbf24; }
.quality-6 { color: #f97316; }
.quality-unknown { color: var(--text); }

.badge.badge-warning {
  background: rgba(217, 181, 107, 0.24);
  border: 1px solid rgba(217, 181, 107, 0.5);
  color: #ffe6a6;
}

.flatpickr-calendar {
  background: #11161d;
  border: 1px solid rgba(217, 181, 107, 0.28);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
}

.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-weekdays {
  background: #11161d;
}

.flatpickr-calendar .flatpickr-current-month,
.flatpickr-calendar .flatpickr-weekday,
.flatpickr-calendar .flatpickr-day,
.flatpickr-calendar .flatpickr-time input,
.flatpickr-calendar .flatpickr-am-pm {
  color: #e6decc;
}

.flatpickr-calendar .flatpickr-day:hover,
.flatpickr-calendar .flatpickr-day:focus {
  background: rgba(217, 181, 107, 0.16);
  border-color: rgba(217, 181, 107, 0.3);
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
  background: rgba(217, 181, 107, 0.22);
  border-color: rgba(217, 181, 107, 0.55);
}

.flatpickr-calendar .flatpickr-time,
.flatpickr-calendar .flatpickr-time .numInputWrapper,
.flatpickr-calendar .flatpickr-time input,
.flatpickr-calendar .flatpickr-time .flatpickr-am-pm {
  background: #11161d;
  color: #e6decc;
}

.flatpickr-calendar .flatpickr-time .numInputWrapper:hover,
.flatpickr-calendar .flatpickr-time input:hover,
.flatpickr-calendar .flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-calendar .flatpickr-time input:focus,
.flatpickr-calendar .flatpickr-time .flatpickr-am-pm:focus {
  background: rgba(217, 181, 107, 0.18);
  color: #f4e8cc;
}

.flatpickr-calendar .flatpickr-time .numInputWrapper span.arrowUp:after {
  border-bottom-color: rgba(226, 210, 170, 0.92);
}

.flatpickr-calendar .flatpickr-time .numInputWrapper span.arrowDown:after {
  border-top-color: rgba(226, 210, 170, 0.92);
}

.amb-item-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: min(380px, calc(100vw - 20px));
  min-width: 250px;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.38);
  background: rgba(9, 12, 16, 0.98);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.amb-item-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.amb-item-tooltip-title {
  font-weight: 700;
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.amb-item-tooltip-lines {
  display: grid;
  gap: 0.18rem;
}

.amb-item-tooltip-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.83rem;
  line-height: 1.2;
}

.amb-item-tooltip-right {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.amb-item-tooltip-source {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(217, 181, 107, 0.24);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.admin-table th,
.admin-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.admin-tab-content {
  padding-top: 1rem;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.is-active {
  display: block;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.admin-role-select {
  min-width: 110px;
}

.admin-data-sync-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-data-sync-summary {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 10px;
  background: rgba(10, 14, 18, 0.55);
  font-size: 0.9rem;
}

.guild-admin-shell .card-body {
  display: grid;
  gap: 1rem;
}

.guild-admin-status {
  min-height: 1.2rem;
}

.guild-admin-tabs .nav-link {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.guild-admin-tab-content {
  display: grid;
  gap: 1rem;
}

.guild-admin-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.65);
  padding: 0.95rem 1rem;
}

.guild-admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.guild-admin-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.guild-admin-connection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.guild-admin-connection-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.guild-admin-empty-state {
  border: 1px dashed rgba(217, 181, 107, 0.35);
  border-radius: 10px;
  background: rgba(8, 11, 15, 0.58);
  color: var(--muted);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;
}

.guild-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.guild-admin-field {
  display: grid;
  gap: 0.35rem;
}

.guild-admin-field label {
  color: var(--muted);
  font-size: 0.82rem;
}

.guild-admin-field-full {
  grid-column: 1 / -1;
}

.guild-admin-color-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.guild-admin-field-inline {
  align-content: end;
}

.guild-admin-field-inline label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.guild-admin-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.guild-admin-team-mapping {
  display: grid;
  gap: 0.6rem;
}

.guild-admin-team-map-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.guild-admin-team-map-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.guild-admin-team-map-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.guild-admin-team-map-fields-single {
  grid-template-columns: minmax(200px, 320px);
}

.guild-admin-stack {
  display: grid;
  gap: 0.7rem;
}

.guild-admin-team-form,
.guild-admin-member-form {
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.55);
  padding: 0.7rem;
}

.guild-admin-row {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guild-admin-row label {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.guild-admin-footer {
  margin-top: 0.9rem;
}

.guild-admin-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.guild-admin-toggle-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--text);
}

.guild-admin-member-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.guild-admin-member-controls {
  display: grid;
  grid-template-columns: minmax(150px, 170px) minmax(150px, 220px) auto;
  gap: 0.55rem;
  align-items: center;
}

.guild-admin-members-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 180px) minmax(150px, 180px) auto;
  gap: 0.6rem;
  align-items: center;
}

.guild-admin-members-pagination {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}

.guild-admin-members-table-wrap {
  border: 1px solid rgba(217, 181, 107, 0.14);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.45);
}

.guild-admin-members-table {
  margin-bottom: 0;
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-color-type: var(--text);
  --bs-table-bg-type: rgba(217, 181, 107, 0.04);
  --bs-table-color-state: var(--text);
  --bs-table-bg-state: rgba(217, 181, 107, 0.08);
  --bs-table-border-color: rgba(217, 181, 107, 0.14);
  --bs-table-striped-bg: rgba(217, 181, 107, 0.04);
  --bs-table-hover-bg: rgba(217, 181, 107, 0.08);
}

.guild-admin-members-table th,
.guild-admin-members-table td {
  vertical-align: middle;
  background: transparent !important;
  color: var(--text);
}

.guild-admin-members-table.table > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--text) !important;
}

.guild-admin-members-table th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.guild-admin-member-main {
  display: grid;
  gap: 0.2rem;
  min-width: 170px;
}

.guild-admin-member-save {
  min-width: 74px;
}

.guild-admin-members-table .form-select,
.guild-admin-members-table .form-control {
  background-color: rgba(9, 12, 16, 0.82);
}

.guild-admin-member-row-locked td {
  opacity: 0.88;
}

.guild-admin-role-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.guild-admin-role-checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.team-mgmt-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
}

.team-mgmt-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 18, 0.66);
}

.team-mgmt-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.team-mgmt-filters .btn {
  justify-self: end;
}

.team-mgmt-members-list {
  display: grid;
  gap: 0.45rem;
  max-height: 520px;
  overflow: auto;
  padding-right: 0.1rem;
}

.team-mgmt-member {
  width: 100%;
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 10px;
  background: rgba(8, 11, 15, 0.65);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  text-align: left;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.team-mgmt-member:hover {
  border-color: rgba(217, 181, 107, 0.36);
  background: rgba(14, 18, 24, 0.76);
}

.team-mgmt-member:disabled {
  opacity: 0.62;
}

.team-mgmt-member.is-active {
  border-color: rgba(217, 181, 107, 0.62);
  background: rgba(24, 30, 37, 0.82);
}

.team-mgmt-member-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.team-mgmt-member-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.team-mgmt-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 140px);
  gap: 0.6rem;
  align-items: start;
}

.team-mgmt-add-row .typeahead-wrap {
  min-width: 0;
}

.team-mgmt-add-hint {
  margin: -0.2rem 0 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.team-mgmt-add-hint.is-warning {
  color: var(--amber-strong);
}

.team-mgmt-instance-required {
  border-color: rgba(217, 181, 107, 0.48) !important;
  background: rgba(34, 24, 10, 0.72) !important;
  color: var(--amber);
}

.team-mgmt-add-results {
  max-height: 260px;
  z-index: 20;
  gap: 0.35rem;
}

.team-mgmt-add-guidance {
  font-size: 0.82rem;
  color: var(--amber);
}

.team-mgmt-filter-results {
  max-height: 220px;
  z-index: 22;
}

.team-mgmt-filter-item {
  display: grid;
  gap: 0.1rem;
}

.team-mgmt-filter-item small {
  font-size: 0.72rem;
}

.team-mgmt-add-item {
  width: 100%;
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 10px;
  background: rgba(8, 11, 15, 0.62);
  color: var(--text);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.team-mgmt-add-item:hover {
  border-color: rgba(217, 181, 107, 0.32);
  background: rgba(14, 18, 24, 0.76);
}

.team-mgmt-add-item .loot-icon {
  width: 30px;
  height: 30px;
}

.team-mgmt-add-item .loot-icon img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.team-mgmt-ledger-list {
  display: grid;
  gap: 0.5rem;
  max-height: 560px;
  overflow: auto;
  padding-right: 0.1rem;
}

.team-mgmt-ledger-row {
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.62);
  padding: 0.55rem 0.6rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, auto);
  gap: 0.65rem;
  align-items: center;
}

.team-mgmt-ledger-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.team-mgmt-ledger-item .loot-icon {
  width: 30px;
  height: 30px;
}

.team-mgmt-ledger-item .loot-icon img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.team-mgmt-ledger-item-text {
  min-width: 0;
}

.team-mgmt-ledger-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.team-mgmt-ledger-controls .form-control {
  width: 84px;
}

.team-mgmt-pagination {
  margin-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}

.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.guild-card {
  height: 100%;
}

.guild-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.guild-card-title {
  margin: 0;
  font-size: 1.05rem;
}

.guild-card-desc {
  font-size: 0.9rem;
}

.guild-search {
  min-width: 220px;
}

.type-badge {
  margin-left: 0.35rem;
  margin-right: 0.35rem;
}

.instance-badge {
  text-transform: none;
  letter-spacing: 0.02em;
}

.sidebar-collapsed .main-sidebar {
  transform: translateX(-100%);
}

.sidebar-collapsed .content-wrapper {
  margin-left: 0;
}

@media (max-width: 991px) {
  .content-wrapper {
    margin-left: 0;
    padding: 2rem 1.25rem 2.5rem;
  }

  .main-sidebar {
    display: none;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-shell.split-panels {
    grid-template-columns: 1fr;
  }

  .guild-admin-grid {
    grid-template-columns: 1fr;
  }

  .guild-admin-field-full {
    grid-column: auto;
  }

  .guild-admin-team-map-row {
    grid-template-columns: 1fr;
  }

  .guild-admin-team-map-fields {
    grid-template-columns: 1fr;
  }

  .guild-admin-team-map-fields-single {
    grid-template-columns: 1fr;
  }

  .guild-admin-member-controls {
    grid-template-columns: 1fr;
  }

  .guild-admin-members-toolbar {
    grid-template-columns: 1fr;
  }

  .guild-admin-role-checks {
    grid-template-columns: 1fr;
  }

  .team-mgmt-shell {
    grid-template-columns: 1fr;
  }

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

  .team-mgmt-filters .btn {
    justify-self: start;
  }

  .team-mgmt-members-list,
  .team-mgmt-ledger-list,
  .team-mgmt-add-results,
  .team-mgmt-filter-results {
    max-height: none;
  }

  .team-mgmt-add-row {
    grid-template-columns: 1fr;
  }

  .team-mgmt-ledger-row {
    grid-template-columns: 1fr;
  }

  .team-mgmt-ledger-controls {
    justify-content: flex-start;
  }

  .team-mgmt-pagination {
    justify-content: flex-start;
  }

  .bis-planner-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .bis-planner-grid {
    gap: 0.7rem;
  }

  .bis-planner-armor-grid,
  .bis-planner-weapon-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bis-slot-spacer {
    display: none;
  }

  .guides-home-shell {
    grid-template-columns: 1fr;
  }

  .guides-head {
    flex-direction: column;
  }

  .profile-guild-block {
    align-items: flex-start;
  }

  .profile-guild-presence {
    text-align: left;
  }
  .main-sidebar {
    display: block;
    transform: translateX(-100%);
    z-index: 1050;
    width: 240px;
  }

  .sidebar-open .main-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(6, 8, 12, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1040;
  }

  .sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 575px) {
  .card {
    border-radius: 12px;
  }

  .login-box {
    max-width: 100%;
  }
  .signup-modal .raid-signup-row {
    grid-template-columns: 1fr;
  }

  .signup-modal .raid-signup-row .btn {
    width: 100%;
  }

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

  .raid-overview-actions {
    align-items: flex-start;
  }
}
