        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --bg: #0a0e17;
            --surface: #111827;
            --surface2: #1a2233;
            --border: #1f2d42;
            --border2: #2a3a52;
            --accent: #f0c040;
            --accent-dim: rgba(240,192,64,0.12);
            --text: #e2e8f0;
            --text-muted: #64748b;
            --text-soft: #94a3b8;
            --green: #22c55e;
            --red: #ef4444;
            --blue: #3b82f6;
            --orange: #f59e0b;
            --sidebar-w: 220px;
        }

        body {
            background: var(--bg);
            color: var(--text);
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            min-height: 100vh;
            font-size: 14px;
            line-height: 1.5;
        }

        /* ── Login ─────────────────────────────────────────── */
        #login-section {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
        }
        .login-card {
            background: var(--surface);
            border: 1px solid var(--border2);
            border-radius: 16px;
            padding: 36px 32px;
            width: 100%;
            max-width: 380px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }
        .login-logo {
            text-align: center;
            margin-bottom: 28px;
        }
        .login-logo h1 {
            color: var(--accent);
            font-size: 22px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }
        .login-logo p {
            color: var(--text-muted);
            font-size: 13px;
            margin-top: 4px;
        }
        .form-group { margin-bottom: 14px; }
        .form-group label {
            display: block;
            color: var(--text-soft);
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 6px;
        }
        input, select, textarea {
            width: 100%;
            background: var(--bg);
            border: 1px solid var(--border2);
            border-radius: 8px;
            color: var(--text);
            padding: 10px 14px;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
            font-family: inherit;
        }
        input:focus, select:focus, textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(240,192,64,0.1);
        }
        select { cursor: pointer; }
        textarea { resize: vertical; }

        button {
            background: var(--accent);
            color: #0a0e17;
            border: none;
            border-radius: 8px;
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.15s, transform 0.1s;
            font-family: inherit;
        }
        button:hover { opacity: 0.88; }
        button:active { transform: scale(0.98); }
        button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

        .btn-login {
            width: 100%;
            padding: 12px;
            font-size: 15px;
            margin-top: 4px;
            border-radius: 8px;
        }
        .btn-google {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: #fff;
            color: #3c4043;
            border: 1px solid #dadce0;
            font-weight: 600;
        }
        .btn-google:hover { background: #f1f3f4; }
        #error-msg {
            color: var(--red);
            font-size: 13px;
            margin-top: 10px;
            min-height: 18px;
            text-align: center;
        }

        /* ── App Shell ─────────────────────────────────────── */
        #dashboard { display: none; min-height: 100vh; }

        .app-layout {
            display: flex;
            min-height: 100vh;
        }

        /* ── Sidebar ───────────────────────────────────────── */
        .sidebar {
            width: var(--sidebar-w);
            background: var(--surface);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            position: fixed;
            top: 0; left: 0;
            height: 100vh;
            z-index: 100;
            transition: transform 0.25s ease;
        }
        .sidebar-header {
            padding: 20px 18px 16px;
            border-bottom: 1px solid var(--border);
        }
        .sidebar-brand {
            color: var(--accent);
            font-size: 16px;
            font-weight: 800;
            letter-spacing: -0.3px;
        }
        .sidebar-subtitle {
            color: var(--text-muted);
            font-size: 11px;
            margin-top: 2px;
        }
        .sidebar-nav {
            flex: 1;
            padding: 12px 10px;
            overflow-y: auto;
        }
        .nav-section-label {
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 10px 8px 6px;
        }
        .nav-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-radius: 8px;
            color: var(--text-soft);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
            background: none;
            border: none;
            width: 100%;
            text-align: left;
            margin-bottom: 2px;
        }
        .nav-item:hover { background: var(--surface2); color: var(--text); opacity: 1; transform: none; }
        .nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
        .nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
        .sidebar-footer {
            padding: 14px 10px;
            border-top: 1px solid var(--border);
        }
        .user-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--surface2);
            border-radius: 8px;
            margin-bottom: 8px;
        }
        .user-avatar {
            width: 32px; height: 32px;
            background: var(--accent-dim);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            color: var(--accent);
            font-size: 14px;
            flex-shrink: 0;
        }
        .user-email {
            font-size: 11px;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .btn-logout {
            background: rgba(239,68,68,0.1);
            color: var(--red);
            border: 1px solid rgba(239,68,68,0.2);
            border-radius: 8px;
            width: 100%;
            padding: 8px;
            font-size: 13px;
            font-weight: 600;
        }
        .btn-logout:hover { background: rgba(239,68,68,0.18); opacity: 1; }

        /* ── Main Content ──────────────────────────────────── */
        .main-content {
            margin-left: var(--sidebar-w);
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        .topbar {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            padding: 14px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            position: sticky;
            top: 0;
            z-index: 50;
        }
        .topbar-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--text);
        }
        .topbar-right { display: flex; align-items: center; gap: 10px; }
        .hamburger {
            display: none;
            background: none;
            border: none;
            color: var(--text-soft);
            font-size: 20px;
            padding: 4px;
            cursor: pointer;
        }
        .hamburger:hover { color: var(--text); opacity: 1; transform: none; }

        .page-body { padding: 24px; flex: 1; }

        /* ── Seções de página ──────────────────────────────── */
        .page-section { display: none; }
        .page-section.active { display: block; }

        /* ── Cards de resumo ───────────────────────────────── */
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            margin-bottom: 20px;
        }
        .card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 16px;
            transition: border-color 0.2s;
        }
        .card:hover { border-color: var(--border2); }
        .card-label {
            color: var(--text-muted);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
            font-weight: 600;
        }
        .card-value { font-size: 28px; font-weight: 800; color: var(--accent); }
        .card-value.red { color: var(--red); }
        .card-value.green { color: var(--green); }
        .card-value.blue { color: var(--blue); }

        /* ── Filtros ───────────────────────────────────────── */
        .filters {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px 16px;
            margin-bottom: 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }
        .filters-label { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-right: 4px; }
        .btn-outline {
            background: var(--surface2);
            color: var(--text-soft);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 5px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .btn-outline:hover { border-color: var(--border2); color: var(--text); opacity: 1; transform: none; }
        .btn-outline.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

        /* ── Seção / painel ────────────────────────────────── */
        .section {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 16px;
        }
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }
        .section-title { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
        .result-count { color: var(--accent); font-size: 13px; font-weight: 700; }

        /* ── Tabela ────────────────────────────────────────── */
        .table-wrap { overflow-x: auto; }
        table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 400px; }
        th {
            text-align: left;
            color: var(--text-muted);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 8px 12px;
            border-bottom: 1px solid var(--border);
            white-space: nowrap;
        }
        td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
        tr:last-child td { border-bottom: none; }
        tr:hover td { background: rgba(255,255,255,0.02); }
        .uid-cell { font-size: 11px; color: var(--text-muted); font-family: monospace; word-break: break-all; max-width: 160px; }

        /* ── Tags ──────────────────────────────────────────── */
        .tag {
            display: inline-block;
            border-radius: 4px;
            padding: 2px 8px;
            font-size: 11px;
            font-weight: 600;
        }
        .tag-red    { background: rgba(239,68,68,0.12); color: var(--red); }
        .tag-green  { background: rgba(34,197,94,0.12); color: var(--green); }
        .tag-blue   { background: rgba(59,130,246,0.12); color: var(--blue); }
        .tag-yellow { background: rgba(240,192,64,0.12); color: var(--accent); }
        .tag-orange { background: rgba(245,158,11,0.12); color: var(--orange); }

        .btn-fix {
            background: rgba(34,197,94,0.15);
            color: var(--green);
            border: 1px solid rgba(34,197,94,0.25);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.15s;
            white-space: nowrap;
        }
        .btn-fix:hover { opacity: 0.8; transform: none; }
        .btn-fix:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

        /* ── Loading / Progress ────────────────────────────── */
        .loading { display: flex; align-items: center; gap: 12px; color: var(--text-soft); font-size: 13px; padding: 20px 0; }
        .spinner {
            width: 18px; height: 18px;
            border: 2px solid var(--border2);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            flex-shrink: 0;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .progress-bar { width: 180px; height: 3px; background: var(--border2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
        .progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
        .empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 32px; }

        .admin-tab-content { min-height: 300px; }

        /* ── Chat — switcher interno (Conversas privadas / Monitor) ── */
        .admin-chat-switcher {
            display: flex;
            gap: 2px;
            margin-bottom: 16px;
            background: var(--surface2);
            border-radius: 10px;
            padding: 4px;
            flex-wrap: wrap;
        }
        .admin-chat-mode-btn {
            flex: 1;
            min-width: 140px;
            padding: 9px 12px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            border-radius: 7px;
            transition: all 0.2s;
            white-space: nowrap;
            text-align: center;
        }
        .admin-chat-mode-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); opacity: 1; transform: none; }
        .admin-chat-mode-btn.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

        /* Loading interno admin */
        .admin-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: var(--text-muted); font-size: 13px; }
        .admin-loading .spinner { width: 28px; height: 28px; border-width: 3px; }

        /* ── Withdrawals ───────────────────────────────────── */
        .admin-withdrawals-list { display: flex; flex-direction: column; gap: 10px; }
        .admin-withdrawal-item {
            background: var(--surface2);
            border: 1px solid var(--border2);
            border-radius: 10px;
            padding: 14px 16px;
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
        }
        .admin-withdrawal-item:hover { border-color: rgba(240,192,64,0.4); background: rgba(240,192,64,0.04); }
        .admin-withdrawal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
        .admin-withdrawal-user { font-size: 15px; font-weight: 700; color: var(--accent); }
        .admin-withdrawal-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
        .admin-withdrawal-status.pending { background: rgba(245,158,11,0.15); color: var(--orange); }
        .admin-withdrawal-status.completed { background: rgba(34,197,94,0.15); color: var(--green); }
        .admin-withdrawal-status.rejected { background: rgba(239,68,68,0.15); color: var(--red); }
        .admin-withdrawal-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 12px; }
        .admin-withdrawal-info-item { display: flex; flex-direction: column; gap: 2px; }
        .admin-withdrawal-info-label { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
        .admin-withdrawal-info-value { color: var(--text); font-weight: 600; }

        /* ── Chat ──────────────────────────────────────────── */
        .admin-chat-list { display: flex; flex-direction: column; gap: 8px; }
        .admin-chat-user-item {
            background: var(--surface2);
            border: 1px solid var(--border2);
            border-radius: 10px;
            padding: 12px 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .admin-chat-user-item:hover { border-color: rgba(240,192,64,0.4); background: rgba(240,192,64,0.04); }
        .admin-chat-user-info { display: flex; flex-direction: column; gap: 3px; }
        .admin-chat-user-name { font-weight: 700; color: var(--accent); font-size: 14px; }
        .admin-chat-user-email { font-size: 11px; color: var(--text-muted); }
        .admin-chat-conversation { display: flex; flex-direction: column; height: 440px; }
        .admin-chat-conversation-header {
            padding: 12px 14px;
            background: var(--accent-dim);
            border: 1px solid rgba(240,192,64,0.2);
            border-radius: 10px;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .admin-chat-conversation-user { font-weight: 700; color: var(--accent); font-size: 14px; }
        .admin-chat-back-btn {
            padding: 6px 12px;
            background: rgba(255,255,255,0.06);
            border: 1px solid var(--border2);
            border-radius: 6px;
            color: var(--text-soft);
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.15s;
        }
        .admin-chat-back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); opacity: 1; transform: none; }
        .admin-chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            background: rgba(0,0,0,0.15);
            border: 1px solid var(--border);
            border-radius: 10px;
            margin-bottom: 10px;
        }
        .admin-chat-input-area { display: flex; gap: 8px; }
        .admin-chat-input { flex: 1; margin-bottom: 0; }

        /* ── Chat Monitor (Global/Privado/Aliança) ─────────── */
        .admin-chat-monitor-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
        .admin-chat-filter-btn {
            padding: 6px 12px;
            background: var(--surface2);
            border: 1px solid var(--border2);
            border-radius: 20px;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .admin-chat-filter-btn:hover { color: var(--text); opacity: 1; transform: none; }
        .admin-chat-filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
        .admin-chat-monitor-layout { display: flex; gap: 12px; height: 520px; }
        .admin-chat-monitor-list { width: 260px; flex-shrink: 0; overflow-y: auto; padding-right: 4px; }
        .admin-chat-monitor-list-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
        .admin-chat-monitor-view { flex: 1; display: flex; flex-direction: column; min-width: 0; }
        .admin-chat-monitor-panel { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
        .admin-chat-monitor-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
        .admin-chat-channel-item {
            cursor: pointer;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--surface2);
            margin-bottom: 6px;
        }
        .admin-chat-channel-item.active { border-color: var(--accent); background: var(--accent-dim); }
        .admin-chat-channel-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
        .admin-chat-channel-item-name { font-weight: 700; font-size: 13px; color: var(--text); }
        .admin-chat-channel-item.active .admin-chat-channel-item-name { color: var(--accent); }
        .admin-chat-channel-item-time { font-size: 10px; color: var(--text-muted); }
        .admin-chat-channel-item-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .admin-chat-channel-item-count { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

        /* ── Chat "acx": lista à esquerda + conversa à direita (Conversas e Monitor) ── */
        .acx {
            display: grid;
            grid-template-columns: 300px minmax(0, 1fr);
            height: max(480px, calc(100vh - 250px));
            background: var(--surface);
            border: 1px solid var(--border2);
            border-radius: 14px;
            overflow: hidden;
        }
        .acx-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border2); background: var(--surface2); }
        .acx-side-head { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
        .acx-side-head-col { flex-direction: column; }
        .acx-row { display: flex; gap: 8px; }
        .acx-search, .acx-date, .acx-input {
            background: var(--bg);
            border: 1px solid var(--border2);
            border-radius: 999px;
            color: var(--text);
            font-size: 13px;
            padding: 8px 14px;
            outline: none;
            transition: border-color 0.15s;
            min-width: 0;
        }
        .acx-search { flex: 1; }
        .acx-date { flex: 1; border-radius: 8px; color-scheme: dark; }
        .acx-search:focus, .acx-date:focus, .acx-input:focus { border-color: var(--accent); }
        .acx-side-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
        .acx-live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(239,68,68,0.6); animation: acxPulse 1.6s infinite; }
        @keyframes acxPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
        .acx-seg { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
        .acx-seg button { flex: 1; background: none; border: none; color: var(--text-muted); font-size: 11px; font-weight: 600; padding: 6px 4px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
        .acx-seg button:hover { color: var(--text); opacity: 1; transform: none; }
        .acx-seg button.active { background: var(--accent-dim); color: var(--accent); }
        .acx-side-list { flex: 1; overflow-y: auto; padding: 6px; }
        .acx-side-list, .acx-messages { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
        .acx-side-list::-webkit-scrollbar, .acx-messages::-webkit-scrollbar { width: 8px; }
        .acx-side-list::-webkit-scrollbar-thumb, .acx-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
        .acx-side-list::-webkit-scrollbar-track, .acx-messages::-webkit-scrollbar-track { background: transparent; }

        .acx-item {
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 10px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.12s;
            position: relative;
        }
        .acx-item:hover { background: rgba(255,255,255,0.04); }
        .acx-item.active { background: var(--accent-dim); }
        .acx-item.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
        .acx-item.warn .acx-item-name { color: #fca5a5; }
        .acx-item-body { flex: 1; min-width: 0; }
        .acx-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
        .acx-item-name { font-weight: 700; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .acx-item.active .acx-item-name { color: var(--accent); }
        .acx-item-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
        .acx-item-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
        .acx-item-preview b { color: var(--text-soft); font-weight: 600; }
        .acx-item-warn { font-size: 10px; color: var(--red); font-weight: 600; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .acx-count { font-size: 10px; font-weight: 700; color: var(--text-soft); background: var(--border2); border-radius: 999px; padding: 1px 7px; flex-shrink: 0; }

        .acx-avatar {
            width: 38px; height: 38px; flex-shrink: 0;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-weight: 800; font-size: 15px;
            color: hsl(var(--h, 45), 80%, 85%);
            background: hsl(var(--h, 45), 45%, 26%);
            border: 1px solid hsl(var(--h, 45), 45%, 36%);
        }
        .acx-avatar.sm { width: 30px; height: 30px; font-size: 12px; }
        .acx-avatar-icon { background: var(--bg); border-color: var(--border2); font-size: 17px; }
        .acx-avatar-gap { width: 30px; flex-shrink: 0; }

        .acx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
        .acx-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border2); }
        .acx-head-info { flex: 1; min-width: 0; }
        .acx-head-name { font-weight: 700; font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .acx-head-sub { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
        .acx-uid { font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .acx-link { background: none; border: none; color: var(--accent); font-size: 11px; cursor: pointer; padding: 0; }
        .acx-link:hover { text-decoration: underline; opacity: 1; transform: none; }
        .acx-head-actions { display: flex; gap: 8px; flex-shrink: 0; }

        .acx-btn {
            background: rgba(255,255,255,0.05);
            border: 1px solid var(--border2);
            color: var(--text-soft);
            font-size: 12px; font-weight: 600;
            padding: 7px 12px;
            border-radius: 8px;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
        }
        .acx-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); opacity: 1; transform: none; }
        .acx-btn-primary { background: var(--accent); border-color: var(--accent); color: #0a0e17; }
        .acx-btn-primary:hover { background: #f5cd5c; color: #0a0e17; }
        .acx-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
        .acx-btn-danger:hover { background: rgba(239,68,68,0.18); color: #fecaca; }
        .acx-back { display: none; font-size: 16px; padding: 4px 10px; }

        .acx-tag { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
        .acx-tag-red { background: rgba(239,68,68,0.15); color: #fca5a5; }
        .acx-tag-gold { background: rgba(240,192,64,0.14); color: #f0c040; }
        .acx-tag-blue { background: rgba(100,181,246,0.14); color: #90caf9; }

        .acx-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px 18px;
            display: flex;
            flex-direction: column;
            background:
                radial-gradient(circle at 20% 0%, rgba(240,192,64,0.035), transparent 45%),
                var(--bg);
        }
        .acx-msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; max-width: 78%; }
        .acx-msg.cont { margin-top: 3px; }
        .acx-msg.right { align-self: flex-end; flex-direction: row-reverse; }
        .acx-msg-col { min-width: 0; display: flex; flex-direction: column; }
        .acx-msg.right .acx-msg-col { align-items: flex-end; }
        .acx-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 4px 3px; }
        .acx-name { font-size: 12px; font-weight: 700; color: hsl(var(--h, 45), 75%, 70%); }
        .acx-msg.admin .acx-name { color: var(--accent); }
        .acx-bubble-row { display: flex; align-items: center; gap: 6px; }
        .acx-msg.right .acx-bubble-row { flex-direction: row-reverse; }
        .acx-bubble {
            background: var(--surface2);
            border: 1px solid var(--border2);
            color: var(--text);
            font-size: 14px;
            line-height: 1.45;
            padding: 8px 12px 6px;
            border-radius: 4px 14px 14px 14px;
            word-break: break-word;
            white-space: pre-wrap;
        }
        .acx-msg.cont .acx-bubble { border-radius: 14px; }
        .acx-msg.right .acx-bubble { border-radius: 14px 4px 14px 14px; }
        .acx-msg.right.cont .acx-bubble { border-radius: 14px; }
        .acx-msg.admin .acx-bubble { background: linear-gradient(135deg, rgba(240,192,64,0.22), rgba(192,144,48,0.14)); border-color: rgba(240,192,64,0.35); }
        .acx-msg.peer .acx-bubble { background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.3); }
        .acx-msg.anon .acx-bubble { border-style: dashed; border-color: rgba(240,192,64,0.45); }
        .acx-msg.reported .acx-bubble { border: 1px solid rgba(239,68,68,0.6); box-shadow: 0 0 0 1px rgba(239,68,68,0.25); }
        .acx-count-red { background: rgba(239,68,68,0.15); color: #fca5a5; margin-right: 4px; }
        .acx-stamp { display: block; text-align: right; font-size: 10px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }
        .acx-img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; }
        .acx-bubble .chat-attach-card { margin: 2px 0; }

        .acx-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
        .acx-msg:hover .acx-actions { opacity: 1; }
        .acx-act {
            background: var(--surface);
            border: 1px solid var(--border2);
            border-radius: 6px;
            font-size: 11px;
            padding: 3px 6px;
            cursor: pointer;
            line-height: 1;
        }
        .acx-act:hover { border-color: var(--accent); opacity: 1; transform: none; }

        .acx-compose { display: flex; gap: 8px; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--border2); }
        .acx-input { flex: 1; padding: 11px 16px; font-size: 14px; font-family: inherit; line-height: 1.4; resize: none; border-radius: 22px; max-height: 150px; overflow-y: auto; }
        .acx-compose { align-items: flex-end; }
        .acx-send {
            width: 44px; height: 44px; flex-shrink: 0;
            border-radius: 50%;
            border: none;
            background: var(--accent);
            color: #0a0e17;
            font-size: 17px;
            cursor: pointer;
            transition: transform 0.1s, background 0.15s;
        }
        .acx-send:hover { background: #f5cd5c; opacity: 1; }
        .acx-send:active { transform: scale(0.94); }
        .acx-readonly { padding: 9px 14px; font-size: 11px; color: var(--text-muted); text-align: center; background: var(--surface); border-top: 1px solid var(--border2); }

        .acx-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-soft); font-size: 14px; padding: 20px; text-align: center; }
        .acx-empty small { color: var(--text-muted); font-size: 12px; }
        .acx-empty-icon { font-size: 40px; opacity: 0.5; margin-bottom: 4px; }
        .acx-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; text-align: center; padding: 30px 12px; margin: auto; }
        .acx-placeholder .spinner { width: 24px; height: 24px; border-width: 3px; }
        .acx-error { color: var(--red); }

        /* Toque: sem hover, as ações ficam sempre visíveis (discretas) */
        @media (hover: none) {
            .acx-actions { opacity: 0.7; }
        }

        /* ── Stats ─────────────────────────────────────────── */
        .admin-stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 4px 0 16px; }
        .admin-stat-card {
            background: var(--surface2);
            border: 1px solid var(--border2);
            border-radius: 12px;
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: border-color 0.2s;
        }
        .admin-stat-card:hover { border-color: rgba(240,192,64,0.3); transform: none; }
        .admin-stat-icon { font-size: 32px; min-width: 44px; text-align: center; }
        .admin-stat-info { flex: 1; }
        .admin-stat-label { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
        .admin-stat-value { color: var(--accent); font-size: 26px; font-weight: 800; }
        .admin-stat-value.green { color: var(--green); }
        .admin-stat-value.red { color: var(--red); }

        /* ── Action buttons ────────────────────────────────── */
        .action-btn-adm {
            display: block;
            width: 100%;
            padding: 13px 16px;
            background: rgba(255,255,255,0.06);
            border: 1px solid var(--border2);
            border-radius: 10px;
            color: var(--text);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-align: center;
            transition: opacity 0.15s, border-color 0.15s;
            margin-bottom: 8px;
        }
        .action-btn-adm:hover { opacity: 0.85; transform: none; }

        /* ── Chat bubbles ──────────────────────────────────── */
        .chat-msg { margin-bottom: 14px; }
        .chat-msg-me { text-align: right; }
        .chat-msg-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
        .chat-msg-me .chat-msg-header { flex-direction: row-reverse; }
        .chat-msg-name { font-size: 12px; font-weight: 700; }
        .chat-msg-time { font-size: 11px; color: var(--text-muted); }
        .chat-msg-text {
            background: rgba(255,255,255,0.07);
            padding: 8px 12px;
            border-radius: 10px;
            font-size: 14px;
            display: inline-block;
            max-width: 80%;
            text-align: left;
            word-break: break-word;
        }
        .chat-msg-me .chat-msg-text { background: rgba(240,192,64,0.12); }
        .chat-attach-card {
            background: linear-gradient(135deg, rgba(240, 192, 64, 0.12), rgba(192, 144, 48, 0.08));
            border: 1px solid rgba(240, 192, 64, 0.35);
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 13px;
            color: #f0e0b0;
        }
        .chat-attach-card b { color: #f0c040; }
        .chat-attach-action { display: flex; flex-direction: column; gap: 5px; }
        .chat-attach-progress { width: 100%; height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
        .chat-attach-progress div { height: 100%; background: linear-gradient(90deg, #c09030, #f0c040); }
        .log-actor { color: var(--accent); font-weight: 700; }
        .chat-send-btn {
            background: var(--accent);
            color: #0a0e17;
            border: none;
            border-radius: 8px;
            padding: 10px 16px;
            font-weight: 700;
            cursor: pointer;
            font-size: 18px;
            flex-shrink: 0;
        }

        /* ── Misc form inputs ──────────────────────────────── */
        .auth-input {
            width: 100%;
            background: var(--bg);
            border: 1px solid var(--border2);
            border-radius: 8px;
            color: var(--text);
            padding: 10px 14px;
            font-size: 14px;
            outline: none;
            font-family: inherit;
        }
        .auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,192,64,0.1); }
        .worker-loading-spinner {
            width: 18px; height: 18px;
            border: 2px solid var(--border2);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            display: inline-block;
            margin-right: 8px;
            vertical-align: middle;
        }

        /* ── Field label helper ────────────────────────────── */
        .field-label {
            color: var(--text-muted);
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 5px;
            font-weight: 600;
        }
        .input-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
        .input-group { display: flex; flex-direction: column; }

        /* ── Overlay de edição de notificação ──────────────── */
        #edit-notif-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.75);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }
        #edit-notif-dialog {
            background: var(--surface);
            border: 1px solid var(--border2);
            border-radius: 14px;
            padding: 24px;
            width: 90%;
            max-width: 420px;
        }

        /* ── Sidebar overlay (mobile) ──────────────────────── */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 99;
        }
        .sidebar-overlay.visible { display: block; }

        /* ── Responsivo ────────────────────────────────────── */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
            }
            .sidebar.open {
                transform: translateX(0);
                box-shadow: 4px 0 30px rgba(0,0,0,0.5);
            }
            .main-content {
                margin-left: 0;
            }
            .hamburger { display: block; }
            .page-body { padding: 16px; }
            .topbar { padding: 12px 16px; }
            .summary-grid { grid-template-columns: repeat(2, 1fr); }
            .admin-withdrawal-info { grid-template-columns: 1fr; }
            .input-row { flex-direction: column; }
            .input-row > * { width: 100% !important; }
            .admin-stats-container { grid-template-columns: 1fr 1fr; }
            .admin-chat-conversation { height: calc(100vh - 220px); }
            /* Chat acx: uma coluna por vez — lista, ou conversa aberta (classe acx-open) */
            .acx { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 200px); min-height: 420px; }
            .acx-btn-label { display: none; }
            .acx-side { border-right: none; }
            .acx.acx-open .acx-side { display: none; }
            .acx:not(.acx-open) .acx-main { display: none; }
            .acx-back { display: inline-block; }
            .acx-head { padding: 10px; gap: 8px; }
            .acx-head .acx-avatar { width: 32px; height: 32px; font-size: 13px; }
            .acx-head-actions .acx-btn { padding: 6px 8px; font-size: 11px; }
            .acx-messages { padding: 12px 10px; }
            .acx-msg { max-width: 92%; }
            .admin-chat-monitor-layout { flex-direction: column; height: auto; }
            .admin-chat-monitor-list { width: 100%; max-height: 220px; }
            .admin-chat-monitor-view { min-height: 320px; }
        }
        @media (max-width: 480px) {
            .summary-grid { grid-template-columns: 1fr 1fr; }
            .admin-stats-container { grid-template-columns: 1fr; }
            .admin-chat-switcher { gap: 2px; }
            .admin-chat-mode-btn { font-size: 11px; padding: 7px 6px; min-width: 0; }
            .admin-chat-monitor-filters { gap: 4px; }
            .admin-chat-filter-btn { font-size: 11px; padding: 5px 9px; }
        }
        .admin-dialog {
            background: #111827;
            border: 1px solid #2a3a52;
            border-radius: 16px;
            width: 100%;
            max-width: 620px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
        }
        @media (max-width: 600px) {
            .admin-dialog {
                max-width: 100%;
                max-height: 100vh;
                border-radius: 0;
                border: none;
                height: 100vh;
            }
        }


/* ══════════════════════════════════════════════════════════════
   LAYOUT v2 (17/10/2026) — sobrescreve o visual acima: menu agrupado
   com contadores, busca de jogador no topo, seções em grade de cartões,
   botões em tons suaves. Mesmo idioma visual do chat "acx".
   ══════════════════════════════════════════════════════════════ */

/* ── Base ── */
body {
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(240,192,64,0.05), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}
code { background: var(--surface2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 12px; color: var(--text-soft); }
button { border-radius: 9px; }

/* ── Login ── */
.login-card { border-radius: 18px; background: linear-gradient(180deg, var(--surface2), var(--surface)); }
.login-crest { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--accent-dim); border: 1px solid rgba(240,192,64,0.3); }

/* ── Sidebar ── */
.sidebar { background: linear-gradient(180deg, #0f1624, var(--surface)); }
.sidebar-header { display: flex; align-items: center; gap: 12px; padding: 18px 16px; }
.sidebar-logo { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: var(--accent-dim); border: 1px solid rgba(240,192,64,0.3); flex-shrink: 0; }
.sidebar-brand { font-size: 17px; }
.nav-section-label { padding: 14px 10px 5px; font-size: 10px; letter-spacing: 1.2px; }
.sidebar-nav .nav-section-label:first-child { padding-top: 4px; }
.nav-item { position: relative; padding: 8px 12px; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-badge {
    margin-left: auto;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px;
    background: var(--red); color: #fff;
    font-size: 11px; font-weight: 800;
    display: none; align-items: center; justify-content: center;
    line-height: 1;
}
.nav-badge.show { display: inline-flex; }
.nav-badge-muted { background: var(--border2); color: var(--text-soft); }
.sidebar-footer { padding: 12px 10px; }
.user-badge { margin-bottom: 0; padding: 8px 8px 8px 10px; }
.user-email { flex: 1; min-width: 0; }
.btn-logout { width: auto; padding: 5px 10px; flex-shrink: 0; font-size: 12px; border-radius: 8px; }

/* ── Topbar ── */
.topbar { background: rgba(17,24,39,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 12px 24px; }
.topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-title { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.topbar-search { position: relative; flex: 1; max-width: 460px; margin: 0 auto; }
.topbar-search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: 0.6; pointer-events: none; }
.topbar-search input { border-radius: 999px; padding: 8px 14px 8px 36px; font-size: 13px; background: var(--bg); }
.player-search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border2); border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    padding: 6px; display: none; z-index: 200; max-height: 420px; overflow-y: auto;
}
.player-search-results.open { display: block; }
.psr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.psr-item:hover, .psr-item.active { background: var(--accent-dim); }
.psr-body { min-width: 0; }
.psr-name { font-weight: 700; font-size: 13px; color: var(--text); }
.psr-sub { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psr-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 12px; }
.btn-outline { border-radius: 8px; padding: 7px 12px; }

/* ── Cards de resumo (Diagnóstico) ── */
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.card { position: relative; overflow: hidden; padding: 16px 18px; background: linear-gradient(160deg, var(--surface2), var(--surface)); }
.card-icon { position: absolute; right: 12px; top: 10px; font-size: 22px; opacity: 0.35; }
.card-value { font-size: 26px; }

/* ── Filtros ── */
.filters { gap: 10px; padding: 12px 14px; }
.filters-select { width: auto; min-width: 220px; padding: 7px 10px; font-size: 13px; }
.filters-search { display: flex; gap: 6px; margin-left: auto; flex: 1; max-width: 420px; }
.filters-search input { padding: 7px 12px; font-size: 13px; }

/* ── Seções / cartões ── */
.section { border-radius: 14px; padding: 18px 20px; border-color: var(--border); }
.section-header { gap: 10px; margin-bottom: 10px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.section-desc { color: var(--text-soft); font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.section input, .section select, .section textarea { margin-bottom: 0; }
.section > input, .section > textarea, .section > select { margin-bottom: 4px; }
.section.danger { border-color: rgba(239,68,68,0.3); background: linear-gradient(180deg, rgba(239,68,68,0.04), var(--surface) 40%); }
.section.danger .section-title { color: #fca5a5; }
.tab-intro { color: var(--text-soft); font-size: 13px; margin-bottom: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.admin-grid > .section { margin-bottom: 0; }
.grid-span-all { grid-column: 1 / -1; }
.split-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-layout > .section { margin-bottom: 0; }
.split-side { position: sticky; top: 76px; }

.input-row { gap: 10px; margin-bottom: 4px; }
.input-group { flex: 1 1 140px; min-width: 0; }
.field-label { margin-top: 2px; }
.btn-row { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row-start { justify-content: flex-start; }
.btn-row button { padding: 9px 18px; font-size: 13px; }
.result-line { margin-top: 10px; font-size: 13px; min-height: 0; }
.result-line:empty { display: none; }
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.inline-form button { white-space: nowrap; }
.mono-input { font-family: monospace; font-size: 12px; min-height: 70px; resize: vertical; }
.format-hint { color: var(--text-muted); font-size: 11px; margin: 4px 0 10px; }

/* Botões em tons suaves (texto claro, fundo translúcido) */
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text-soft); border: 1px solid var(--border2); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); opacity: 1; }
.btn-soft-danger { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }
.btn-soft-danger:hover { background: rgba(239,68,68,0.22); opacity: 1; }
.btn-soft-purple { background: rgba(124,58,237,0.16); color: #c4b5fd; border: 1px solid rgba(124,58,237,0.4); }
.btn-soft-purple:hover { background: rgba(124,58,237,0.26); opacity: 1; }
.btn-danger { background: var(--red); color: #fff; }

/* Botões gerados pelo admin.js com fundo colorido inline: garante texto legível */
button[style*="var(--red)"], button[style*="#dc2626"], button[style*="#7c3aed"], button[style*="#2196f3"],
button[style*="#1d4ed8"], button[style*="#f44336"], button[style*="#4caf50"], button[style*="#9c27b0"] { color: #fff; }

/* Avisos */
.note { font-size: 12px; color: #fbbf24; background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.22); border-radius: 8px; padding: 8px 12px; margin: 10px 0 0; line-height: 1.5; }
.note-red { color: #fca5a5; background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.25); margin: 0 0 12px; }

/* Tarefas agendadas */
.sched-pill { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(240,192,64,0.25); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.kv-list { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.kv-list > div { display: flex; justify-content: space-between; gap: 12px; }
.kv-list span { color: var(--text-muted); }
.kv-list b { color: var(--text); font-weight: 600; text-align: right; }
.kv-list b.gold { color: var(--accent); }
.status-box { padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; color: var(--text-soft); }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }

/* Recolhíveis */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.tools-panel { margin-top: 16px; }
.tools-panel > summary {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    font-weight: 700; color: var(--text);
}
.tools-panel > summary small { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.tools-panel > summary::after, .danger-collapsible > summary::after, .info-collapsible > summary::after { content: '▾'; margin-left: auto; color: var(--text-muted); transition: transform 0.15s; }
.tools-panel[open] > summary::after, .danger-collapsible[open] > summary::after, .info-collapsible[open] > summary::after { transform: rotate(180deg); }
.tools-panel[open] > summary { margin-bottom: 16px; }
.danger-collapsible > summary { display: flex; align-items: center; }
.info-collapsible { margin-top: 18px; }
.info-collapsible > summary { display: flex; align-items: center; font-size: 12px; color: var(--text-muted); }

/* Estatística em ladrilhos (Novidades / Coclew) */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat-tile-label { font-size: 11px; color: var(--text-soft); }
.stat-tile-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-tile-value.gold { color: var(--accent); } .stat-tile-value.green { color: var(--green); }
.stat-tile-value.red { color: var(--red); } .stat-tile-value.blue { color: var(--blue); }
.stat-tile-sub { font-size: 11px; color: var(--text-muted); }
.countdown-box { margin-bottom: 16px; padding: 14px 16px; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.3); border-radius: 10px; }
.countdown-label { font-size: 12px; color: var(--text-soft); margin-bottom: 4px; }
.countdown-value { font-size: 24px; font-weight: 800; color: #60a5fa; font-variant-numeric: tabular-nums; }
.log-box { margin-top: 14px; font-size: 12px; font-family: monospace; white-space: pre-wrap; max-height: 220px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }

/* Silenciados */
.muted-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); margin-bottom: 8px; }
.muted-body { flex: 1; min-width: 0; }
.muted-name { font-weight: 700; font-size: 13px; }
.acx-btn-ok { color: #86efac; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.acx-btn-ok:hover { background: rgba(34,197,94,0.18); color: #bbf7d0; }

/* Chat: silenciar + aguardando resposta */
.acx-mute.is-muted { color: #fca5a5; border-color: rgba(239,68,68,0.45); background: rgba(239,68,68,0.12); }
.acx-wait-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.acx-item.waiting .acx-item-name { color: var(--text); }
.acx-item.waiting .acx-item-preview { color: var(--text-soft); }
.admin-chat-switcher { max-width: 520px; }

@media (max-width: 768px) {
    .topbar { padding: 10px 12px; gap: 8px; }
    .topbar-title { font-size: 15px; }
    .topbar-search { max-width: none; }
    .topbar-search input { padding-left: 32px; }
    .btn-label { display: none; }
    .admin-grid { grid-template-columns: minmax(0, 1fr); }
    .split-layout { grid-template-columns: minmax(0, 1fr); }
    .split-side { position: static; }
    .filters-select { width: 100%; }
    .filters-search { max-width: none; margin-left: 0; width: 100%; }
    .kv-list > div { flex-direction: column; gap: 2px; }
    .kv-list b { text-align: left; }
    .nav-item.active::before { display: none; }
}
@media (max-width: 480px) {
    .topbar-title { display: none; }
}
.sidebar-nav, .player-search-results, .table-wrap { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
.sidebar-nav::-webkit-scrollbar, .player-search-results::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb, .player-search-results::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-track, .player-search-results::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track { background: transparent; }

/* ── Configurações: horário do chat ── */
.chat-open-pill { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.chat-open-pill.open { color: #86efac; background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); }
.chat-open-pill.closed { color: #fca5a5; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); }
.schedule-timeline { position: relative; height: 26px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.schedule-block { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: linear-gradient(180deg, rgba(34,197,94,0.75), rgba(22,163,74,0.6)); min-width: 2px; }
.schedule-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.schedule-ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin: 3px 1px 12px; }
.schedule-rows { display: flex; flex-direction: column; gap: 6px; }
.schedule-row { display: flex; align-items: center; gap: 8px; }
.schedule-row input { width: 92px; text-align: center; padding: 7px 8px; font-variant-numeric: tabular-nums; }
.schedule-row span { color: var(--text-muted); font-size: 12px; }
.schedule-preview { display: block; margin-top: 4px; padding: 8px 10px; word-break: break-all; line-height: 1.5; }
.schedule-preview.invalid { color: #fca5a5; border-color: rgba(239,68,68,0.35); font-family: inherit; }

/* ── Tarefas agendadas: situação dos ciclos ── */
.task-status-section { margin-bottom: 16px; }
.ts-table { min-width: 560px; }
.ts-table td { vertical-align: top; }
.ts-name { font-weight: 700; color: var(--text); }
.ts-pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; max-width: 320px; }
.ts-pill-ok { color: #86efac; background: rgba(34,197,94,0.12); }
.ts-pill-warn { color: #fcd34d; background: rgba(245,158,11,0.14); }
.ts-pill-bad { color: #fca5a5; background: rgba(239,68,68,0.16); }
.ts-pill-none { color: var(--text-muted); background: var(--surface2); }
tr.ts-bad td { background: rgba(239,68,68,0.04); }
.ts-region-head { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chip { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border2); cursor: default; }
.ts-chip-ok { color: #86efac; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.ts-chip-warn { color: #fcd34d; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.ts-chip-bad { color: #fca5a5; border-color: rgba(239,68,68,0.45); background: rgba(239,68,68,0.1); }
.ts-chip-none { color: var(--text-muted); }
