:root {
    color-scheme: dark;
    --app-bg: #0b1020;
    --app-surface: #121a2d;
    --app-surface-2: #18233b;
    --app-border: rgba(255, 255, 255, .08);
    --app-text: #edf2ff;
    --app-muted: #96a2bd;
    --app-primary: #7c5cff;
    --app-primary-2: #4b8dff;
    --app-success: #36c98f;
    --app-warning: #ffba4a;
    --app-danger: #ff667a;
}

html, body { min-height: 100%; }
body {
    background:
        radial-gradient(circle at 10% 0%, rgba(124, 92, 255, .17), transparent 28rem),
        radial-gradient(circle at 100% 20%, rgba(75, 141, 255, .12), transparent 32rem),
        var(--app-bg);
    color: var(--app-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.app-shell { min-height: 100vh; }
.sidebar {
    width: 270px;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 22px 16px;
    background: rgba(12, 17, 32, .93);
    border-right: 1px solid var(--app-border);
    backdrop-filter: blur(18px);
    z-index: 1040;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 22px;
    text-decoration: none;
}
.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2));
    box-shadow: 0 10px 28px rgba(92, 86, 255, .35);
}
.brand-copy strong { display: block; font-size: .98rem; }
.brand-copy span { color: var(--app-muted); font-size: .76rem; }
.sidebar-label {
    padding: 18px 12px 8px;
    color: #64718e;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    margin: 3px 0;
    border-radius: 11px;
    color: #aeb9d2;
    font-weight: 650;
    font-size: .9rem;
}
.sidebar .nav-link i { font-size: 1.05rem; }
.sidebar .nav-link:hover { color: white; background: rgba(255,255,255,.055); }
.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(100deg, rgba(124,92,255,.27), rgba(75,141,255,.12));
    box-shadow: inset 3px 0 var(--app-primary);
}
.sidebar-footer { margin-top: 28px; padding: 12px; border-top: 1px solid var(--app-border); }

.main-wrap { margin-left: 270px; min-height: 100vh; }
.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 30px;
    border-bottom: 1px solid var(--app-border);
    background: rgba(11, 16, 32, .72);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.page-content { padding: 28px 30px 50px; }
.user-avatar { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; background: var(--app-surface-2); }
.avatar-placeholder { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--app-surface-2); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #68718a; }
.status-dot.online { background: #3bd394; box-shadow: 0 0 0 4px rgba(59,211,148,.12); }

.page-title { margin: 0; font-size: 1.65rem; font-weight: 800; letter-spacing: -.025em; }
.page-subtitle { color: var(--app-muted); margin: 4px 0 0; }

.panel, .card {
    background: linear-gradient(180deg, rgba(25,35,59,.94), rgba(18,26,45,.96));
    border: 1px solid var(--app-border);
    border-radius: 17px;
    color: var(--app-text);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .16);
}
.panel { padding: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title { margin: 0; font-size: 1rem; font-weight: 800; }

.stat-card { padding: 20px; height: 100%; overflow: hidden; position: relative; }
.stat-card::after {
    content: "";
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: absolute;
    right: -38px;
    bottom: -52px;
    background: rgba(255,255,255,.055);
}
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; font-size: 1.2rem; }
.stat-value { margin-top: 18px; font-size: 1.75rem; font-weight: 850; letter-spacing: -.035em; }
.stat-label { color: var(--app-muted); font-size: .82rem; }
.icon-purple { background: rgba(124,92,255,.16); color: #ae9cff; }
.icon-blue { background: rgba(75,141,255,.15); color: #75a9ff; }
.icon-green { background: rgba(54,201,143,.14); color: #59dca7; }
.icon-orange { background: rgba(255,186,74,.14); color: #ffc96d; }
.icon-red { background: rgba(255,102,122,.14); color: #ff8b9b; }

.table { --bs-table-bg: transparent; --bs-table-color: #dce4f7; --bs-table-border-color: var(--app-border); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .85rem .75rem; vertical-align: middle; }
.table thead th { color: #8491ad; font-size: .7rem; text-transform: uppercase; letter-spacing: .075em; font-weight: 800; border-bottom-width: 1px; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: rgba(255,255,255,.025); color: white; }
.table-responsive { border-radius: 13px; }

.form-control, .form-select {
    color: var(--app-text) !important;
    -webkit-text-fill-color: var(--app-text);
    background-color: #0d1628 !important;
    border-color: rgba(255,255,255,.13);
    border-radius: 10px;
    font-weight: 650;
}
.form-control:focus, .form-select:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    background-color: #101b31 !important;
    border-color: #8b73ff;
    box-shadow: 0 0 0 .2rem rgba(124,92,255,.18);
}
.form-control::placeholder { color: #8390aa; -webkit-text-fill-color: #8390aa; }

/* Нативные списки Chrome/Edge/Firefox в Windows наследуют системные цвета
   не всегда одинаково, поэтому задаём фон и текст явно на всех уровнях. */
select.form-select {
    color-scheme: dark;
    color: #f5f7ff !important;
    -webkit-text-fill-color: #f5f7ff !important;
    background-color: #0d1628 !important;
    border-color: rgba(158,143,255,.34);
}
select.form-select:hover {
    border-color: rgba(158,143,255,.62);
    background-color: #101b31 !important;
}
select.form-select option,
select.form-select optgroup,
.form-select option,
.form-select optgroup {
    color: #f5f7ff !important;
    -webkit-text-fill-color: #f5f7ff !important;
    background-color: #111c31 !important;
    font-weight: 600;
}
select.form-select option:checked,
select.form-select option[selected],
.form-select option:checked {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #6657e8 !important;
    background: #6657e8 linear-gradient(135deg, #765fff, #397ee8) !important;
}
select.form-select option:hover,
select.form-select option:focus,
select.form-select option:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #293a60 !important;
}
select.form-select option:disabled,
.form-select option[value=""] {
    color: #aeb8cc !important;
    -webkit-text-fill-color: #aeb8cc !important;
}
.form-select:disabled,
.form-control:disabled {
    background-color: #0a1221 !important;
    color: #7f8da8 !important;
    -webkit-text-fill-color: #7f8da8 !important;
    border-color: rgba(255,255,255,.08);
    opacity: 1;
}
.modal-content .form-select,
.modal-content .form-control {
    color: #f5f7ff !important;
    -webkit-text-fill-color: #f5f7ff !important;
    background-color: #0b1426 !important;
}
.modal-content select.form-select option,
.modal-content select.form-select optgroup {
    color: #f7f9ff !important;
    -webkit-text-fill-color: #f7f9ff !important;
    background-color: #111c31 !important;
}
.form-label { font-size: .78rem; color: #b4c0d8; font-weight: 700; }
.form-text { color: #7d8aa6; }

.btn { border-radius: 10px; font-weight: 720; }
.btn-primary { background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2)); border: 0; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-soft { color: #dbe4ff; background: rgba(255,255,255,.06); border: 1px solid var(--app-border); }
.btn-soft:hover { color: white; background: rgba(255,255,255,.1); }
.btn-danger-soft { color: #ff95a3; background: rgba(255,102,122,.1); border: 1px solid rgba(255,102,122,.2); }
.btn-danger-soft:hover { color: white; background: rgba(255,102,122,.2); }

.badge-soft { border-radius: 999px; padding: .42em .7em; font-size: .7rem; font-weight: 800; }
.badge-ap { color: #c6b9ff; background: rgba(124,92,255,.14); }
.badge-gp { color: #75e8bb; background: rgba(54,201,143,.13); }
.badge-negative { color: #ff9aab; background: rgba(255,91,118,.16); border: 1px solid rgba(255,91,118,.28); }
.badge-qp { color: #8fbdff; background: rgba(75,141,255,.14); }
.badge-admin { color: #ffcd75; background: rgba(255,186,74,.13); }

.alert { border-radius: 13px; border-width: 1px; }
.alert-success { color: #a4f0d0; background: rgba(54,201,143,.12); border-color: rgba(54,201,143,.23); }
.alert-danger { color: #ffafbb; background: rgba(255,102,122,.11); border-color: rgba(255,102,122,.23); }
.alert-warning { color: #ffe0a7; background: rgba(255,186,74,.11); border-color: rgba(255,186,74,.22); }
.alert-info { color: #a9caff; background: rgba(75,141,255,.11); border-color: rgba(75,141,255,.22); }

.modal-content, .dropdown-menu {
    color: var(--app-text);
    background: #151f35;
    border: 1px solid var(--app-border);
    border-radius: 16px;
}
.modal-header, .modal-footer { border-color: var(--app-border); }
.btn-close { filter: invert(1) grayscale(1); }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 470px); padding: 32px; }
.auth-logo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; margin-bottom: 24px; font-size: 1.45rem; background: linear-gradient(135deg, #5865f2, #8b5cf6); box-shadow: 0 15px 40px rgba(88,101,242,.32); }
.discord-button { background: #5865f2; border-color: #5865f2; }
.discord-button:hover { background: #4752c4; border-color: #4752c4; }

.empty-state { text-align: center; padding: 45px 20px; color: var(--app-muted); }
.empty-state i { display: block; font-size: 2rem; margin-bottom: 10px; color: #596681; }
.code-box { background: #09101e; border: 1px solid var(--app-border); border-radius: 12px; padding: 14px; color: #b7c5e6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; white-space: pre-wrap; }
.role-color { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }

.mobile-toggle { display: none; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .mobile-toggle { display: inline-flex; }
    .topbar { padding: 12px 18px; }
    .page-content { padding: 22px 16px 40px; }
}
@media (max-width: 575.98px) {
    .page-title { font-size: 1.35rem; }
    .panel { padding: 15px; }
    .topbar-user-copy { display: none; }
}

/* ==================== DISCORD PROFILE ==================== */
.topbar-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    padding: 4px 7px;
    border-radius: 12px;
    transition: background .18s ease;
}
.topbar-profile-link:hover { color: white; background: rgba(255,255,255,.055); }
.topbar-avatar-wrap { position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.topbar-avatar-decoration {
    position: absolute;
    inset: -6px;
    width: 50px;
    height: 50px;
    object-fit: contain;
    pointer-events: none;
}

.profile-hero-panel { padding: 0; overflow: hidden; }
.profile-banner {
    min-height: 245px;
    background-position: center;
    background-size: cover;
    position: relative;
}
.profile-banner-fallback {
    --profile-accent: #6657e8;
    background:
        radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--profile-accent), white 16%) 0, transparent 30%),
        linear-gradient(135deg, color-mix(in srgb, var(--profile-accent), #0b1020 35%), #101a32 72%);
}
.profile-banner-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,13,26,.06), rgba(8,13,26,.72));
}
.profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 0 30px 30px;
    margin-top: -58px;
    position: relative;
    z-index: 2;
}
.profile-avatar-wrap {
    width: 132px;
    height: 132px;
    position: relative;
    flex: 0 0 132px;
}
.profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 34px;
    object-fit: cover;
    background: #111a2d;
    border: 6px solid #131d32;
    box-shadow: 0 16px 36px rgba(0,0,0,.34);
}
.profile-avatar-decoration {
    position: absolute;
    inset: -17px;
    width: 166px;
    height: 166px;
    object-fit: contain;
    pointer-events: none;
}
.profile-name-block { padding-bottom: 7px; min-width: 0; }
.profile-display-name {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}
.discord-styled-name {
    color: transparent;
    background: linear-gradient(100deg, var(--name-c1, #fff), var(--name-c2, #9f8cff));
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 13px color-mix(in srgb, var(--name-c2, #9f8cff), transparent 68%));
}
.profile-account-name { color: #9aa7c1; margin-top: 5px; font-weight: 650; }
.profile-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.discord-badge,
.discord-guild-tag {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    background: rgba(8,14,27,.68);
    color: #e7edff;
    font-size: .72rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}
.discord-badge i { font-size: .9rem; }
.discord-guild-tag img { width: 18px; height: 18px; object-fit: contain; }
.discord-badge-staff, .discord-badge-partner { color: #9aa7ff; }
.discord-badge-bravery { color: #a58aff; }
.discord-badge-brilliance { color: #ff7fbb; }
.discord-badge-balance { color: #62e0c4; }
.discord-badge-early-supporter { color: #ffcb70; }
.discord-badge-bug-hunter, .discord-badge-bug-hunter-2 { color: #70e5a5; }
.discord-badge-verified-developer, .discord-badge-moderator { color: #85b4ff; }

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.profile-detail-card {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: rgba(8,14,27,.38);
}
.profile-detail-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ae9cff;
    background: rgba(124,92,255,.13);
}
.profile-detail-card span { display: block; color: #8190ac; font-size: .7rem; font-weight: 750; margin-bottom: 3px; }
.profile-detail-card strong { display: block; color: #eef3ff; font-size: .86rem; overflow-wrap: anywhere; }
.profile-detail-card small { display: block; color: #74829e; font-size: .68rem; margin-top: 3px; }
.profile-color-dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.profile-cosmetic-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.discord-nameplate {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 13px;
    color: white;
    background:
        radial-gradient(circle at 85% 0, rgba(255,255,255,.22), transparent 32%),
        linear-gradient(105deg, var(--plate-c1), var(--plate-c2));
    box-shadow: inset 0 1px rgba(255,255,255,.18), 0 12px 30px rgba(0,0,0,.18);
}
.discord-nameplate strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-nameplate span { margin-left: auto; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .78; }
.empty-cosmetic {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 12px;
    color: #8d9ab4;
    background: rgba(8,14,27,.28);
    font-size: .78rem;
}
.empty-cosmetic.warning { color: #d9bd83; border-color: rgba(255,186,74,.2); background: rgba(255,186,74,.055); }
.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.045);
    color: #dce5f8;
    font-size: .76rem;
    font-weight: 720;
}
.profile-meta-list { margin: 0; }
.profile-meta-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--app-border); }
.profile-meta-list > div:last-child { border-bottom: 0; }
.profile-meta-list dt { color: #7f8ca7; font-size: .75rem; font-weight: 700; }
.profile-meta-list dd { margin: 0; color: #e9efff; font-size: .78rem; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.member-identity { display: flex; align-items: center; gap: 12px; min-width: 215px; }
.member-avatar-wrap { width: 42px; height: 42px; flex: 0 0 42px; position: relative; }
.member-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    object-fit: cover;
    background: #101a2e;
    border: 1px solid rgba(255,255,255,.08);
}
.member-avatar-placeholder { color: #72809c; }
.member-avatar-decoration {
    position: absolute;
    inset: -6px;
    width: 54px;
    height: 54px;
    object-fit: contain;
    pointer-events: none;
}
.member-profile-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.member-profile-badge {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    color: #b8c6e5;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    font-size: .72rem;
}
.member-guild-tag {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 7px;
    color: #dfe6ff;
    background: rgba(124,92,255,.11);
    border: 1px solid rgba(124,92,255,.22);
    font-size: .62rem;
    font-weight: 850;
}
.member-guild-tag img { width: 14px; height: 14px; object-fit: contain; }
.min-w-0 { min-width: 0; }

@media (max-width: 767.98px) {
    .profile-banner { min-height: 190px; }
    .profile-identity { align-items: center; flex-direction: column; text-align: center; padding: 0 18px 24px; margin-top: -54px; gap: 12px; }
    .profile-badges { justify-content: center; }
    .profile-detail-grid, .profile-cosmetic-row { grid-template-columns: 1fr; }
}

/* Queue management */
.queue-panel { overflow: visible; }
.queue-own-request {
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: rgba(8, 14, 27, .32);
}
.queue-table { min-width: 760px; }
.queue-position-column { width: 126px; }
.queue-management-column { min-width: 280px; }
.queue-position-cell { display: flex; align-items: center; gap: 10px; }
.queue-position-number {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 10px;
    color: #dfe6ff;
    background: rgba(124, 92, 255, .13);
    border: 1px solid rgba(124, 92, 255, .24);
    font-weight: 850;
}
.queue-position-controls,
.queue-actions { display: flex; align-items: center; gap: 6px; }
.queue-position-controls form,
.queue-actions form { margin: 0; }
.btn-icon { width: 31px; height: 31px; padding: 0; display: inline-grid; place-items: center; }
.btn-success-soft {
    color: #86f4c2;
    border-color: rgba(55, 211, 153, .25);
    background: rgba(55, 211, 153, .10);
}
.btn-success-soft:hover {
    color: #b9ffe0;
    border-color: rgba(55, 211, 153, .42);
    background: rgba(55, 211, 153, .18);
}
.issue-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.issue-summary > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: rgba(8, 14, 27, .38);
}
.issue-summary span { display: block; color: #8190ac; font-size: .7rem; font-weight: 750; margin-bottom: 3px; }
.issue-summary strong { display: block; color: #eef3ff; font-size: .84rem; overflow-wrap: anywhere; }
.issue-summary strong span { display: inline; color: inherit; font-size: inherit; margin: 0; }
@media (max-width: 575.98px) {
    .issue-summary { grid-template-columns: 1fr; }
}

/* Multi-guild v4 */
.guild-switch-card { display:flex; align-items:center; gap:10px; margin:12px 12px 18px; padding:11px; border-radius:13px; color:var(--app-text); background:rgba(255,255,255,.045); border:1px solid var(--app-border); text-decoration:none; }
.guild-switch-card:hover { color:white; background:rgba(255,255,255,.075); }
.guild-switch-card img,.guild-switch-icon { width:36px; height:36px; border-radius:11px; object-fit:cover; display:grid; place-items:center; background:linear-gradient(135deg,#5865f2,#7c5cff); }
.guild-switch-card strong,.guild-switch-card small { display:block; max-width:145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.guild-switch-card small { color:var(--app-muted); font-size:.68rem; margin-top:2px; }
.standalone-shell { min-height:100vh; }
.standalone-topbar { min-height:72px; padding:12px clamp(18px,4vw,54px); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--app-border); background:rgba(9,16,30,.88); backdrop-filter:blur(16px); }
.standalone-content { width:min(1320px,calc(100% - 32px)); margin:0 auto; padding:42px 0 70px; }
.selector-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; }
.guild-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; }
.guild-card { display:block; text-decoration:none; color:var(--app-text); transition:transform .18s ease,border-color .18s ease; }
.guild-card:hover { color:white; transform:translateY(-3px); border-color:rgba(124,92,255,.55); }
.guild-card-head { display:flex; align-items:center; gap:14px; }
.guild-card-head img,.guild-card-head>span { width:52px;height:52px;border-radius:16px;object-fit:cover;display:grid;place-items:center;background:linear-gradient(135deg,#5865f2,#7c5cff);font-size:1.3rem; }
.guild-card h2 { font-size:1rem; margin:0 0 3px; }
.guild-card small { color:var(--app-muted); }
.guild-card-meta { display:flex;align-items:center;justify-content:space-between;margin-top:22px;color:var(--app-muted);font-size:.8rem; }
.guild-card-open { display:flex;align-items:center;justify-content:space-between;margin-top:18px;padding-top:15px;border-top:1px solid var(--app-border);font-weight:750;font-size:.85rem;color:#b9adff; }
@media (max-width:700px){.selector-heading{align-items:stretch;flex-direction:column}.selector-heading .btn{width:100%}.standalone-content{padding-top:26px}}

/* v5.0.1 interface fixes */
.bg-body-tertiary,
.bg-body-secondary,
.bg-light,
.surface-block {
    color: var(--app-text) !important;
    background: rgba(8, 14, 27, .38) !important;
    border: 1px solid var(--app-border);
}
.surface-block { padding: 14px 16px; border-radius: 13px; }
.input-group-text {
    color: var(--app-muted);
    background: #0d1628;
    border-color: rgba(255,255,255,.13);
}
.multi-select { min-height: 150px; }
.multi-select option { padding: 7px 9px; border-radius: 7px; }
.notification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.notification-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: rgba(8,14,27,.32);
    cursor: pointer;
}
.notification-option .form-check-input { flex: 0 0 auto; margin-top: 3px; }
.notification-option strong,
.notification-option small { display: block; }
.notification-option strong { color: var(--app-text); font-size: .83rem; }
.notification-option small { margin-top: 3px; color: var(--app-muted); font-size: .72rem; line-height: 1.35; }
.operations-table { min-width: 1120px; }
.operations-table td:nth-child(3),
.operations-table td:nth-child(4),
.operations-table td:nth-child(5) { min-width: 155px; }
.discord-options-loading { opacity: .65; pointer-events: none; }
@media (max-width: 767.98px) {
    .notification-grid { grid-template-columns: 1fr; }
}

/* v5.0.2 report channel picker */
.channel-picker {
    position: relative;
}
.channel-picker-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding-right: 12px;
    text-align: left;
    cursor: pointer;
}
.channel-picker-toggle::after {
    display: none;
}
.channel-picker-count {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    color: #c8d4ee;
    background: rgba(124, 92, 255, .16);
    border: 1px solid rgba(158, 143, 255, .25);
    font-size: .69rem;
    font-weight: 800;
}
.channel-picker.open .channel-picker-toggle {
    border-color: #8b73ff;
    box-shadow: 0 0 0 .2rem rgba(124,92,255,.18);
}
.channel-picker-menu {
    position: absolute;
    z-index: 1085;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 330px;
    padding: 10px;
    color: var(--app-text);
    background: #111b30;
    border: 1px solid rgba(158,143,255,.28);
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(0,0,0,.42);
}
.channel-picker-menu[hidden] {
    display: none !important;
}
.channel-picker-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px 9px;
    color: #b8c5de;
    font-size: .74rem;
    font-weight: 800;
}
.channel-picker-menu-head .btn-link {
    padding: 0;
    color: #a99bff;
    text-decoration: none;
    font-size: .72rem;
}
.channel-picker-options {
    max-height: 290px;
    overflow-y: auto;
    padding-right: 3px;
}
.channel-picker-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 54px;
    padding: 9px 10px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.channel-picker-option:hover {
    background: rgba(255,255,255,.065);
    border-color: rgba(255,255,255,.09);
}
.channel-picker-option.selected {
    background: rgba(124,92,255,.13);
    border-color: rgba(158,143,255,.34);
}
.channel-picker-option:has(input:disabled:not(:checked)) {
    opacity: .43;
    cursor: not-allowed;
}
.channel-picker-option .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: inherit;
}
.channel-picker-option-copy {
    min-width: 0;
}
.channel-picker-option-copy strong,
.channel-picker-option-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.channel-picker-option-copy strong {
    color: #eef3ff;
    font-size: .82rem;
}
.channel-picker-option-copy small {
    margin-top: 2px;
    color: #7f8eaa;
    font-size: .68rem;
}
.channel-picker-check {
    color: #7ce5b8;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .15s ease, transform .15s ease;
}
.channel-picker-option.selected .channel-picker-check {
    opacity: 1;
    transform: scale(1);
}
.channel-picker-limit {
    margin-top: 8px;
    padding: 8px 10px;
    color: #ffe0a7;
    background: rgba(255,186,74,.10);
    border: 1px solid rgba(255,186,74,.18);
    border-radius: 9px;
    font-size: .7rem;
}
.channel-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
    margin-top: 8px;
}
.channel-picker-selected:empty {
    display: none;
}
.channel-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 5px 8px;
    color: #dfe7fb;
    background: rgba(54,201,143,.10);
    border: 1px solid rgba(54,201,143,.20);
    border-radius: 999px;
    font-size: .69rem;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.channel-picker-chip i {
    color: #6be1b1;
}
.channel-picker-empty {
    padding: 22px 12px;
    text-align: center;
    color: var(--app-muted);
    font-size: .77rem;
}
@media (max-width: 575.98px) {
    .channel-picker-menu {
        position: fixed;
        z-index: 1100;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        min-width: 0;
        max-height: min(72vh, 520px);
    }
    .channel-picker-options {
        max-height: calc(min(72vh, 520px) - 78px);
    }
}

/* v5.0.3: dynamic member search and sorting */
.members-toolbar {
    gap: 16px;
}
.members-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1 1 520px;
}
.members-search-wrap {
    min-width: 240px;
    max-width: 360px;
}
.members-search-wrap .input-group-text {
    color: var(--app-muted);
    background: #0d1629;
    border-color: var(--app-border);
}
.members-sort-select {
    width: 170px;
    flex: 0 0 170px;
}
.members-sort-direction {
    width: 42px;
    min-width: 42px;
}
.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
}
.table-sort-button:hover,
.table-sort-button.active {
    color: #91a8ff;
}
.table-sort-button i {
    font-size: .74rem;
    opacity: .65;
}
.operations-search-status {
    min-height: 1.25rem;
}
@media (max-width: 767.98px) {
    .members-controls {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }
    .members-search-wrap {
        max-width: none;
        flex: 1 1 100%;
    }
    .members-sort-select {
        flex: 1 1 auto;
        width: auto;
    }
}
