.ft-admin-dm-hidden {
    display: none !important;
}

.ft-admin-mode-toggle {
    position: fixed !important;
    top: calc(72px + env(safe-area-inset-top)) !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 3920;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #1e293b 0%, #334155 52%, #0f766e 100%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.ft-admin-mode-toggle i {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 10px;
}

.ft-admin-mode-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.34);
}

.ft-admin-mode-toggle.is-on {
    background: linear-gradient(135deg, #065f46 0%, #0f766e 44%, #0891b2 100%);
    border-color: rgba(153, 246, 228, 0.4);
}

.ft-admin-mode-toggle.is-on::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #86efac;
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.22);
    animation: ftAdminModeBlink 1.2s ease-in-out infinite;
}

@keyframes ftAdminModeBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.42;
        transform: scale(0.82);
    }
}

#pmFtGdmThreads {
    position: relative;
}

.ft-admin-dm-layer {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.97) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-right: 1px solid #dbe6f1;
    padding: 10px;
    overflow: auto;
}

.ft-admin-dm-layer__head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: -10px -10px 10px;
    padding: 10px;
    border-bottom: 1px solid #dbe6f1;
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(6px);
}

.ft-admin-dm-layer__head strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.4;
}

.ft-admin-dm-layer__head small {
    color: #64748b;
    font-size: 11px;
}

.ft-admin-dm-layer__empty {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.7);
}

.ft-admin-dm-notice {
    border: 1px solid #dbe6f1;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
    margin-bottom: 10px;
}

.ft-admin-dm-notice__open {
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    min-height: 34px;
    padding: 7px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ft-admin-dm-notice__open:hover {
    background: #dbeafe;
}

.ft-admin-dm-notice__form {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.ft-admin-dm-notice__form textarea {
    width: 100%;
    resize: vertical;
    min-height: 72px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    padding: 8px 9px;
    font-size: 12px;
    line-height: 1.4;
    color: #0f172a;
}

.ft-admin-dm-notice__send {
    width: 100%;
    border: 1px solid #86efac;
    border-radius: 10px;
    min-height: 34px;
    padding: 6px 10px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ft-admin-dm-notice__send:hover {
    background: #bbf7d0;
}

.ft-admin-dm-notice__list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.ft-admin-dm-notice__item {
    border: 1px solid #dbe6f1;
    border-radius: 9px;
    background: #f8fafc;
    padding: 7px 8px;
    text-align: left;
    display: grid;
    gap: 4px;
}

.ft-admin-dm-notice__item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.ft-admin-dm-notice__item-text {
    font-size: 12px;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ft-admin-dm-notice__item-time {
    font-size: 11px;
    color: #64748b;
}

.ft-admin-dm-notice__empty {
    margin-top: 8px;
    border: 1px dashed #dbe6f1;
    border-radius: 9px;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
}

.ft-admin-dm-user {
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ft-admin-dm-user:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.ft-admin-dm-user__line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ft-admin-dm-user__name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ft-admin-dm-user__name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.ft-admin-dm-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.18);
}

.ft-admin-dm-online-dot.on {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.ft-admin-dm-online-dot.off {
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.ft-admin-dm-user__id {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ft-admin-dm-user__meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.ft-admin-dm-push {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    flex: 0 0 auto;
}

.ft-admin-dm-push.on {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.ft-admin-dm-push.off {
    color: #475569;
    background: #f1f5f9;
    border-color: #dbe6f1;
}

.ft-admin-dm-layer--loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
    .ft-admin-mode-toggle {
        top: calc(62px + env(safe-area-inset-top));
        min-height: 40px;
        padding: 7px 12px;
        font-size: 11px;
    }
}
