/**
* 
* Module clans
* @author - HILER
* 
* @link HLMod:   https://hlmod.net/members/hiler.77403/
* @link CsDevs:  https://csdevs.net/members/hiler.52/
* @link Discord: https://discordapp.com/users/252040667361050625 / hiler / HILER#3959
* 
*/

:root {
    --clans-gold: #FFD700;
    --clans-blue: #6D7FFB;
    --clans-role1: rgb(250 204 21 / 1);
    --clans-role2: rgb(163 163 163);
    --clans-role3: rgb(96 165 250);
    --clans-leave: #ff4940;

    /* neo fallbacks if template palette misses them */
    --clans-text-secondary: #9a9a9a;
    --clans-span-half: color-mix(in srgb, var(--span) 50%, transparent);
    --clans-span-10: color-mix(in srgb, var(--span) 10%, transparent);
    --clans-btn-disabled: #252525;
    --clans-red-10: color-mix(in srgb, var(--red) 10%, transparent);
    --clans-red-20: color-mix(in srgb, var(--red) 20%, transparent);
    --text-secondary: var(--clans-text-secondary);
    --span-half: var(--clans-span-half);
    --span-10: var(--clans-span-10);
    --btn-disabled: var(--clans-btn-disabled);
    --red-10: var(--clans-red-10);
    --red-20: var(--clans-red-20);
    --font-family-1: "Unbounded", sans-serif;
    --input-height: 41px;
    --progress-gradient: linear-gradient(90deg, var(--span-half) 0%, var(--span) 100%);
}

/* =========================================================
   Neo UI bridge — scoped to clans containers only
   ========================================================= */

:is(#container-clans-head, #container-clans, #popupClanCreate) {
    --clans-ui: 1;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .width-100,
:is(#container-clans-head, #container-clans, #popupClanCreate) .width-100 {
    width: 100%;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .margin-left-auto {
    margin-left: auto;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .inputs-inline {
    width: 100%;
    margin-bottom: .3rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .inputs-inline > label,
:is(#container-clans-head, #container-clans, #popupClanCreate) .clan-form__label,
:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_input_name {
    display: flex;
    color: var(--text-custom);
    font-size: var(--font-size-m, 14px);
    font-weight: var(--font-weight-5, 500);
    text-align: left;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    white-space: nowrap;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .inputs-inline > label:has(+ input[required])::after,
:is(#container-clans-head, #container-clans, #popupClanCreate) .inputs-inline > label:has(+ .clan-input input[required])::after {
    content: '*';
    color: var(--red);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: var(--font-size-l, 18px);
    opacity: .5;
    font-weight: 700;
    margin-block: 1rem;
    color: var(--text-custom);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button:not(.popup_modal_close):not(.number-minus):not(.number-plus):not(.button-more):not(.button-icon):not(.button-mores__toggle):not(.adaptive-select):not(.filter):not(.clan-page__tab),
:is(#container-clans-head, #container-clans, #popupClanCreate) .button:not(.button-more):not(.button-icon):not(.filter):not(.clan-page__tab) {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: normal;
    vertical-align: middle;
    gap: .5rem;
    font-weight: 500;
    font-size: 14px;
    width: max-content;
    height: var(--input-height);
    color: var(--text-custom);
    background-color: var(--button);
    border: 1px solid transparent;
    border-radius: 8px;
    outline: 1px solid transparent;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    background-image: none;
    -webkit-user-select: none;
    user-select: none;
    padding-inline: 1rem;
    transition: .2s ease-in-out;
    cursor: pointer;
    outline: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button:not(.popup_modal_close):not(.number-minus):not(.number-plus):not(.button-more):not(.button-icon):not(.button-mores__toggle):not(.filter):not(.clan-page__tab) svg,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button:not(.button-more):not(.button-icon):not(.filter):not(.clan-page__tab) svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    transition: .2s ease-in-out;
    flex-shrink: 0;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button:not(.popup_modal_close):not(.number-minus):not(.number-plus):not(.button-more):not(.button-icon):not(.button-mores__toggle):not(.filter):not(.clan-page__tab):not(.btn-green):not(.btn-red):not(.btn_delete):not(.button-delete):not(.clan-profile__button--leave):hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button:not(.button-delete):not(.button-more):not(.button-icon):not(.filter):not(.clan-page__tab):hover {
    background-color: var(--bottom-line-table) !important;
    color: var(--text-default) !important;
    filter: brightness(1.2);
    outline: none !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button.active:not(.filter):not(.button-more):not(.button-icon),
:is(#container-clans-head, #container-clans, #popupClanCreate) .button.active:not(.button-more):not(.button-icon),
:is(#container-clans-head, #container-clans, #popupClanCreate) button[type="submit"]:not(.btn-red):not(.btn-green):not(.btn_delete):not(.button-delete):not(.clan-profile__button--leave):not(.filter) {
    background-color: var(--span);
    color: var(--text-default-invert, #fff);
    outline: 1px solid transparent;
    border-color: transparent;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button.active:not(.filter):not(.button-more):not(.button-icon):hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button.active:not(.button-more):not(.button-icon):hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) button[type="submit"]:not(.btn-red):not(.btn-green):not(.btn_delete):not(.button-delete):not(.clan-profile__button--leave):not(.filter):hover {
    background-color: transparent;
    color: var(--span);
    outline: 1px solid var(--span);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button:disabled,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.disabled,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button.disabled {
    color: var(--transparent-10-w);
    background-color: var(--btn-disabled);
    cursor: not-allowed;
    outline: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) button:disabled:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.disabled:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button.disabled:hover {
    color: var(--transparent-10-w);
    background-color: var(--btn-disabled);
    outline: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-green {
    background-color: color-mix(in srgb, var(--green) 10%, transparent) !important;
    color: var(--green) !important;
    outline: 1px solid transparent !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-green:hover {
    background-color: color-mix(in srgb, var(--green) 20%, transparent) !important;
    color: var(--green) !important;
    outline: 1px solid color-mix(in srgb, var(--green) 20%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--green) 20%, transparent) !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-red,
:is(#container-clans-head, #container-clans, #popupClanCreate) .btn_delete,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-delete {
    background-color: color-mix(in srgb, var(--red) 10%, transparent) !important;
    color: var(--red) !important;
    outline: 1px solid transparent !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-red:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .btn_delete:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-delete:hover {
    background-color: color-mix(in srgb, var(--red) 20%, transparent) !important;
    color: var(--red) !important;
    outline: 1px solid color-mix(in srgb, var(--red) 20%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--red) 20%, transparent) !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-panel {
    padding-inline: 10px;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .btn-panel svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .badge-btn {
    margin-left: auto;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_modal_btns {
    display: flex;
    gap: .5rem;
    width: 100%;
    margin-top: .25rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_modal_btns button,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.width-100,
:is(#container-clans-head, #container-clans, #popupClanCreate) .width-100,
:is(#container-clans-head, #container-clans, #popupClanCreate) .clan-profile__button,
:is(#container-clans-head, #container-clans, #popupClanCreate) #ClanJoin {
    flex: 1;
    width: 100%;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_settings_radio {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    margin-bottom: .3rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_settings_radio > label,
:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_settings_radio .custom-radio {
    display: inline-flex;
    align-items: center;
    width: auto;
    flex: 1;
    margin: 0;
    white-space: normal;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clans_settings_radio > input[type="radio"] {
    flex-shrink: 0;
    margin: 0;
}

/* Dropdown menu items — not primary CTA buttons */
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu a,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu button {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: .5rem;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: .4rem .75rem !important;
    border-radius: 8px !important;
    background-color: transparent !important;
    color: var(--text-custom) !important;
    outline: none !important;
    border: 1px solid transparent !important;
    font-size: 13px !important;
    font-weight: 500;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu a:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu button:hover {
    background-color: var(--transparent-5-w) !important;
    color: var(--text-default) !important;
    outline: none !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu button svg,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu a svg {
    width: .9rem !important;
    height: .9rem !important;
    fill: currentColor !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu .button-delete,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu button.button-delete {
    color: var(--red) !important;
    background-color: color-mix(in srgb, var(--red) 8%, transparent) !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu .button-delete:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .button-mores__menu button.button-delete:hover {
    background-color: color-mix(in srgb, var(--red) 16%, transparent) !important;
    color: var(--red) !important;
}

/* Compact action buttons inside admin/tables */
:is(#container-clans-head, #container-clans, #popupClanCreate) .action-buttons {
    display: flex;
    align-items: center;
    gap: .3rem;
    justify-content: flex-end;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .action-buttons button {
    height: 32px !important;
    min-height: 32px !important;
    padding-inline: .7rem !important;
    font-size: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-custom);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .action-buttons button svg {
    fill: var(--text-default);
}

/* Admin / module tables — compact row height like remastered */
:is(#container-clans-head, #container-clans, #popupClanCreate) table tbody td,
:is(#container-clans-head, #container-clans, #popupClanCreate) table thead th {
    padding: .55rem 1rem;
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid var(--input-form, var(--transparent-5-w));
}

:is(#container-clans-head, #container-clans, #popupClanCreate) table tbody td {
    padding: 0 .3rem 0 1rem;
    height: 54px;
    white-space: nowrap;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) table tbody td svg,
:is(#container-clans-head, #container-clans, #popupClanCreate) .table__cell--text svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem;
    max-height: 1rem;
    fill: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .clan-table__cell--place svg {
    width: 1.6rem !important;
    height: 1.6rem !important;
    max-width: 1.6rem;
    max-height: 1.6rem;
    fill: var(--span);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) table thead th {
    font-weight: 400;
    font-size: 12px !important;
    color: var(--text-custom);
    opacity: .45;
    white-space: nowrap;
    text-align: left;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) table thead th svg {
    width: .9rem !important;
    height: .9rem !important;
    fill: currentColor;
    opacity: .7;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) table tbody tr {
    font-size: 14px;
    color: var(--text-default);
    font-weight: 400;
}

/* Filter tabs */
:is(#container-clans-head, #container-clans, #popupClanCreate) .filter {
    font-weight: 600;
    border-radius: 10px;
    font-size: 12px;
    transition: all .25s;
    height: 2.2rem;
    padding-inline: 1rem;
    border: 1px solid var(--transparent-5-w);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    line-height: normal;
    white-space: nowrap;
    background-color: transparent;
    color: var(--text-custom);
    width: max-content;
    cursor: pointer;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .filter:hover {
    background-color: var(--button-hover);
    cursor: pointer;
    border: 1px solid var(--transparent-5-w);
    outline: none;
    color: var(--text-default);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .filter.active,
:is(#container-clans-head, #container-clans, #popupClanCreate) .filter.clan-page__tab--active,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.filter.clan-page__tab--active,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.clan-page__tab.clan-page__tab--active {
    background-color: var(--span) !important;
    color: var(--text-default-invert, #fff) !important;
    border: 1px solid transparent !important;
    outline: none !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .filter.active:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .filter.clan-page__tab--active:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.filter.clan-page__tab--active:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.clan-page__tab.clan-page__tab--active:hover {
    background-color: var(--span) !important;
    color: var(--text-default-invert, #fff) !important;
    outline: none !important;
    border: 1px solid transparent !important;
    cursor: default;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .filter svg {
    width: .8rem;
    height: .8rem;
    fill: currentColor;
}

/* Inputs */
:is(#container-clans-head, #container-clans, #popupClanCreate) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]),
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="number"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="text"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="search"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="password"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="email"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="url"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="tel"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="date"],
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="datetime-local"] {
    font-size: 13px;
    padding: 15px 14px;
    height: 40px;
    color: var(--span);
    background-color: var(--input-form);
    border-radius: 12px;
    width: 100%;
    transition: .3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: 3px solid transparent;
    border: none;
    color-scheme: dark;
    box-sizing: border-box;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]):focus,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="number"]:focus,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="text"]:focus,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="search"]:focus,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="password"]:focus,
:is(#container-clans-head, #container-clans, #popupClanCreate) select:focus:not([readonly]) {
    outline: 3px solid var(--span);
    transition: .3s;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input:disabled,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[readonly] {
    background-color: var(--input-form);
    opacity: .6;
    cursor: not-allowed;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input::-webkit-input-placeholder {
    color: var(--text-secondary);
    opacity: .55;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input::-moz-placeholder {
    color: var(--text-secondary);
    opacity: .55;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input:focus::-webkit-input-placeholder {
    opacity: 0;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input:focus::-moz-placeholder {
    opacity: 0;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="number"]::-webkit-outer-spin-button,
:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="number"]::-webkit-inner-spin-button {
    display: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) select {
    display: flex;
    cursor: pointer;
    white-space: nowrap;
    word-wrap: normal;
    text-align: left;
    color: var(--span);
    background-color: var(--input-form);
    height: 40px;
    border: none;
    border-radius: 12px;
    outline: 3px solid transparent;
    padding-inline: 14px;
    width: 100%;
    font-weight: 500;
    font-size: 13px;
    align-items: center;
    transition: .3s;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) select:not([multiple]) {
    padding-right: 1.2em;
    background-repeat: no-repeat;
    background-position: calc(100% - 1em) 1.2em;
    background-size: .8em auto;
    background-image: url(/storage/cache/img/icons/arr.svg);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) select option {
    background-color: var(--bg-table, var(--input-form));
    color: var(--span);
    font-weight: 600;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) textarea {
    font-size: 14px;
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    box-sizing: border-box;
    outline: 3px solid transparent;
    border: none;
    color-scheme: dark;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    color: var(--span);
    border-radius: 12px;
    background-color: var(--input-form);
    resize: none;
    cursor: text;
    transition: .3s;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) textarea:focus {
    outline: 3px solid var(--span);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) fieldset {
    padding: 10px 25px;
    margin-block: .1rem 1rem;
    border: 1px solid var(--transparent-5-w);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) legend {
    box-sizing: border-box;
    display: table;
    max-width: 100%;
    white-space: normal;
    padding: 0 10px;
    color: var(--text-secondary);
    font-size: var(--font-size-m, 14px);
    font-weight: 500;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) input[type="file"] {
    display: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .file-upload-container {
    display: flex;
    background-color: transparent;
    padding: .15rem;
    border-radius: 8px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: var(--text-default);
    font-size: 14px;
    height: 47px;
    border: 1px dashed var(--transparent-10-w);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .file-upload-info {
    display: none;
    color: var(--span);
    user-select: none;
    text-wrap: nowrap;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .file-upload-container label {
    background-color: var(--button);
    padding-inline: 1rem;
    height: 41px;
    border-radius: 6px;
    border: 1px solid var(--transparent-5-w);
    cursor: pointer;
    color: var(--text-custom);
    transition: .2s;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .file-upload-container label:hover {
    background-color: var(--button-hover);
}

@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"],
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"] {
        --active: var(--span-middle);
        --active-inner: var(--span);
        --focus: 4px solid var(--transparent-2-w);
        --border: var(--transparent-10-w);
        --border-hover: rgb(255 255 255 / 25%);
        --background: transparent;
        --disabled: var(--card);
        --disabled-inner: var(--span-middle);
        -webkit-appearance: none;
        -moz-appearance: none;
        height: 21px;
        outline: none !important;
        display: inline-block;
        vertical-align: top;
        position: relative;
        margin: 0;
        cursor: pointer;
        border: 1px solid var(--bc, var(--border)) !important;
        background: var(--b, var(--background)) !important;
        transition: background .3s, border-color .3s, box-shadow .2s;
        padding: 0;
        width: auto;
        border-radius: 0;
        color: inherit;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:after,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:after {
        content: "";
        display: block;
        left: 0;
        top: 0;
        position: absolute;
        transition: transform var(--d-t, .3s) var(--d-t-e, ease), opacity var(--d-o, .2s);
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:checked,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:checked {
        --b: var(--active);
        --bc: var(--active);
        --d-o: .3s;
        --d-t: .6s;
        --d-t-e: cubic-bezier(.2, .85, .32, 1.2);
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:disabled,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:disabled {
        --b: var(--disabled);
        cursor: not-allowed;
        opacity: .9;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:hover:not(:checked):not(:disabled),
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:hover:not(:checked):not(:disabled) {
        --bc: var(--border-hover);
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch),
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:not(.switch) {
        width: 21px;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch):after,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:not(.switch):after {
        opacity: var(--o, 0);
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch):checked,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:not(.switch):checked {
        --o: 1;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"] + label,
    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"] + label {
        font-size: 14px;
        line-height: 21px;
        display: inline-block;
        vertical-align: top;
        cursor: pointer;
        margin-left: 7px;
        color: var(--text-custom);
        margin-bottom: 0;
        white-space: normal;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch) {
        border-radius: 7px;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch):after {
        width: 5px;
        height: 9px;
        border: 2px solid var(--active-inner);
        border-top: 0;
        border-left: 0;
        left: 7px;
        top: 4px;
        transform: rotate(var(--r, 20deg));
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"]:not(.switch):checked {
        --r: 43deg;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"].switch {
        width: 38px;
        border-radius: 11px;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"].switch:after {
        left: 2px;
        top: 2px;
        border-radius: 50%;
        width: 15px;
        height: 15px;
        background: var(--ab, var(--border));
        transform: translateX(var(--x, 0));
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="checkbox"].switch:checked {
        --ab: var(--active-inner);
        --x: 17px;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"] {
        border-radius: 50%;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:after {
        width: 19px;
        height: 19px;
        border-radius: 50%;
        background: var(--active-inner);
        opacity: 0;
        transform: scale(var(--s, .7));
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:checked {
        --s: .5;
        --o: 1;
    }

    :is(#container-clans-head, #container-clans, #popupClanCreate) input[type="radio"]:checked:after {
        opacity: 1;
    }
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number {
    display: flex;
    position: relative;
    width: 100%;
    align-items: center;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number > input {
    width: 100%;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number > input[type="password"],
:is(#container-clans-head, #container-clans, #popupClanCreate) .number > input[type="text"] {
    padding-right: 2.8rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .eye-password {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.563rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background-color: var(--input-form, var(--button));
    border-radius: 0 var(--br-8, 8px) var(--br-8, 8px) 0;
    cursor: pointer;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .eye-password svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: var(--text-custom);
    opacity: .3;
    transition: .2s ease-in-out;
    flex-shrink: 0;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .eye-password:hover svg {
    opacity: 1;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number-minus,
:is(#container-clans-head, #container-clans, #popupClanCreate) .number-plus {
    display: flex !important;
    position: absolute;
    width: 35px;
    height: 35px;
    padding: 0;
    font-size: 18px;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: var(--transparent-2-w);
    color: var(--text-custom);
    cursor: pointer;
    transition: .2s;
    z-index: 2;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number-plus {
    right: 2.45rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number-minus {
    right: .2rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .number-minus:hover,
:is(#container-clans-head, #container-clans, #popupClanCreate) .number-plus:hover {
    background-color: var(--button);
    color: var(--text-default);
    outline: none;
}

/* Adaptive select (from neo_remastered) */
:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select-wrapper {
    position: relative;
    margin-bottom: .3rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: .625rem;
    border-radius: 8px;
    padding-inline: 1rem 0;
    font-size: 12px;
    background-color: var(--input-form);
    border: 1px solid var(--transparent-3-w);
    min-width: 180px;
    width: 100%;
    cursor: pointer;
    transition: .2s;
    height: var(--input-height);
    color: var(--text-custom);
    justify-content: start;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__arrow {
    height: 2rem;
    background-color: transparent;
    transition: .2s;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: .7rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__arrow svg {
    width: .6rem;
    height: .6rem;
    fill: currentColor;
    transition: .2s;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background-color: var(--transparent-3-w);
    padding: .8rem;
    border-radius: 8px;
    transition: .2s;
    margin-bottom: 0;
    border: 1px solid transparent;
    justify-content: start;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label:hover {
    background-color: var(--transparent-5-w);
    color: var(--text-default);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label-text {
    font-size: 12px;
    color: var(--text-secondary);
    transition: .2s;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label:has(input:checked) {
    background-color: var(--button-hover);
    border: 1px solid var(--transparent-10-w);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label:has(input:disabled) {
    pointer-events: none;
    filter: brightness(.5);
    -webkit-user-select: none;
    user-select: none;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label:has(input:checked) .adaptive-select__label-text {
    color: var(--text-default);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__span_text {
    transition: .2s;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__fist-icon {
    color: var(--text-custom);
    opacity: .3;
    transition: .2s;
    display: flex;
    align-items: center;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__fist-icon svg,
:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__fist-icon img {
    fill: currentColor;
    transition: .2s;
    width: .8rem;
    height: .8rem;
    display: block;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select:hover .adaptive-select__fist-icon {
    opacity: .5;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select:hover {
    color: var(--text-default);
    border: 1px solid var(--transparent-5-w);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__dropdown-list {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: 3rem;
    left: 0;
    width: max-content;
    max-width: 16rem;
    min-width: 100%;
    padding: .3rem;
    background-color: var(--card);
    z-index: 20;
    border-radius: 12px;
    border: 1px solid var(--transparent-5-w);
    box-shadow: 0 2px 20px 0 rgba(0, 0, 0, .15);
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 20rem;
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    transition: .2s;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__bottom {
    bottom: 3rem;
    top: unset;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__dropdown-list.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label input {
    margin-left: auto;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__label img {
    width: 1rem;
    height: 1rem;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__dropdown-list.visible + .adaptive-select .adaptive-select__arrow svg {
    transform: rotateX(180deg);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .adaptive-select__icon svg {
    width: .8rem;
    height: .8rem;
    fill: var(--text-secondary);
}

:is(#container-clans-head, #container-clans, #popupClanCreate) .hide-input {
    display: none !important;
}

:is(#container-clans-head, #container-clans, #popupClanCreate) img {
    user-select: none;
    pointer-events: none;
}

.clan-head {
    display: flex;
    gap: .3rem;
    justify-content: space-between;
}

.clan-head__group {
    display: flex;
    gap: .3rem;
}

.clan-head__group button svg,
.clan-page__link svg,
.clan_btn_admin svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.btn-panel svg,
.clan-admin-nav__actions svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.button-mores .button-more svg,
.button-more svg {
    width: .85rem !important;
    height: .85rem !important;
}

.clan_btn_admin.active {
    background-color: var(--span);
    color: var(--text-default-invert, #fff);
}

.clan_btn_admin.active:hover {
    background-color: transparent;
    color: var(--span);
    outline: 1px solid var(--span);
}

.clan-cards {
    display: grid;
    gap: 12px;
}

.clan-cards__inline-3 {
    grid-template-columns: repeat(auto-fill, minmax(25em, 1fr));
}

.clan-cards__inline-4 {
    grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
}

.clan-cards__inline-5 {
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
}

.clan-card {
    position: relative;
    border-radius: var(--br-16);
    background-color: var(--card);
    overflow: hidden;
    cursor: pointer;
    outline-offset: 2px;
    outline: 2px solid transparent;
    transition: .2s ease-in-out;
    border: 1px solid var(--bg);
    height: 13rem;
    display: flex;
    opacity: 0;
    animation: clan-card-in .15s ease forwards;
}

@keyframes clan-card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clan-card:hover {
    outline: 2px solid var(--transparent-10-w);
}

.clan-card__position {
    position: absolute;
    right: .5rem;
    top: .5rem;
    font-weight: var(--font-weight-5);
    font-size: var(--font-size-s);
    z-index: 3;
    font-family: var(--font-family-1);
    user-select: none;
    background-color: var(--bg);
    padding: .3rem .5rem;
    border-radius: var(--br-7);
    color: var(--text-custom);
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
}

.clan-card:hover .clan-card__position {
    opacity: 1;
    visibility: visible;
}

.clan-card__media {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.clan-card__media:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-image: linear-gradient(0deg, var(--card), transparent);
    z-index: 1;
    pointer-events: none;
}

.clan-card__banner {
    width: 100%;
    height: 100%;
    opacity: .7;
    object-fit: cover;
    display: block;
    color: var(--span);
    transition: .2s ease;
}

svg.clan-card__banner.is-custom {
    background-size: cover;
    background-position: center;
}

svg.clan-card__banner.is-custom > * {
    opacity: 0;
}

.clan-card:hover .clan-card__banner {
    opacity: 1;
}

.clan-card__avatar {
    position: absolute;
    top: .5rem;
    left: .5rem;
    width: 5rem;
    height: 5rem;
    border-radius: var(--br-10);
    border: 4px solid var(--card);
    object-fit: cover;
    background-color: var(--card);
    color: var(--span);
    display: block;
    z-index: 2;
}

svg.clan-card__avatar,
svg.clan-profile__avatar {
    border: 1px solid var(--transparent-3-w);
}

svg.clan-card__avatar.is-custom,
svg.clan-profile__avatar.is-custom {
    background-size: cover;
    background-position: center;
}

svg.clan-card__avatar.is-custom > *,
svg.clan-profile__avatar.is-custom > * {
    opacity: 0;
}

.clan-card__content {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 8px;
    z-index: 3;
    width: 100%;
}

.clan-card__head {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .3rem;
    line-height: normal;
}

.clan-card__title {
    font-size: var(--font-size-xl);
    transition: .2s ease;
    font-weight: 700;
}

.clan-card:hover .clan-card__title {
    color: var(--span);
}

.clan-card__tag {
    color: var(--text-custom);
    background-color: var(--transparent-20-b);
    padding: .3rem;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: var(--br-5);
    overflow: hidden;
    font-size: var(--font-size-xs);
}

.clan-card__stats {
    display: flex;
    gap: 12px;
    font-size: 14px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.clan-card__stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.clan-card__stat svg {
    fill: var(--text-custom);
    width: 18px;
    height: 18px;
}

.clan-card__stat--rating span,
.clan-card__stat--rating svg {
    color: var(--clans-blue);
    fill: var(--clans-blue);
}

.clan-card__stat--bank span,
.clan-card__stat--bank svg {
    color: var(--clans-gold);
    fill: var(--clans-gold);
}

.clan-card__stat--bank svg {
    width: 15px;
    height: 15px;
}

.clan-card__stat--players span,
.clan-card__stat--players svg {
    color: var(--text-custom);
    fill: var(--text-custom);
}

.clan-card__stat--players svg {
    width: 20px;
    height: 20px;
}

.clan-card__footer {
    display: flex;
    align-items: center;
    gap: 5px;
}

.clan-card__footer span {
    font-size: 14px;
    color: var(--text-custom);
}

.clan-card__dot {
    width: 4px;
    height: 4px;
    background-color: var(--transparent-5-w);
    border-radius: 50%;
}

.button_pagination {
    border-radius: 6px;
    background: transparent;
    color: var(--text-default);
}

.button_pagination svg {
    fill: var(--text-default) !important;
    opacity: 1 !important;
}

.button_pagination:hover {
    background: var(--transparent);
    cursor: pointer;
}

.button_pagination.active {
    background: var(--transparent);
}

/* ------------------------------------------------- */

.clan-page {
    display: flex;
    width: 100%;
    gap: 10px;
}

.clan-page__column {
    flex-direction: column;
    gap: 0;
}

.clan-page__sidebar {
    width: 100%;
    max-width: 350px;
    min-width: 350px;
    overflow: hidden;
    height: max-content;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.clan-page__content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.clan-profile__expiry-alert {
    --clan-expiry-color: var(--orange);
    border-radius: var(--br-16);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: color-mix(in srgb, var(--clan-expiry-color) 10%, transparent) !important;
    color: var(--clan-expiry-color);
    font-size: 14px;
    height: 4rem;
}

.clan-profile__expiry-alert svg {
    width: 2.5rem;
    height: 2.5rem;
}

.clan-profile {
    background-color: var(--card);
    border-radius: var(--br-16);
    position: relative;
    overflow: hidden;
}

.clan-profile__media {
    position: relative;
}

.clan-profile__media::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-image: linear-gradient(0deg, var(--card), transparent);
    z-index: 1;
    pointer-events: none;
}

.clan-profile__banner {
    height: 160px;
    object-fit: cover;
    width: 100%;
    display: block;
    color: var(--span);
}

.clan-profile__avatar {
    position: absolute;
    height: 90px;
    width: 90px;
    border-radius: 8px;
    outline: 6px solid var(--card);
    bottom: -42px;
    left: 1.2rem;
    background-color: var(--card);
    object-fit: cover;
    color: var(--span);
    display: block;
    z-index: 1;
}

.clan-profile__additional {
    position: absolute;
    top: .5rem;
    right: .5rem;
    opacity: .5;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    z-index: 2;
}

.clan-profile__additional button,
.clan-profile__additional .button-more,
.clan-profile__additional .button-mores__toggle {
    background-color: var(--button) !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    outline: none !important;
    border: none !important;
    color: var(--text-custom) !important;
}

.clan-profile__additional button:hover,
.clan-profile__additional .button-more:hover,
.clan-profile__additional .button-mores__toggle:hover {
    background-color: var(--button-hover) !important;
    color: var(--text-default) !important;
    outline: none !important;
}

.clan-profile__additional button svg {
    width: 14px !important;
    height: 14px !important;
    fill: currentColor !important;
}

.clan-profile__reactions {
    display: flex;
    align-items: center;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    position: absolute;
    z-index: 1;
    top: 8.6rem;
    left: 8.4rem;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
}

.clan-profile__reactions-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--transparent-3-w);
    padding: 10px;
}

.clan-profile__reactions-item:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.clan-profile__reactions-item:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.clan-profile__reactions-item svg {
    fill: var(--text-secondary);
    transition: .2s;
}

.clan-profile__reactions-item span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.clan-profile__reactions-item-button {
    cursor: pointer;
}

.clan-profile__reactions-item-button:hover svg,
.clan-profile__reactions-item-active svg {
    fill: var(--text-custom);
}

.clan-profile__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2.4rem;
    padding: 16px;
}

.clan-profile__header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: normal;
}

.clan-profile__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.clan-profile__tag {
    background-color: var(--transparent-5-w);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-custom);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid var(--button-hover);
}

.clan-profile__description {
    color: var(--text-custom);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clan-profile__stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: .3rem;
}

.clan-profile__stat {
    background-color: var(--transparent-3-w);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: left;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: normal;
}

.clan-profile__stat-label {
    display: flex;
    justify-content: space-between;
    color: var(--text-custom);
    font-weight: 500;
    font-size: 12px;
    margin: 0;
}

.clan-profile__stat-value {
    font-weight: 600;
    font-size: 12px;
}

.clan-profile__stat-icon {
    background-color: var(--transparent-5-w);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
}

.clan-profile__stat-icon svg {
    opacity: .5;
    width: 1rem;
    height: 1rem;
    fill: var(--text-custom);
    display: block;
    flex-shrink: 0;
}

.clan-profile__meta-block {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.clan-profile__meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-custom);
}

.clan-profile__meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.clan-profile__meta-item svg {
    fill: var(--text-custom);
    width: 14px;
    height: 14px;
}

.clan-profile__progress {
    width: 100%;
    height: 6px;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--transparent-2-w);
    margin: 2px 0;
}

.clan-profile__progress::-webkit-progress-bar {
    background-color: var(--transparent-2-w);
    border-radius: 6px;
}

.clan-profile__progress::-webkit-progress-value {
    background: var(--progress-gradient);
    border-radius: 6px;
}

.clan-profile__progress::-moz-progress-bar {
    background: var(--progress-gradient);
    border-radius: 6px;
}

.clan-profile__actions {
    position: relative;
}

.clan-profile__button {
    width: 100%;
    cursor: auto;
}

.clan-profile__actions .clan-profile__button,
.clan-profile__actions #ClanJoin,
.clan-profile__actions button {
    width: 100% !important;
    outline: none !important;
}

.clan-profile__actions .clan-profile__button:not(:disabled),
.clan-profile__actions #ClanJoin {
    cursor: pointer;
}

.clan-profile__button--leave {
    background-color: color-mix(in srgb, var(--clans-leave) 10%, transparent) !important;
    color: var(--clans-leave) !important;
    border: none !important;
    outline: 1px solid transparent !important;
}

.clan-profile__button.active:not(.clan-profile__button--leave):hover {
    filter: none;
    cursor: pointer;
    background-color: transparent !important;
    color: var(--span) !important;
    outline: 1px solid var(--span) !important;
}

.clan-profile__button--leave:hover {
    filter: none;
    cursor: pointer;
    background-color: color-mix(in srgb, var(--clans-leave) 20%, transparent) !important;
    color: var(--clans-leave) !important;
    outline: 1px solid color-mix(in srgb, var(--clans-leave) 25%, transparent) !important;
}

.clan-page__nav {
    display: flex;
    gap: .3rem;
    background-color: var(--card);
    padding: .5rem;
    border-top-left-radius: var(--br-16);
    border-top-right-radius: var(--br-16);
    border-bottom: 1px solid var(--transparent-5-w);
    overflow: auto;
}

.clan-page__body {
    display: flex;
    gap: 10px;
    border-bottom-left-radius: var(--br-16);
    border-bottom-right-radius: var(--br-16);
    overflow: hidden;
}

.clan-page__link {
    height: 36px !important;
    min-height: 36px !important;
    padding-inline: .8rem !important;
    border-radius: 6px !important;
    outline: none !important;
    border: 1px solid transparent !important;
    background-color: transparent !important;
}

.clan-page__link.active,
.clan-page__link.active:hover {
    background-color: var(--bottom-line-table) !important;
    border: 1px solid var(--bg-table) !important;
    color: var(--text-default) !important;
    outline: none !important;
    filter: brightness(1.2);
}

.clan-page__link.active svg {
    fill: currentColor !important;
}

.clan-page__section {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--card);
    padding: 16px;
    max-height: 620px;
    overflow: auto;
}

.clan-page__section-skeleton {
    height: 620px;
}

.clan-page__section-skeleton .skeleton--default,
.clan-page__section-skeleton .skeleton--slow,
.clan-page__section-skeleton .skeleton--fast {
    height: 100%;
    border: 1px solid var(--transparent-5-w);
}

.clan-page__section--full-height {
    height: 620px;
}

/* ------------------------------------------------- */

.clan-section__header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.clan-section__header h3 {
    margin: 0;
    font-size: var(--font-size-l);
    font-weight: var(--font-weight-6);
}

.clan-section__header svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: var(--span);
}

.clan-section__description span {
    color: var(--text-custom);
    white-space: pre-line;
}

.clan-page__actions {
    display: flex;
    gap: .3rem;
    background-color: var(--input-form);
    padding: .3rem;
    border-radius: var(--br-12);
    margin-bottom: .5rem;
}

.clan-page__actions button {
    flex: 1;
    border-radius: 8px;
}

.clan-page__tab--active,
.clan-page__tab--active:hover {
    background-color: var(--span) !important;
    color: var(--text-default-invert, #fff) !important;
    border: 1px solid transparent !important;
    outline: none !important;
}

.clan-page__tab--active:hover {
    background-color: var(--span) !important;
    color: var(--text-default-invert, #fff) !important;
    outline: none !important;
    border: 1px solid transparent !important;
    cursor: default;
}

.clan-page__tab--active span {
    color: inherit;
}

.clan-page__panel {
    display: none;
    width: 100%;
    min-width: 0;
}

.clan-page__panel--active {
    display: flex;
    width: 100%;
    min-width: 0;
    overflow: auto;
}

/* Players tabs: stack table + sticky actions vertically */
.clan-page__section > .clan-page__panel--active {
    flex-direction: column;
}

/* Admin logs settings: keep bootstrap/multi-container row */
.clan-page__panel--active.multi-container {
    flex-direction: row;
    flex-wrap: wrap;
    overflow: unset;
}

.clan-page__panel--active > .table-responsive,
.clan-page__panel--active > .table {
    width: 100%;
    min-width: 0;
}

.clan-page__panel thead th svg {
    width: .9rem;
    height: .9rem;
    fill: currentColor;
    opacity: .55;
    vertical-align: middle;
    flex-shrink: 0;
}

.clan-table__row--place,
.clan-table__cell--place {
    width: 2.8rem;
    text-align: center;
}

.clan-table__cell--place {
    font-weight: var(--font-weight-7);
    color: var(--text-secondary);
}

.clan-table__cell--place svg {
    width: 1.6rem;
    height: 1.6rem;
}

.clan-table__row--role,
.clan-table__cell--role {
    width: 8rem;
}

.clan-table__cell--place-icon-1 svg {
    fill: var(--clans-role1);
}

.clan-table__cell--place-icon-3 svg {
    fill: var(--clans-role3);
}

.clan-table__nick--banned {
    text-decoration: line-through;
    color: var(--red);
    opacity: .6;
}

.clan-table__badges {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem;
    border-radius: var(--br-6);
    background-color: var(--transparent-5-w);
    border: 1px solid var(--transparent-4-w);
    margin-left: .3rem;
}

.clan-table__badge--vip {
    fill: var(--money);
}

.clan-table__badge--admin {
    fill: var(--ct);
}

.clan-table__badge--banned {
    fill: var(--red);
}

.clan-table__role {
    padding: 5px 10px;
    border-radius: 6px;
    max-width: max-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.clan-table__role-type-1 {
    background-color: color-mix(in srgb, var(--clans-role1) 10%, transparent);
    color: var(--clans-role1);
}

.clan-table__role-type-2 {
    background-color: color-mix(in srgb, var(--clans-role2) 10%, transparent);
    color: var(--clans-role2);
}

.clan-table__role-type-3 {
    background-color: color-mix(in srgb, var(--clans-role3) 10%, transparent);
    color: var(--clans-role3);
}

.clan-table__actions {
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    gap: 0;
}

.clan-table__actions-button,
:is(#container-clans-head, #container-clans, #popupClanCreate) button.clan-table__actions-button {
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    flex: 1 1 0;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: var(--input-height) !important;
    min-height: var(--input-height);
    border-radius: 0 !important;
}

.clan-table__actions-button:focus {
    border: none;
    outline: none;
}

.clan-requests-count {
    color: var(--green);
}

.clan-page__link.active .clan-requests-count {
    color: var(--text-default);
}

.clan-page__tab--active .clan-requests-count {
    color: var(--span);
}

.clan-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.clan-empty svg {
    width: 20rem;
    height: 20rem;
    fill: var(--text-custom);
    opacity: .1;
}

.clan-empty span {
    position: absolute;
    font-weight: 700;
    color: var(--text-custom);
    z-index: 1;
    text-align: center;
    font-size: 2.4rem;
}

.clan-services__badge,
.clan-shop__badge {
    border-bottom: none;
    padding-block: 1rem;
}

.clan-services__badge:first-of-type,
.clan-shop__badge:first-of-type {
    padding-top: 0;
}

.clan-services__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
}

.clan-service {
    position: relative;
    display: flex;
    gap: 16px;
    height: 100%;
    padding: 16px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
}

.clan-service__limit {
    position: absolute;
    background-color: var(--transparent-3-w);
    border-radius: 0 0 0 12px;
    padding: 4px 10px;
    top: 0;
    right: 0;
    font-weight: 500;
    color: var(--text-custom);
    font-size: 10px;
    cursor: default;
}

.clan-service__icon {
    border-radius: 10px;
    height: 52px;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-service__icon svg {
    width: 1.8rem;
    height: 1.8rem;
}

.clan-service__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 0%;
    height: 100%;
}

.clan-service__info {
    display: flex;
    flex-direction: column;
}

.clan-service__title {
    margin-bottom: 0.25rem;
}

.clan-service__desc {
    color: var(--text-custom);
    margin: 0;
    line-height: 1.6;
}

.clan-service__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clan-service__price {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.clan-service__price svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
    fill: currentColor;
    flex-shrink: 0;
    display: block;
}

.clan-service__button {
    height: 36px;
}

.clan-service__button:not(.clan-service__button--max):hover {
    filter: brightness(1.2);
}

.clan-service__button.clan-service__button--max:hover {
    background-color: var(--button);
    color: var(--text-custom);
    cursor: auto;
}

.clan-service-modal__content {
    max-width: 450px;
}

.clan-service-modal__head {
    border-bottom: 1px solid var(--transparent-5-w);
}

.clan-service-modal__info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.clan-service-modal__icon {
    position: relative;
    display: inline-flex;
}

.clan-service-modal__icon svg {
    width: 5rem;
    height: 5rem;
}

.clan-service-modal__stats {
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
}

.clan-service-modal__bonus {
    display: none;
    align-items: center;
    gap: .3rem;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: var(--span);
    color: var(--text-default-invert, #fff);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
}

.clan-service-modal__bonus svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    flex-shrink: 0;
}

.clan-service-modal__bonus.active {
    display: inline-flex;
}

.clan-service-modal__description {
    color: var(--text-custom);
    font-size: 13px;
    margin: 0 30px;
}

.clan-service-modal__button,
#ClanServiceBuy,
#clan-settings-save button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    width: 100% !important;
    max-width: 100%;
    height: var(--input-height) !important;
    min-height: var(--input-height);
    flex: none;
}

.clan-modal__info {
    color: var(--text-custom);
    margin-top: -10px;
    max-width: 420px;
}

.clan-modal__transfer-owner {
    display: flex;
    gap: .5rem;
    margin-bottom: 10px;
}

.clan-modal__transfer-owner-detail {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--transparent-5-w);
    border-radius: 8px;
}

.clan-modal__transfer-owner-label {
    font-size: 12px;
    color: var(--text-custom);
}

.clan-modal__transfer-owner-value {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-weight: 500;
    font-size: 18px;
}

.clan-limit-symbols {
    position: absolute;
    right: 15px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-custom);
    transition: .2s;
    bottom: 12px;
}

.clan-limit-symbols span {
    color: var(--text-custom);
    transition: .2s;
}

.clan-limit-symbols.error,
.clan-limit-symbols.error span {
    color: #FF6363;
    text-shadow: 0 0 12px rgba(255, 99, 99, .5);
}

/* ------------------------- */

.clan-input {
    position: relative;
}

.clan-box {
    padding: 1rem;
}

/* ------------------------- */

@media (max-width: 769px) {
    .clan-page {
        flex-direction: column;
    }

    .clan-page__sidebar {
        max-width: none;
        min-width: auto;
    }
}


@media (max-width: 575.98px) {
    .clan-head {
        flex-direction: column;
    }

    .clan-head__group {
        flex-wrap: wrap;
    }

    .clan-head__group button {
        flex: 1;
    }
}

/* ------------------------- */


.clan-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.clan-form__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clan-form__label {
    color: var(--text-custom);
    margin-bottom: 6px;
}

.clan-pagination__arrow svg {
    fill: var(--text-custom);
    opacity: .5;
    transition: .3s;
}

@keyframes spinner-border {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.clan-logs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 490px;
    overflow: auto;
    padding-right: .15rem;
    position: relative;
}

.clan-logs__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background-color: var(--transparent-2-w);
    color: var(--text-custom);
    font-weight: 600;
    font-size: 14px;
}

.clan-logs__icon {
    border-radius: 7px;
    height: 42px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-logs__icon svg {
    width: 1.6rem;
    height: 1.6rem;
}

.clan-logs__content {
    flex: 1 1 0%;
}

.clan-logs__footer {
    display: flex;
    gap: 6px;
    opacity: .7;
}

.clan-logs__time {
    display: flex;
    align-items: center;
    line-height: normal;
    gap: 2px;
    font-size: 10px;
    font-weight: 500;
}

.clan-logs__time svg {
    fill: var(--text-custom);
    width: 13px;
    height: 13px;
}

form {
    margin: 0;
}

.clan-create-modal.popup_modal_content {
    width: 100%;
    max-width: 420px;
    min-width: 0;
}

.clan-create {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 420px;
}

.clan-create--modal {
    width: 100%;
}

.clan-settings__name-tag,
.clan-create__name-tag {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 10rem;
    gap: .5rem;
}

.clan-create__tag {
    min-width: 0;
}

.clan-create__fieldset {
    margin-bottom: .5rem;
}

.clan-create__notice {
    background-color: var(--input-form);
    border-radius: var(--br-8);
    color: var(--text-custom);
    font-size: var(--font-size-m);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .8rem;
}

.clan-create__notice svg {
    width: 2rem;
    height: 2rem;
}

.clan-create__preview {
    width: 100%;
}

.clan-create__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clan-create .clan-card {
    width: 100%;
    cursor: default;
    border: 1px solid var(--transparent-5-w);
}

.clan-create .clan-card:hover {
    outline-color: transparent;
}

.clan-create .clan-card:hover .clan-card__title {
    color: inherit;
}

.clan-create .clan-card__content {
    pointer-events: none;
}

.clan-create__banner-pick {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    cursor: pointer;
    background: none;
}

.clan-create .clan-create-preview:hover .clan-card__banner {
    opacity: 1;
}

.clan-create__pick {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--text-default);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-5);
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    pointer-events: none;
    opacity: .75;
    transition: opacity .2s ease;
    text-shadow: 0 1px 2px rgb(0 0 0 / 55%);
}

.clan-create__pick--banner {
    top: .55rem;
    right: .65rem;
}

.clan-create__banner-pick:hover .clan-create__pick--banner {
    opacity: 1;
}

.clan-create__avatar-pick {
    position: absolute;
    top: .5rem;
    left: .5rem;
    width: 5rem;
    height: 5rem;
    z-index: 5;
    cursor: pointer;
    display: block;
}

.clan-create__avatar-pick .clan-card__avatar {
    position: static;
    width: 100%;
    height: 100%;
    display: block;
}

.clan-create__pick--avatar {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--br-10);
    padding: .35rem;
    text-align: center;
    background-color: rgb(0 0 0 / 45%);
    color: var(--text-default);
    text-shadow: none;
    opacity: 1;
    pointer-events: none;
}

.clan-create__banner-pick.is-filled .clan-create__pick--banner,
.clan-create__avatar-pick.is-filled .clan-create__pick--avatar {
    opacity: 0;
}

.clan-create__banner-pick.is-filled:hover .clan-create__pick--banner,
.clan-create__avatar-pick.is-filled:hover .clan-create__pick--avatar {
    opacity: 1;
}

/* temporary */
.page-filters {
    margin-block: 0.3125rem;
}

.pagination {
    margin-top: 2rem;
}

.clan-card__tag {
    background: linear-gradient(to right, var(--bg-table), var(--card));
    border: solid 1px #888888;
    color: #888888;
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 8px;
}