.clan-page-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 16px;
  margin-top: 12px;
  color: var(--text-default);
  align-items: start;
}

.clan-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card,
.panel-card,
.clan-hero {
  background: var(--card);
  border: 1px solid var(--bottom-line-table);
  border-radius: 12px;
  color: var(--text-default);
}

.side-card {
  padding: 12px;
}

.clan-edit-open-btn {
  margin-top: 10px;
  width: 100%;
  border: 1px solid var(--bottom-line-table);
  background: var(--span-low);
  color: var(--span);
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 700;
  cursor: pointer;
}

.clan-edit-open-btn:hover {
  filter: brightness(1.06);
}

.clan-edit-alert {
  border-radius: 10px;
  border: 1px solid var(--bottom-line-table);
  padding: 10px 12px;
  font-size: 13px;
}

.clan-edit-alert.success {
  background: rgba(60, 180, 120, 0.12);
  border-color: rgba(60, 180, 120, 0.35);
  color: #9be1be;
}

.clan-edit-alert.error {
  background: rgba(220, 80, 90, 0.12);
  border-color: rgba(220, 80, 90, 0.35);
  color: #f2a1a8;
}

.clan-discovery-card .side-link {
  margin-bottom: 12px;
}

.discovery-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.discovery-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--span-low);
  color: var(--span);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.discovery-name {
  color: var(--text-default);
  font-size: 13px;
  font-weight: 600;
}

.side-stat-list {
  display: grid;
  gap: 8px;
}

.side-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-default);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.side-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--span);
  text-decoration: none;
  font-weight: 600;
}

.side-link:hover {
  color: var(--span);
  filter: brightness(1.1);
}

.side-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--button);
  border: 1px solid var(--bottom-line-table);
}

.side-stat span {
  color: var(--text-custom);
}

.clan-owner-form {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.clan-owner-label {
  font-size: 12px;
  color: var(--text-custom);
  opacity: 0.85;
}

.clan-owner-invite-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.clan-owner-invite-row .clan-edit-open-btn {
  margin-top: 0;
  width: auto;
  white-space: nowrap;
  padding-inline: 14px;
}

.clan-owner-invite-row input[type="text"] {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-default);
  padding: 0 10px;
  font-size: 13px;
}

.clan-owner-invite-row input[type="text"]:focus {
  outline: none;
  border-color: var(--span);
}

.clan-owner-toggle-btn {
  width: 100%;
}

.clan-owner-subtitle {
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--text-custom);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clan-owner-request-list {
  gap: 12px;
  margin-top: 8px;
}

.clan-owner-request-item {
  gap: 10px;
  border-radius: 12px;
  padding: 12px !important;
  background: linear-gradient(180deg, rgba(34, 48, 74, 0.58), rgba(26, 36, 56, 0.48)) !important;
  border: 1px solid rgba(97, 126, 184, 0.22) !important;
}

.clan-owner-request-actions {
  display: flex;
  gap: 8px;
}

.clan-owner-request-actions form {
  flex: 1;
}

.clan-owner-request-actions .clan-edit-open-btn {
  width: 100%;
  margin-top: 0;
}

.clan-owner-btn-decline {
  border-color: rgba(220, 80, 90, 0.35);
  color: #f2a1a8;
}

.approve-btn {
  border-color: rgba(66, 182, 112, 0.34);
  color: #99ddb5;
}

.feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.feed-list li {
  font-size: 12px;
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: var(--button);
  border: 1px solid var(--bottom-line-table);
}

.feed-item {
  gap: 6px;
}

.feed-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evt-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evt-main-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.evt-subline {
  color: var(--text-custom);
  font-size: 11px;
  opacity: 0.86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clan-owner-requests-empty {
  border: 1px dashed rgba(118, 148, 208, 0.28);
  border-radius: 12px;
  padding: 14px;
  background: rgba(36, 49, 76, 0.24);
}

.evt-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  flex: 0 0 auto;
}

.evt-action {
  color: var(--text-default);
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
}

.evt-time {
  color: var(--text-custom);
}

.evt-time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--span-low);
  color: var(--span);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.evt-meta {
  color: var(--text-custom);
  font-size: 11px;
  opacity: 0.85;
}

.transfer-item .evt-meta {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clan-main {
  display: grid;
  gap: 14px;
  align-content: start;
  align-self: start;
}

.clan-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.clan-edit-modal.active {
  opacity: 1;
  pointer-events: all;
}

.clan-edit-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
}

.clan-edit-modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--bottom-line-table);
  border-radius: 14px;
  width: min(680px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--clan-shadow-lg, 0 12px 35px rgba(0, 0, 0, 0.35));
}

.clan-edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bottom-line-table);
}

.clan-edit-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-default);
}

.clan-edit-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-custom);
  border-radius: 8px;
  font-size: 24px;
  line-height: 0.9;
  transition: background .18s ease, color .18s ease;
}

.clan-edit-modal-close:hover {
  background: var(--button-hover);
  color: var(--span);
}

.clan-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.clan-edit-form label {
  display: grid;
  gap: 6px;
}

.clan-edit-half {
  grid-column: span 1;
}

.clan-edit-full {
  grid-column: 1 / -1;
}

.clan-edit-form label > span {
  color: var(--text-custom);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.clan-edit-form input[type="text"],
.clan-edit-form input[type="url"],
.clan-edit-form input[type="number"],
.clan-edit-form input[type="file"],
.clan-edit-form textarea {
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-default);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.clan-edit-form input[type="text"]::placeholder,
.clan-edit-form input[type="url"]::placeholder,
.clan-edit-form input[type="number"]::placeholder,
.clan-edit-form textarea::placeholder {
  color: var(--text-custom);
}

.clan-edit-form input[type="file"] {
  height: 46px;
  padding: 8px 10px;
  font-size: 13px;
}

.clan-edit-form input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button-hover);
  color: var(--text-default);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.clan-edit-form input[type="text"]:focus,
.clan-edit-form input[type="url"]:focus,
.clan-edit-form input[type="number"]:focus,
.clan-edit-form textarea:focus {
  outline: none;
  border-color: var(--span);
  box-shadow: 0 0 0 3px rgba(88, 130, 200, 0.18);
}

.clan-edit-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.4;
}

.clan-edit-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.clan-edit-inline > label {
  height: 100%;
}

.clan-edit-inline > label > span {
  margin-bottom: 6px;
}

.clan-edit-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--bottom-line-table);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--button);
  min-height: 46px;
  box-sizing: border-box;
}

.clan-edit-inline .clan-edit-checkbox {
  height: 46px;
  margin-top: auto;
}

.clan-edit-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--span);
}

.clan-edit-checkbox span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-default);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

.clan-edit-inline input[type="number"] {
  height: 46px;
  box-sizing: border-box;
}

.clan-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
}

.clan-edit-actions button {
  border: 1px solid var(--bottom-line-table);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.clan-edit-actions .btn-cancel {
  background: var(--button);
  color: var(--text-custom);
}

.clan-edit-actions .btn-cancel:hover {
  background: var(--button-hover);
  color: var(--text-default);
}

.clan-edit-actions .btn-save {
  background: var(--span-low);
  border-color: rgba(97, 138, 207, 0.45);
  color: var(--span);
}

.clan-edit-actions .btn-save:hover {
  background: rgba(78, 120, 188, 0.27);
  color: #c8dcff;
}

.clan-edit-actions .btn-danger {
  margin-right: auto;
  background: rgba(170, 49, 60, 0.16);
  border-color: rgba(190, 74, 87, 0.42);
  color: #f2a5ad;
}

.clan-edit-actions .btn-danger:hover {
  background: rgba(170, 49, 60, 0.24);
  border-color: rgba(222, 96, 110, 0.58);
  color: #ffd1d5;
}

.clan-edit-remove-logo {
  justify-self: start;
  width: fit-content;
}

@media (max-width: 760px) {
  .clan-edit-modal-content {
    width: calc(100vw - 14px);
    padding: 14px;
  }

  .clan-edit-form {
    grid-template-columns: 1fr;
  }

  .clan-edit-half {
    grid-column: 1 / -1;
  }

  .clan-edit-inline {
    grid-template-columns: 1fr;
  }
}

.clan-hero {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.hero-banner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--button);
  border-bottom: 1px solid var(--bottom-line-table);
}

.hero-member {
  text-align: center;
  padding: 10px 6px;
  text-decoration: none;
}

.hero-member img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--bottom-line-table);
}

.hero-member span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-custom);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-member:hover span {
  color: var(--text-default);
}

.hero-core {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  align-items: start;
}

.hero-brand {
  display: flex;
  align-items: flex-start;
}

.hero-logo {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--button);
  border: 1px solid var(--bottom-line-table);
}

.hero-title h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.4px;
  line-height: 1.05;
  color: var(--text-default);
}

.hero-owner {
  margin: 0 0 6px;
  color: var(--text-custom);
  font-size: 13px;
}

.hero-owner-link {
  color: var(--span);
  text-decoration: none;
  font-weight: 600;
}

.hero-owner-link:hover {
  text-decoration: underline;
}

.hero-title p {
  margin: 0;
  color: var(--text-custom);
  font-size: 13px;
}

.hero-title .hero-owner {
  margin: 0;
}

.hero-summary {
  display: none !important;
}

.hero-description-row {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--text-custom);
  font-size: 13px;
  line-height: 1.4;
}

.hero-tag {
  display: inline-block;
  margin: 0;
  line-height: 1.1;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--span);
  font-weight: 700;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-owner-tools {
  position: relative;
  justify-self: end;
  align-self: start;
  z-index: 60;
}

.hero-owner-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
}

.hero-owner-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text-default);
  transition: transform 180ms ease, opacity 160ms ease, background 180ms ease;
}

.hero-owner-menu-toggle:hover {
  border-color: rgba(118, 153, 227, 0.4);
  background: var(--button-hover);
}

.hero-owner-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hero-owner-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hero-owner-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-owner-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(240px, 75vw);
  border: 1px solid var(--bottom-line-table);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  z-index: 50;
}

.hero-owner-menu-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--bottom-line-table);
  background: transparent;
  color: var(--text-default);
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.hero-owner-menu-form {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--bottom-line-table);
}

.hero-owner-menu-item:last-child {
  border-bottom: 0;
}

.hero-owner-menu-item:hover {
  background: var(--button-hover);
}

.hero-owner-menu-item.request-status.is-open {
  color: var(--text-default);
}

.hero-owner-menu-item.request-status.is-closed {
  color: var(--text-default);
}

.hero-owner-menu-item.request-status {
  width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  background: transparent !important;
  text-align: left;
}

.hero-owner-menu-item .request-status-word {
  font-weight: 800;
  margin-left: 4px;
}

.hero-owner-menu-item.request-status.is-open .request-status-word {
  color: #9de0b8;
}

.hero-owner-menu-item.request-status.is-closed .request-status-word {
  color: #f2a1a8;
}

.hero-owner-menu-item.request-status:hover {
  background: var(--button-hover) !important;
}

.hero-owner-menu-item.suspend-item {
  color: #f1c37f;
  background: rgba(243, 168, 76, 0.11);
}

.hero-owner-menu-item.suspend-item:hover {
  background: rgba(243, 168, 76, 0.2);
}

.hero-owner-menu-item.delete-item {
  color: #f2a1a8;
  background: rgba(220, 80, 90, 0.15);
}

.hero-owner-menu-item.delete-item:hover {
  background: rgba(220, 80, 90, 0.24);
}

.hero-owner-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.hero-owner-quick-actions form {
  margin: 0;
}

.hero-owner-quick-btn {
  width: 100%;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-default);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hero-owner-quick-btn:hover {
  background: var(--button-hover);
}

.hero-owner-quick-btn.request-status.is-open {
  border-color: rgba(64, 180, 108, 0.45);
  background: rgba(64, 180, 108, 0.15);
  color: #9de0b8;
}

.hero-owner-quick-btn.request-status.is-closed {
  border-color: rgba(220, 80, 90, 0.45);
  background: rgba(220, 80, 90, 0.14);
  color: #f2a1a8;
}

.hero-owner-quick-btn.suspend-btn {
  border-color: rgba(243, 168, 76, 0.42);
  background: rgba(243, 168, 76, 0.13);
  color: #f1c37f;
}

.hero-owner-quick-btn.delete-btn {
  border-color: rgba(220, 80, 90, 0.45);
  background: rgba(220, 80, 90, 0.16);
  color: #f2a1a8;
}

.clan-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0;
  border: 1px solid var(--bottom-line-table);
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start !important;
  min-height: 46px !important;
  height: 46px !important;
  max-height: 46px !important;
  scrollbar-width: none;
}

#clan-tabs-nav {
  margin: 0 !important;
  padding: 0 !important;
  align-content: flex-start !important;
}

.clan-tabs::-webkit-scrollbar {
  display: none;
}

.clan-tab-link,
.clan-tabs .tab-link {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  float: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 12px;
  height: 46px !important;
  max-height: 46px !important;
  min-height: 0 !important;
  box-sizing: border-box;
  line-height: 1.2 !important;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-custom);
  border-right: 1px solid var(--bottom-line-table);
  background: var(--button);
  font-size: 13px;
  font-weight: 500;
}

.clan-tab-link:last-child,
.clan-tabs .tab-link:last-child {
  border-right: 0;
}

.clan-tab-link:hover,
.clan-tabs .tab-link:hover {
  background: var(--button-hover);
  color: var(--text-default);
}

.clan-tab-link.active,
.clan-tabs .tab-link.active {
  background: var(--span-low);
  color: var(--span);
  font-weight: 700;
}

.clan-tab-panel,
.clan-main > .tab-panel {
  display: none;
  min-height: 0 !important;
  height: auto !important;
}

.clan-tab-panel.active,
.clan-main > .tab-panel.active {
  display: block;
}

.clan-owner-modal-content {
  width: min(520px, 92vw);
}

.clan-owner-modal-body {
  display: grid;
  gap: 12px;
}

.clan-player-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
}

.clan-player-preview img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--bottom-line-table);
}

.clan-player-preview strong {
  display: block;
  line-height: 1.2;
}

.clan-player-preview span {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--text-custom);
  word-break: break-all;
}

.clan-player-preview small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.clan-player-preview.exists {
  border-color: rgba(66, 182, 112, 0.32);
  background: rgba(66, 182, 112, 0.12);
}

.clan-player-preview.exists small {
  color: #99ddb5;
}

.clan-player-preview.missing {
  border-color: rgba(220, 80, 90, 0.34);
  background: rgba(220, 80, 90, 0.12);
}

.clan-player-preview.missing small {
  color: #f2a1a8;
}

.panel-card {
  padding: 14px;
}

.panel-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
  color: var(--text-default);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.overview-grid > div {
  border: 1px solid var(--bottom-line-table);
  border-radius: 8px;
  background: var(--button);
  padding: 12px;
}

.overview-grid span {
  display: block;
  color: var(--text-custom);
  font-size: 11px;
  text-transform: uppercase;
}

.overview-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
}

.roster-table th,
.roster-table td {
  border-bottom: 1px solid var(--bottom-line-table);
  padding: 10px 8px;
  font-size: 13px;
  vertical-align: middle;
}

.rank-cell {
  text-align: center;
  width: 72px;
  position: relative;
  overflow: visible;
}

.rank-cell .clan-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.actions-cell {
  width: 74px;
  text-align: right;
  position: relative;
  overflow: visible;
}

.rank-cell img.top_players_rank.clan-rank-badge {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  min-height: 34px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 6px;
}

.rank-cell .faceit-challenger-badge.clan-rank-badge {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  gap: 6px;
}

.rank-cell .faceit-challenger-badge.clan-rank-badge .faceit-challenger-badge__level {
  font-size: 12px;
  line-height: 1;
}

.rank-cell .faceit-challenger-badge.clan-rank-badge .faceit-challenger-badge__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-cell .faceit-challenger-badge.clan-rank-badge .faceit-challenger-badge__icon img,
.rank-cell .faceit-challenger-badge.clan-rank-badge .faceit-challenger-badge__icon svg {
  width: 18px;
  height: 18px;
}

.roster-table th {
  color: var(--text-custom);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-cell-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.player-cell img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--bottom-line-table);
}

.player-link-avatar {
  display: inline-flex;
}

.player-link-name {
  color: var(--text-default);
  text-decoration: none;
}

.player-link-name:hover {
  color: var(--span);
}

.player-cell small {
  color: var(--text-custom);
  font-size: 11px;
}

.status-pill {
  display: inline-block;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.status-pill.captain {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-pill.admin {
  background: rgba(255, 152, 0, 0.15);
  color: #ffcc80;
  border: 1px solid rgba(255, 152, 0, 0.32);
}

.status-pill.starter {
  background: var(--button);
  color: var(--text-custom);
  border: 1px solid var(--bottom-line-table);
}

.roster-row-tools {
  position: relative;
  z-index: 1000;
  display: inline-flex;
}

.roster-row-menu-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.roster-row-menu-toggle span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-custom);
}

.roster-row-menu-toggle:hover,
.roster-row-menu-toggle[aria-expanded="true"] {
  border-color: var(--span);
  background: rgba(255, 255, 255, 0.08);
}

.roster-row-menu {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  min-width: 168px;
  background: #101521;
  border: 1px solid var(--bottom-line-table);
  border-radius: 10px;
  overflow: hidden;
  z-index: 99999;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
  .roster-row-menu {
    top: calc(100% + 8px);
    right: 0;
    transform: none;
  }
}

.roster-row-menu-form {
  margin: 0;
}

.roster-row-menu-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--bottom-line-table);
  background: transparent;
  color: var(--text-default);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  cursor: pointer;
}

.roster-row-menu-form:last-child .roster-row-menu-item {
  border-bottom: 0;
}

.roster-row-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.roster-row-menu-item.danger {
  color: #ff8b8b;
}

.roster-row-menu-item.danger:hover {
  background: rgba(239, 83, 80, 0.16);
  color: #ffc0c0;
}

.roster-pagination {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--bottom-line-table);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roster-pagination__meta {
  font-size: 12px;
  color: var(--text-custom);
}

.roster-pagination__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.roster-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-default);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roster-pagination__btn:hover {
  border-color: var(--span);
  color: var(--span);
}

.roster-pagination__btn.active {
  background: var(--span);
  border-color: var(--span);
  color: #fff;
  pointer-events: none;
}

.roster-pagination__btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.roster-pagination__ellipsis {
  color: var(--text-custom);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 0 2px;
}

.war-placeholder {
  border-style: dashed;
}

.war-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.war-grid > div {
  background: var(--button);
  border: 1px solid var(--bottom-line-table);
  border-radius: 8px;
  padding: 10px;
}

.war-grid h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-default);
  text-transform: uppercase;
}

.war-grid ul {
  margin: 0;
  padding-left: 18px;
}

.war-grid li {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-custom);
}

.muted {
  color: var(--text-custom);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .clan-page-shell {
    grid-template-columns: 1fr;
  }

  .clan-side.left-side,
  .clan-side.right-side {
    order: 2;
  }

  .clan-main {
    order: 1;
  }
}

@media (max-width: 900px) {
  .hero-banner {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-core {
    grid-template-columns: 1fr auto;
  }

  .hero-brand {
    grid-column: 1;
  }

  .hero-title {
    grid-column: 1 / -1;
  }

  .hero-owner-tools {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .hero-title h1 {
    font-size: 28px;
  }

  .hero-owner-quick-actions {
    grid-template-columns: 1fr;
  }

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

/* Motion pass for clan page */
.clan-page-shell {
  --clan-motion-fast: 180ms;
  --clan-motion-mid: 320ms;
  --clan-motion-slow: 520ms;
}

@keyframes clan-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes clan-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.clan-side {
  animation: clan-fade-up var(--clan-motion-mid) ease both;
}

.clan-main {
  animation: clan-fade-up var(--clan-motion-mid) ease 70ms both;
}

.side-card,
.panel-card,
.clan-hero {
  transition: border-color var(--clan-motion-fast) ease, box-shadow var(--clan-motion-fast) ease, transform var(--clan-motion-fast) ease;
}

.side-card:hover,
.panel-card:hover,
.clan-hero:hover {
  border-color: rgba(123, 153, 214, 0.28);
}

.side-card:nth-child(1) {
  animation: clan-fade-up var(--clan-motion-mid) ease 40ms both;
}

.side-card:nth-child(2) {
  animation: clan-fade-up var(--clan-motion-mid) ease 110ms both;
}

.clan-edit-open-btn {
  transition: transform var(--clan-motion-fast) ease, filter var(--clan-motion-fast) ease, border-color var(--clan-motion-fast) ease;
}

.clan-edit-open-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(118, 153, 227, 0.4);
}

.feed-list li {
  transition: transform var(--clan-motion-fast) ease, border-color var(--clan-motion-fast) ease, background var(--clan-motion-fast) ease;
  animation: clan-fade-up var(--clan-motion-mid) ease both;
}

.feed-list li:nth-child(1) { animation-delay: 30ms; }
.feed-list li:nth-child(2) { animation-delay: 55ms; }
.feed-list li:nth-child(3) { animation-delay: 80ms; }
.feed-list li:nth-child(4) { animation-delay: 105ms; }
.feed-list li:nth-child(5) { animation-delay: 130ms; }
.feed-list li:nth-child(6) { animation-delay: 155ms; }
.feed-list li:nth-child(7) { animation-delay: 180ms; }
.feed-list li:nth-child(8) { animation-delay: 205ms; }

.feed-list li:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 151, 217, 0.35);
  background: linear-gradient(180deg, rgba(47, 61, 90, 0.55), rgba(35, 46, 71, 0.48));
}

.evt-avatar {
  transition: transform var(--clan-motion-fast) ease;
}

.feed-item:hover .evt-avatar {
  transform: scale(1.06);
}

.clan-hero {
  animation: clan-fade-up var(--clan-motion-mid) ease 120ms both;
}

.hero-member {
  transition: background var(--clan-motion-fast) ease;
  animation: clan-fade-up var(--clan-motion-slow) ease both;
}

.hero-member:nth-child(1) { animation-delay: 130ms; }
.hero-member:nth-child(2) { animation-delay: 180ms; }
.hero-member:nth-child(3) { animation-delay: 230ms; }
.hero-member:nth-child(4) { animation-delay: 280ms; }
.hero-member:nth-child(5) { animation-delay: 330ms; }

.hero-member:hover {
  background: rgba(94, 130, 198, 0.12);
}

.hero-member img {
  transition: transform var(--clan-motion-fast) ease, border-color var(--clan-motion-fast) ease, box-shadow var(--clan-motion-fast) ease;
}

.hero-member:hover img {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(126, 160, 225, 0.42);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.hero-logo {
  transition: transform var(--clan-motion-mid) ease, box-shadow var(--clan-motion-mid) ease, border-color var(--clan-motion-mid) ease;
}

.clan-hero:hover .hero-logo {
  transform: translateY(-2px);
  border-color: rgba(124, 158, 222, 0.38);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.hero-title h1 {
  animation: clan-fade-up var(--clan-motion-mid) ease 170ms both;
}

.clan-tabs {
  animation: clan-fade-up var(--clan-motion-mid) ease 180ms both;
}

.clan-tab-link,
.clan-tabs .tab-link {
  transition: background var(--clan-motion-fast) ease, color var(--clan-motion-fast) ease, transform var(--clan-motion-fast) ease;
}

.clan-tab-link:hover,
.clan-tabs .tab-link:hover {
  transform: translateY(-1px);
}

.clan-tab-panel,
.clan-main > .tab-panel {
  animation: clan-fade-up var(--clan-motion-mid) ease both;
}

.panel-card {
  animation: clan-fade-up var(--clan-motion-mid) ease both;
}

.roster-table tbody tr {
  transition: background var(--clan-motion-fast) ease, transform var(--clan-motion-fast) ease;
  animation: clan-fade-up var(--clan-motion-mid) ease both;
}

.roster-table tbody tr:nth-child(1) { animation-delay: 40ms; }
.roster-table tbody tr:nth-child(2) { animation-delay: 65ms; }
.roster-table tbody tr:nth-child(3) { animation-delay: 90ms; }
.roster-table tbody tr:nth-child(4) { animation-delay: 115ms; }
.roster-table tbody tr:nth-child(5) { animation-delay: 140ms; }
.roster-table tbody tr:nth-child(6) { animation-delay: 165ms; }
.roster-table tbody tr:nth-child(7) { animation-delay: 190ms; }

.roster-table tbody tr:hover {
  background: rgba(74, 106, 165, 0.1);
  transform: translateX(2px);
}

.player-cell img {
  transition: transform var(--clan-motion-fast) ease, border-color var(--clan-motion-fast) ease;
}

.roster-table tbody tr:hover .player-cell img {
  transform: scale(1.04);
  border-color: rgba(132, 166, 225, 0.42);
}

.status-pill {
  transition: transform var(--clan-motion-fast) ease;
}

.roster-table tbody tr:hover .status-pill {
  transform: translateY(-1px);
}

.clan-edit-modal.active {
  animation: clan-fade-in var(--clan-motion-fast) ease both;
}

.clan-edit-modal-content {
  animation: clan-fade-up 260ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .clan-page-shell *,
  .clan-page-shell *::before,
  .clan-page-shell *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ── Hero column-3 wrapper (owner tools + member join/leave) ─── */
.hero-actions-col {
  position: relative;
  justify-self: end;
  align-self: start;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hero-actions-col .hero-owner-tools {
  position: static;
  justify-self: unset;
  align-self: unset;
}

.hero-member-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--bottom-line-table);
  background: var(--button);
  color: var(--text-default);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hero-member-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.hero-member-btn.join-btn {
  background: rgba(56, 142, 100, 0.18);
  border-color: rgba(80, 180, 130, 0.40);
  color: #9be1be;
}

.hero-member-btn.join-btn:hover {
  background: rgba(56, 142, 100, 0.28);
  border-color: rgba(80, 180, 130, 0.60);
  color: #c3f0d8;
}

.hero-member-btn.leave-btn {
  background: rgba(170, 49, 60, 0.16);
  border-color: rgba(190, 74, 87, 0.42);
  color: #f2a5ad;
}

.hero-member-btn.leave-btn:hover {
  background: rgba(170, 49, 60, 0.26);
  border-color: rgba(222, 96, 110, 0.58);
  color: #ffd1d5;
}

.hero-member-btn.pending-btn {
  background: rgba(100, 100, 100, 0.14);
  border-color: rgba(150, 150, 150, 0.30);
  color: var(--text-custom);
  cursor: default;
  opacity: 0.8;
}

.hero-member-btn.in-clan-btn,
.hero-member-btn.closed-btn {
  background: rgba(80, 80, 80, 0.10);
  border-color: rgba(120, 120, 120, 0.25);
  color: var(--text-custom);
  cursor: default;
  opacity: 0.65;
  font-weight: 500;
}

@media (max-width: 900px) {
  .hero-actions-col {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
}
