/* CHANGE: admin shell aligned with /profil (tokens, sidebar, toasts). */
:root {
    --a-bg: #0b0c0e;
    --a-surface: #14161a;
    --a-surface-2: #1c1f26;
    --a-border: #2a3140;
    --a-text: #e8edf2;
    --a-muted: #8b95a5;
    --a-accent: #e8a317;
    --a-accent-hover: #f0b83a;
    --a-accent-line: rgba(232, 163, 23, 0.45);
    --a-card-top: #181b22;
    --a-card-bot: #12151a;
    --a-atmos-a: rgba(232, 163, 23, 0.12);
    --a-atmos-b: #101218;
    --a-font: "Figtree", system-ui, sans-serif;
    --a-display: "Syne", system-ui, sans-serif;
    --a-mono: "IBM Plex Mono", ui-monospace, monospace;
    --a-radius: 12px;
    --a-max: 1280px;
}

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

body.admin-body {
    font-family: var(--a-font);
    background: var(--a-bg) !important;
    color: var(--a-text) !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: var(--a-font);
    background: var(--a-bg);
    color: var(--a-text);
    margin: 0;
    padding: 0;
}

main {
    max-width: none;
    margin: 0;
}

.admin-atmosphere {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(900px 480px at 12% -8%, var(--a-atmos-a), transparent 55%),
        linear-gradient(180deg, var(--a-atmos-b) 0%, var(--a-bg) 50%, var(--a-bg) 100%);
}

.admin-frame {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: var(--a-max);
    margin: 0 auto;
    padding: 1rem 1.35rem;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--a-text);
    text-decoration: none;
}

.admin-brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--a-surface-2);
    border: 1px solid var(--a-accent-line);
    color: var(--a-accent);
}

.admin-brand-mark svg { display: block; width: 18px; height: 18px; }

.admin-brand-text {
    font-family: var(--a-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.admin-brand-text em {
    font-style: normal;
    color: var(--a-muted);
    font-weight: 600;
    font-size: .92rem;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.admin-body-row {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--a-max);
    margin: 0 auto;
    padding: 0 1.35rem 2rem;
}

.admin-body-app .admin-body-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.admin-body-auth .admin-body-row {
    max-width: 480px;
}

.admin-body-page .admin-body-row {
    max-width: 920px;
}

.admin-sidebar {
    position: sticky;
    top: 1rem;
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    padding: 1rem .85rem;
}

.admin-sidebar-label {
    margin: 0 0 .65rem .55rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--a-muted);
}

.admin-side-nav {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.admin-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .7rem;
    border-radius: 8px;
    color: var(--a-muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.admin-side-link:hover {
    color: var(--a-text);
    background: var(--a-surface-2);
}

.admin-side-link.active {
    color: #1a1408;
    background: linear-gradient(180deg, var(--a-accent-hover), var(--a-accent));
}

.admin-side-link-muted {
    margin-top: .5rem;
    font-size: .82rem;
}

.admin-content { min-width: 0; }

.admin-page-header {
    margin-bottom: 1.15rem;
}

.admin-page-header h1 {
    font-family: var(--a-display);
    font-weight: 700;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    letter-spacing: -.02em;
    margin: 0 0 .35rem;
}

.admin-banner {
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--a-border);
    background: var(--a-surface);
}

.admin-banner-warn {
    border-color: rgba(240, 162, 58, 0.45);
    background: rgba(240, 162, 58, 0.1);
    color: #f0c78a;
}

.admin-banner a { color: var(--a-accent-hover); }

.admin-footer {
    margin-top: auto;
    border-top: 1px solid var(--a-border);
    padding: 1rem 1.35rem;
}

.admin-footer-copy {
    margin: 0 auto;
    max-width: var(--a-max);
    color: var(--a-muted);
    font-size: .8rem;
    opacity: .75;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--a-muted);
    border: 1px solid var(--a-border);
    border-radius: 999px;
    padding: .4rem .85rem;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn-ghost:hover {
    color: var(--a-text);
    border-color: var(--a-accent-line);
}

h1, h2 {
    margin-top: 0;
    font-family: var(--a-display);
}

.card {
    background: linear-gradient(180deg, var(--a-card-top), var(--a-card-bot));
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    padding: 1.05rem 1.15rem;
    margin-bottom: 1rem;
    color: var(--a-text);
}

.hint { color: var(--a-muted); font-size: .92rem; line-height: 1.5; }

.stat-card {
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    transition: border-color .2s ease, transform .15s ease;
}

.stat-card:hover {
    border-color: var(--a-accent-line);
    transform: translateY(-1px);
}

/* Legacy horizontal tabs kept for keys subtabs styling */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.admin-tab-btn {
    background: var(--a-surface-2);
    color: var(--a-text);
    border: 1px solid var(--a-border);
    border-radius: 8px;
    padding: .5rem .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.admin-tab-btn.active {
    background: linear-gradient(180deg, var(--a-accent-hover), var(--a-accent));
    color: #1a1408;
    border-color: transparent;
}

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

.admin-tab-panel.active {
    display: block;
}

.admin-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.admin-subtab-btn {
    background: var(--a-surface-2);
    color: var(--a-text);
    border: 1px solid var(--a-border);
    border-radius: 8px;
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
}

.admin-subtab-btn.active {
    background: linear-gradient(180deg, var(--a-accent-hover), var(--a-accent));
    color: #1a1408;
    border-color: transparent;
}

.keys-subpanel {
    display: none;
}

.keys-subpanel.active {
    display: block;
}

.unbind-alert-cta {
    margin-left: auto;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    color: #1a1208;
    background: linear-gradient(135deg, #ffb347 0%, #ff8c1a 45%, #e07010 100%);
    box-shadow: 0 4px 14px rgba(224, 112, 16, .45);
    animation: unbindBtnPulse 1.6s ease-in-out infinite;
}

/* Toasts (MyRONShop / profil) */
.action-toasts {
    position: fixed;
    top: 76px;
    right: 18px;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 28px));
    pointer-events: none;
}
.action-toast {
    --toast-accent: #3dd68c;
    --toast-accent-dim: rgba(61, 214, 140, 0.28);
    pointer-events: auto;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 44px 1fr 28px;
    gap: 10px 12px;
    align-items: start;
    padding: 14px 12px 16px 12px;
    border-radius: 16px;
    color: #f4f7fb;
    background: rgba(16, 22, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: action-toast-in 0.32s cubic-bezier(0.22, 1, 0.32, 1) both;
}
.action-toast.is-err { --toast-accent: #ff5d6c; --toast-accent-dim: rgba(255, 93, 108, 0.32); }
.action-toast.is-warn { --toast-accent: #f0a23a; --toast-accent-dim: rgba(240, 162, 58, 0.32); }
.action-toast-glow {
    position: absolute; inset: -40% auto -40% -20%; width: 90px;
    background: radial-gradient(circle, var(--toast-accent-dim), transparent 70%);
    pointer-events: none; z-index: 0;
}
.action-toast::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: linear-gradient(180deg, #fff, var(--toast-accent) 35%, var(--toast-accent));
    box-shadow: 0 0 10px var(--toast-accent); z-index: 1;
}
.action-toast-orb {
    position: relative; z-index: 3; width: 40px; height: 40px; margin-top: 1px;
    border-radius: 50%; display: grid; place-items: center;
    font-size: 1.05rem; font-weight: 800; color: #fff;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
        radial-gradient(circle at 50% 50%, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 35%, #0b1016));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 14px var(--toast-accent-dim);
}
.action-toast-copy { position: relative; z-index: 3; min-width: 0; padding-top: 2px; }
.action-toast-title {
    display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--toast-accent); margin-bottom: 4px;
}
.action-toast-text { margin: 0; font-size: 0.94rem; line-height: 1.35; font-weight: 650; color: #f3f6fa; }
.action-toast-hint { margin: 6px 0 0; font-size: 0.8rem; line-height: 1.4; color: rgba(210, 220, 232, 0.72); }
.action-toast-close {
    position: relative; z-index: 3; appearance: none; width: 28px; height: 28px;
    margin: -2px -2px 0 0; border: 0; border-radius: 8px; background: transparent;
    color: rgba(255, 255, 255, 0.55); font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.action-toast-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.action-toast-rail {
    grid-column: 1 / -1; position: relative; z-index: 3; display: block; height: 3px;
    margin: 2px 2px 0; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.action-toast-rail-fill {
    display: block; height: 100%; width: 100%; transform-origin: left center; border-radius: inherit;
    background: linear-gradient(90deg, var(--toast-accent), #fff);
    animation: action-toast-rail var(--toast-life, 5600ms) linear forwards;
}
.action-toast.is-out { animation: action-toast-out 0.38s cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes action-toast-in {
    from { opacity: 0; transform: translate3d(24px, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes action-toast-out {
    to { opacity: 0; transform: translate3d(28px, 0, 0); }
}
@keyframes action-toast-rail {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 900px) {
    .admin-body-app .admin-body-row {
        grid-template-columns: 1fr;
    }
    .admin-sidebar { position: static; }
    .admin-side-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-side-link { width: auto; }
}

@media (max-width: 640px) {
    .action-toasts { top: auto; bottom: 16px; right: 12px; left: 12px; width: auto; }
}

/* —— legacy component styles below —— */

.releases-table td {
    vertical-align: top;
}

.release-target-line {
    font-size: 13px;
}

.target-link {
    background: none;
    border: none;
    color: #3a8de6;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.target-link.muted {
    color: #8a96a3;
}

.target-link:hover {
    color: #6eb3ff;
}

.release-actions-col {
    min-width: 220px;
}

.release-group-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.release-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 2px 6px;
    background: #222a35;
    border-radius: 4px;
    border: 1px solid #2a3340;
}

.release-groups-hint {
    font-size: 12px;
    margin-bottom: 6px;
}

.badge-remove-form {
    margin: 0;
    display: inline-flex;
}

.badge-remove {
    background: transparent;
    border: none;
    color: #ff8a8a;
    cursor: pointer;
    padding: 0 2px;
    font-size: 14px;
    line-height: 1;
}

.group-assign-form {
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.group-assign-form select {
    max-width: 150px;
    font-size: 12px;
    padding: 4px 6px;
    min-width: 100px;
}

.group-assign-form button {
    font-size: 12px;
    padding: 4px 8px;
}

.group-row-actions {
    flex-wrap: wrap;
}

.group-notes {
    font-size: 12px;
    margin-top: 4px;
}

.group-edit-modal label {
    display: block;
    margin-top: 10px;
}

.group-edit-modal input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.release-row-actions {
    flex-wrap: wrap;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.admin-modal-backdrop[hidden] {
    display: none;
}

.admin-modal {
    background: #171d26;
    border: 1px solid #2a3340;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    padding: 16px;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-modal-header h4 {
    margin: 0;
    font-size: 1rem;
}

.admin-modal-close {
    min-width: 32px;
    padding: 4px 10px;
    line-height: 1;
}

.admin-modal-body {
    font-size: 14px;
}

.target-modal-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.7;
}

.target-modal-list code {
    color: #3a8de6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    margin-bottom: 0;
}

.stat-label {
    display: block;
    color: #8a96a3;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    line-height: 1;
}

/* CHANGE: collapsible admin blocks (tester groups create form, etc.). */
.collapsible {
    margin-bottom: 8px;
}

.collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 8px;
    padding: 6px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #2a3340;
    border-radius: 0;
    color: #e8edf2;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.collapsible-toggle:hover {
    color: #fff;
}

.collapsible-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #1e2632 0%, #171d26 100%);
    border: 1px solid #354152;
    border-radius: 8px;
    color: #9aa8b8;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.collapsible-toggle:hover .collapsible-chevron {
    background: linear-gradient(180deg, #263040 0%, #1e2632 100%);
    border-color: #4a7ec4;
    color: #6eb3ff;
    box-shadow: 0 2px 6px rgba(47, 125, 209, 0.2);
}

.collapsible-chevron .chevron-icon {
    width: 18px;
    height: 18px;
}

/* Развернуто: стрелка вверх (свернуть). Свернуто: стрелка вниз (развернуть). */
.collapsible .chevron-expand {
    display: none;
}

.collapsible .chevron-collapse {
    display: block;
}

.collapsible.is-collapsed .chevron-expand {
    display: block;
}

.collapsible.is-collapsed .chevron-collapse {
    display: none;
}

.collapsible.is-collapsed .collapsible-body {
    display: none;
}

.collapsible-body {
    padding-top: 8px;
}

.collapsible-body h3 {
    margin-top: 20px;
}

.license {
    border-top: 1px solid #2a3340;
    padding-top: 16px;
    margin-top: 16px;
}

.key {
    font-size: 1.1rem;
    color: #3a8de6;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.badge.active { background: #1e3a2f; color: #55c83c; }
.badge.revoked { background: #3a1e1e; color: #ff8a8a; }
.badge.severity-medium { background: #2a3340; color: #b8c4d4; margin-left: 0; }
.badge.severity-required { background: #3a2a1e; color: #ffb347; margin-left: 0; }

.meta { color: #8a96a3; font-size: 14px; }

form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

form.inline { display: inline-flex; }

label { font-size: 13px; color: #8a96a3; }

input {
    background: #11161d;
    border: 1px solid #2a3340;
    color: #e8edf2;
    padding: 8px 10px;
    border-radius: 4px;
}

/* CHANGE: password show/hide toggle on admin login. */
.password-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 260px;
    max-width: 100%;
}

.password-field input {
    width: 100%;
    padding-right: 42px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #8a96a3;
    cursor: pointer;
}

.password-toggle:hover {
    color: #e8edf2;
    background: transparent;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.login-form {
    flex-direction: column;
    align-items: flex-start;
}

select,
textarea {
    background: #11161d;
    border: 1px solid #2a3340;
    color: #e8edf2;
    padding: 8px 10px;
    border-radius: 4px;
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    font: inherit;
    line-height: 1.5;
}

button {
    background: linear-gradient(180deg, var(--a-accent-hover), var(--a-accent));
    color: #1a1408;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
}

button.secondary {
    background: var(--a-surface-2);
    color: var(--a-text);
    border: 1px solid var(--a-border);
    font-weight: 600;
}
button.danger { background: #b83a32; color: #fff; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

th, td {
    border: 1px solid #2a3340;
    padding: 8px;
    text-align: left;
}

th { background: #1e2631; }

/* CHANGE: activations table — device hash gets more space; other columns stay compact. */
.activations-table .col-device { width: 42%; }
.activations-table .col-version { width: 10%; }
.activations-table .col-activated { width: 16%; }
.activations-table .col-lastseen { width: 16%; }
.activations-table .col-action { width: 16%; }

.activations-table .device-hash code {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    white-space: normal;
    font-size: 12px;
}

.activations-table .col-version,
.activations-table td:nth-child(2),
.activations-table th:nth-child(2) {
    white-space: nowrap;
}

.activations-table td:nth-child(3),
.activations-table td:nth-child(4),
.activations-table th:nth-child(3),
.activations-table th:nth-child(4) {
    white-space: nowrap;
    font-size: 12px;
}

.error { color: #ff8a8a; }

.success { color: #55c83c; }

.hint {
    color: #8a96a3;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: end;
}

.filters-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stack-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.dynamic-key-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.dynamic-key-row input {
    width: 100%;
    box-sizing: border-box;
}

.button-link {
    display: inline-block;
    background: #2f7dd1;
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
}

.import-form input[type="file"] {
    max-width: 280px;
}

.toolbar { margin-bottom: 16px; }

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8edf2;
}

.check-row input {
    width: auto;
}

/* CHANGE: upload progress for Admin → Updates create-release multipart. */
.upload-progress {
    width: 100%;
    margin: 12px 0 4px;
    padding: 12px;
    border: 1px solid #2a3340;
    border-radius: 6px;
    background: #11161d;
    box-sizing: border-box;
}

.upload-progress-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: #e8edf2;
}

.upload-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #2a3340;
    overflow: hidden;
}

.upload-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2f7dd1, #55c83c);
    transition: width 0.15s ease-out;
}

.upload-progress-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #8a96a3;
}

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

/* CHANGE: persistent unbind-request alert until admin resolves all pending. */
.unbind-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #c47a22;
    background: linear-gradient(135deg, #3a2818 0%, #2a1e14 100%);
    box-shadow: 0 0 0 1px rgba(255, 160, 40, 0.15), 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    cursor: pointer;
}

.unbind-alert-pulse {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ff9f2e;
    animation: unbindPulse 1.4s ease-in-out infinite;
}

@keyframes unbindPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #ff9f2e; }
    50% { opacity: 0.35; box-shadow: 0 0 2px #ff9f2e; }
}

.unbind-alert-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    color: #ffd7a8;
    font-size: 14px;
    z-index: 1;
}

.unbind-alert-body strong {
    color: #ffb347;
}

button.unbind-alert-btn,
.unbind-alert-btn,
a.unbind-alert-cta {
    margin-left: auto;
    display: inline-block;
    color: #1a1208 !important;
    border: none !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    background: linear-gradient(135deg, #ffb347 0%, #ff8c1a 45%, #e07010 100%) !important;
    box-shadow: 0 0 0 0 rgba(255, 159, 46, 0.65), 0 4px 14px rgba(224, 112, 16, 0.35);
    animation: unbindBtnPulse 1.6s ease-in-out infinite;
}

button.unbind-alert-btn:hover,
.unbind-alert-btn:hover,
a.unbind-alert-cta:hover {
    background: linear-gradient(135deg, #ffc266 0%, #ff9a2e 50%, #f08018 100%) !important;
    filter: brightness(1.05);
    color: #1a1208 !important;
}

@keyframes unbindBtnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 159, 46, 0.55), 0 4px 14px rgba(224, 112, 16, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 159, 46, 0), 0 6px 18px rgba(255, 160, 40, 0.5);
        transform: scale(1.03);
    }
}

.admin-tab-btn.has-alert {
    position: relative;
    box-shadow: 0 0 0 1px rgba(255, 159, 46, 0.55);
}

.tab-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e07020;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    animation: unbindBadgeBlink 1.6s ease-in-out infinite;
}

@keyframes unbindBadgeBlink {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.unbind-request-card {
    margin-bottom: 12px;
}

.unbind-admin-reply {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.unbind-admin-reply textarea {
    width: 100%;
    max-width: 640px;
    background: #0f1318;
    color: #e8edf2;
    border: 1px solid #2a3340;
    border-radius: 6px;
    padding: 8px 10px;
    resize: vertical;
}
