/* ═══════════════════════════════════════════════════════════
   TG Combine — Dashboard Styles
   Core styles + 2026 UI refresh
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ─── CSS Variables ───────────────────────────────────────── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(255, 255, 255, 0.05);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --accent-glow: rgba(99, 102, 241, 0.3);

    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-active: rgba(99, 102, 241, 0.4);
    --border: var(--border-color);
    --bg: var(--bg-input);
    --bg-hover: var(--bg-card-hover);
    --bg-tertiary: rgba(255, 255, 255, 0.02);
    --text-error: var(--danger);

    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Background Animation ────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 90%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ─── Layout ──────────────────────────────────────────────── */
.app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.sidebar-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 12px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    user-select: none;
}

.nav-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-gradient);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-stage {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-left: 8px;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.nav-stage.ready {
    background: #27b37a;
    border-color: rgba(39, 179, 122, 0.45);
    box-shadow: 0 0 0 2px rgba(39, 179, 122, 0.16);
}

.nav-stage.partial {
    background: linear-gradient(90deg, #f0b548 50%, rgba(240, 181, 72, 0.2) 50%);
    border-color: rgba(240, 181, 72, 0.55);
    box-shadow: 0 0 0 2px rgba(240, 181, 72, 0.14);
}

.nav-stage.todo {
    background: rgba(120, 140, 168, 0.25);
    border-color: rgba(120, 140, 168, 0.55);
}

.nav-stage-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.nav-stage-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ─── Main Content ────────────────────────────────────────── */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* ─── Header ──────────────────────────────────────────────── */
.header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

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

/* ─── Content Area ────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 28px 32px;
}

/* ─── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-icon.accounts { background: var(--info-bg); }
.stat-icon.parsing { background: var(--success-bg); }
.stat-icon.users { background: rgba(139, 92, 246, 0.1); }
.stat-icon.tasks { background: var(--warning-bg); }

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.stat-trend.up { background: var(--success-bg); color: var(--success); }
.stat-trend.down { background: var(--danger-bg); color: var(--danger); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Cards & Panels ──────────────────────────────────────── */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body {
    padding: 24px;
}

.panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    vertical-align: middle;
}

.btn-inline-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-active);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ─── Form Elements ───────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select option {
    background: var(--bg-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #5d7876;
}

/* ─── Table ───────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-glass);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Status Badge ────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.banned { background: var(--danger-bg); color: var(--danger); }
.status-badge.flood_wait { background: var(--warning-bg); color: var(--warning); }
.status-badge.inactive { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); }
.status-badge.session_expired { background: var(--danger-bg); color: var(--danger); }
.status-badge.phone_banned { background: var(--danger-bg); color: var(--danger); }
.status-badge.in_work { background: var(--info-bg); color: var(--info); }
.status-badge.quarantined { background: rgba(236, 72, 153, 0.14); color: #b52f76; }
.status-badge.invalid { background: var(--danger-bg); color: var(--danger); }
.status-badge.frozen { background: rgba(79, 70, 229, 0.14); color: #4d46b3; }
.status-badge.reauth { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.status-badge.pending { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); }
.status-badge.running { background: var(--info-bg); color: var(--info); }
.status-badge.completed { background: var(--success-bg); color: var(--success); }
.status-badge.failed { background: var(--danger-bg); color: var(--danger); }
.status-badge.cancelled { background: var(--warning-bg); color: var(--warning); }

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.active .status-dot,
.status-badge.running .status-dot,
.status-badge.in_work .status-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 28px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.modal-body {
    padding: 0 28px 24px;
}

.modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 15px;
    margin-bottom: 20px;
}

/* ─── Toast Notifications ─────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); }
.toast.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.toast.info { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ─── Tabs ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    user-select: none;
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* ─── User Avatar ─────────────────────────────────────────── */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-info-name {
    font-weight: 600;
    font-size: 14px;
}

.user-info-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Loading Spinner ─────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Section Visibility ──────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ─── Filter Chips ────────────────────────────────────────── */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .content {
        padding: 20px 16px;
    }
}

/* ─── Proxy Arrows ────────────────────────────────────────── */
.proxy-status-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
}

.proxy-arrow.inactive { 
    color: #64748b !important; 
    opacity: 0.3; 
}

.proxy-arrow.active { 
    color: #00ff00 !important; 
    filter: drop-shadow(0 0 12px rgba(0, 255, 0, 0.8)); 
    font-weight: 900 !important;
    animation: active-pulse 1.5s infinite ease-in-out;
}

.proxy-arrow.error { 
    color: #ff0000 !important; 
    filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.8)); 
    font-weight: 900 !important;
}

.proxy-arrow.checking {
    animation: flash-arrows 0.6s infinite;
    color: #ffff00 !important;
}

.proxy-status-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.proxy-status-text.active { color: #22c55e; }
.proxy-status-text.error { color: #ef4444; }
.proxy-status-text.inactive { color: #94a3b8; }

@keyframes active-pulse {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.9)); }
    50% { transform: scale(1.15); opacity: 0.8; filter: drop-shadow(0 0 15px rgba(34, 197, 94, 1)); }
}

@keyframes flash-arrows {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

/* ─── Web Chats Interface ─────────────────────────────────── */
.chat-layout {
    display: flex;
    height: calc(100vh - var(--header-height) - 80px);
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

.chat-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.chat-accounts { width: 220px; }
.chat-dialogs { width: 300px; }
.chat-main { 
    flex: 1; 
    border-right: none;
    background: transparent;
}

.chat-header-small {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--accent-primary);
}

.chat-item-info { flex: 1; overflow: hidden; }
.chat-item-title { 
    font-weight: 600; 
    font-size: 14px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.chat-item-meta { 
    font-size: 12px; 
    color: var(--text-muted); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

/* Chat Main Area */
.chat-main-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}

.message-bubble.in {
    align-self: flex-start;
    background: var(--bg-input);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.message-bubble.out {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
}

.message-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.message-bubble.in .message-meta {
    justify-content: flex-start;
}

.message-status {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.message-status.sent {
    color: rgba(255, 255, 255, 0.78);
}

.message-status.read {
    color: #9fe9ff;
}

.message-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(95, 143, 127, 0.95);
    animation: chat-typing 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.12s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes chat-typing {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.chat-input-area {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input-area .form-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 10px 20px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }

/* ─── Chat Folders ────────────────────────────────────────── */
.chat-folders {
    display: flex;
    padding: 8px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
}

.chat-folder {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-muted);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-folder:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.chat-folder.active {
    background: var(--accent-primary);
    color: white;
}

/* ─── Proxy Status Circle ──────────────────────────────────── */
.status-circle {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    flex-shrink: 0;
}

.status-circle.active { 
    background-color: #22c55e !important; 
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8) !important;
    animation: pulse-status 2s infinite !important;
}

.status-circle.checking { 
    background-color: #f59e0b !important; 
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8) !important;
    animation: pulse-status 1s infinite !important;
}

.status-circle.error { 
    background-color: #ef4444 !important; 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8) !important;
}

.status-circle.inactive { 
    background-color: #64748b !important; 
    opacity: 0.5;
}

@keyframes pulse-status {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ─── TG Limits & Anti-Freeze Instruction Pages ───────────── */
.limits-hero {
    text-align: center;
    padding: 40px 24px 30px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.06));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.limits-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: hero-glow 8s ease-in-out infinite alternate;
}

@keyframes hero-glow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 3%); }
}

.limits-hero-icon {
    font-size: 56px;
    margin-bottom: 12px;
    position: relative;
}

.limits-hero-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.limits-hero-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
}

.limits-hero-source {
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
}

/* Reasons grid */
.limits-reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.limits-reason-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.limits-reason-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.limits-reason-icon { font-size: 28px; margin-bottom: 8px; }
.limits-reason-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* Warning box */
.limits-warning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.limits-warning-box code {
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--warning);
}

/* Limits category blocks */
.limits-category-block {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.limits-category-block:last-child { border-bottom: none; }

.limits-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.limits-cat-icon { font-size: 22px; }

.limits-cat-title {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
}

.limits-risk-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limits-risk-badge.high { background: var(--danger-bg); color: var(--danger); }
.limits-risk-badge.medium { background: var(--warning-bg); color: var(--warning); }
.limits-risk-badge.low { background: var(--success-bg); color: var(--success); }

.limits-detail-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

table.limits-table {
    width: 100%;
    border-collapse: collapse;
}

table.limits-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

table.limits-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

table.limits-table tr:last-child td { border-bottom: none; }

/* Trust level cards */
.trust-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.trust-level-card {
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.trust-level-card:hover { transform: translateY(-2px); }
.trust-level-card.new-acc { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.2); }
.trust-level-card.warm-acc { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.2); }
.trust-level-card.trusted-acc { background: rgba(34, 197, 94, 0.06); border-color: rgba(34, 197, 94, 0.2); }

.trust-level-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.trust-emoji { font-size: 22px; }
.trust-title { font-size: 16px; font-weight: 700; }
.trust-score { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.trust-mult { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.trust-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* Recommendation list */
.rec-list { padding: 0; }

.rec-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.rec-item:last-child { border-bottom: none; }
.rec-item:hover { background: rgba(255, 255, 255, 0.02); }

.rec-icon { font-size: 22px; flex-shrink: 0; }
.rec-content { flex: 1; }
.rec-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.rec-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.rec-desc em { color: var(--accent-primary); font-style: normal; font-weight: 500; }
.rec-status { font-size: 18px; flex-shrink: 0; }

/* Summary grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.summary-item.done {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
}

.summary-item:hover { transform: translateY(-1px); }
.summary-check { font-size: 16px; flex-shrink: 0; }

.summary-item code {
    background: rgba(99, 102, 241, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-primary);
}

/* Anti-Freeze Steps */
.steps-timeline {
    position: relative;
    padding-left: 40px;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), rgba(139, 92, 246, 0.2));
}

.step-item {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.step-item:hover {
    border-color: var(--border-active);
    transform: translateX(4px);
}

.step-number {
    position: absolute;
    left: -38px;
    top: 18px;
    width: 26px; height: 26px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.step-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-tag.info { background: var(--info-bg); color: var(--info); }
.step-tag.warn { background: var(--warning-bg); color: var(--warning); }
.step-tag.success { background: var(--success-bg); color: var(--success); }

/* Stats boxes for freeze article */
.freeze-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.freeze-stat-box {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
}

.freeze-stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.freeze-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── TG Warmup Manual ─────────────────────────────────────── */
#section-tg-limits {
    flex-direction: column;
    gap: 18px;
}

#section-tg-limits.active {
    display: flex;
}

#section-tg-limits .tg-guide-page {
    display: none;
}

.tg-guide-hero {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 139, 141, 0.22);
    background:
        radial-gradient(circle at 12% 14%, rgba(15, 139, 141, 0.2), transparent 42%),
        radial-gradient(circle at 88% 20%, rgba(44, 167, 123, 0.16), transparent 44%),
        linear-gradient(130deg, rgba(9, 29, 34, 0.92), rgba(12, 37, 40, 0.94));
    box-shadow: 0 14px 32px rgba(3, 11, 15, 0.35);
}

.tg-guide-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(44, 167, 123, 0.42);
    background: rgba(44, 167, 123, 0.14);
    color: #b1f5df;
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 14px;
}

.tg-guide-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    align-items: center;
}

.tg-guide-hero-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 30px;
    line-height: 1.2;
    color: #f2fffd;
    margin-bottom: 10px;
}

.tg-guide-hero-desc {
    font-size: 14px;
    line-height: 1.65;
    color: #acd1ca;
}

.tg-guide-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tg-guide-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(167, 218, 206, 0.3);
    background: rgba(173, 232, 218, 0.08);
    color: #d9f6ef;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
}

.tg-guide-hero-visual {
    border: 1px solid rgba(165, 220, 207, 0.18);
    border-radius: 14px;
    background: rgba(7, 20, 24, 0.52);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tg-guide-hero-visual svg {
    width: 100%;
    height: auto;
}

.tg-guide-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.tg-guide-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f2f8f7;
    border: 1px solid #c7ddd8;
    color: #1f4f4b;
    font-weight: 600;
}

.tg-guide-tab:hover {
    border-color: #7fb9ad;
    background: #e6f4f1;
    color: #0f3f3d;
}

.tg-guide-tab.active {
    border-color: #2ca77b;
    background: linear-gradient(135deg, rgba(44, 167, 123, 0.22), rgba(15, 139, 141, 0.18));
    color: #083a38;
    box-shadow: 0 4px 14px rgba(15, 139, 141, 0.18);
}

.tg-guide-tab-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tg-guide-tab-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#section-tg-limits .tg-guide-page.active {
    display: block;
    animation: tg-guide-fade-in 0.24s ease;
}

@keyframes tg-guide-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tg-guide-flow {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tg-guide-flow-step {
    min-width: 210px;
    background: rgba(14, 31, 35, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 14px;
}

.tg-guide-flow-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    color: #f3fffd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 10px;
}

.tg-guide-flow-title {
    font-size: 14px;
    font-weight: 700;
    color: #e9f8f5;
    margin-bottom: 6px;
}

.tg-guide-flow-text {
    font-size: 12px;
    line-height: 1.6;
    color: #b7ccca;
}

.tg-guide-flow-arrow {
    width: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #73b0a6;
}

.tg-guide-flow-arrow svg,
.tg-cycle-arrow svg,
.tg-flood-arrow svg,
.tg-guide-reco-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tg-cycle-map {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tg-cycle-node {
    flex: 1 1 200px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(12, 27, 32, 0.72);
    padding: 12px;
}

.tg-cycle-node-title {
    font-size: 13px;
    font-weight: 700;
    color: #e8faf5;
    margin-bottom: 4px;
}

.tg-cycle-node-desc {
    font-size: 12px;
    color: #a7bebc;
    line-height: 1.55;
}

.tg-cycle-arrow {
    width: 20px;
    min-width: 20px;
    color: #6a9f97;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-guide-note {
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid rgba(185, 120, 38, 0.42);
    background: rgba(255, 239, 214, 0.92);
    color: #7a4c13;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 600;
    padding: 10px 12px;
}

.tg-guide-rules-overview {
    min-height: 60px;
}

.tg-guide-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.tg-guide-rule-item {
    border: 1px solid rgba(120, 184, 171, 0.3);
    border-radius: 10px;
    background: rgba(15, 139, 141, 0.1);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-guide-rule-item span {
    font-size: 11px;
    color: #a7cbc4;
}

.tg-guide-rule-item strong {
    font-size: 16px;
    color: #dcfff4;
}

.tg-guide-modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.tg-mode-card {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(11, 23, 30, 0.74);
    padding: 14px;
}

.tg-mode-card.cautious { border-color: rgba(54, 194, 142, 0.45); }
.tg-mode-card.normal { border-color: rgba(66, 143, 228, 0.45); }
.tg-mode-card.aggressive { border-color: rgba(240, 165, 74, 0.45); }

.tg-mode-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.tg-mode-name {
    font-size: 14px;
    font-weight: 700;
    color: #e8faf6;
}

.tg-mode-delay {
    font-size: 13px;
    color: #9ad0c6;
    margin-bottom: 8px;
}

.tg-mode-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tg-mode-metric-row span {
    color: #9ab0b3;
}

.tg-mode-metric-row strong {
    color: #e6faf6;
}

.tg-risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.tg-risk-pill.low {
    color: #5ee1a8;
    border-color: rgba(94, 225, 168, 0.42);
    background: rgba(94, 225, 168, 0.12);
}

.tg-risk-pill.medium {
    color: #f6cd7c;
    border-color: rgba(246, 205, 124, 0.42);
    background: rgba(246, 205, 124, 0.12);
}

.tg-risk-pill.high {
    color: #ff9f95;
    border-color: rgba(255, 159, 149, 0.42);
    background: rgba(255, 159, 149, 0.12);
}

.tg-guide-limit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.tg-limit-card {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(11, 23, 30, 0.72);
    padding: 12px;
}

.tg-limit-title {
    font-size: 13px;
    font-weight: 700;
    color: #e5faf4;
    margin-bottom: 8px;
}

.tg-limit-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    padding: 7px 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.tg-limit-row span {
    color: #9bb0b4;
}

.tg-limit-row strong {
    color: #e6faf6;
}

.tg-flood-flow {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.tg-flood-node {
    flex: 1 1 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 159, 149, 0.35);
    background: rgba(62, 23, 25, 0.45);
    padding: 12px;
}

.tg-flood-node-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffd4cf;
    margin-bottom: 4px;
}

.tg-flood-node-desc {
    font-size: 12px;
    line-height: 1.55;
    color: #f0bdb7;
}

.tg-flood-arrow {
    width: 24px;
    min-width: 24px;
    color: #e4a79f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-status-priority {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(11, 23, 30, 0.7);
    padding: 12px;
    margin-bottom: 12px;
}

.tg-status-priority-title {
    font-size: 12px;
    font-weight: 700;
    color: #e7faf5;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tg-status-priority-row {
    font-size: 13px;
    color: #aee0d1;
    line-height: 1.5;
}

.tg-status-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.tg-status-guide-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(11, 23, 30, 0.72);
    padding: 12px;
}

.tg-status-guide-card.active { border-color: rgba(22, 163, 74, 0.35); }
.tg-status-guide-card.in_work { border-color: rgba(59, 130, 246, 0.34); }
.tg-status-guide-card.quarantined { border-color: rgba(236, 72, 153, 0.34); }
.tg-status-guide-card.invalid { border-color: rgba(239, 68, 68, 0.34); }
.tg-status-guide-card.frozen { border-color: rgba(79, 70, 229, 0.34); }
.tg-status-guide-card.reauth { border-color: rgba(249, 115, 22, 0.34); }

.tg-status-guide-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tg-status-guide-head strong {
    font-size: 13px;
    color: #ecfaf6;
}

.tg-status-guide-text {
    font-size: 12px;
    line-height: 1.55;
    color: #aabfbe;
    margin-bottom: 8px;
}

.tg-status-guide-rule {
    font-size: 12px;
    line-height: 1.5;
    color: #94d8bf;
}

.tg-cause-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.tg-cause-item {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: rgba(11, 23, 30, 0.7);
    padding: 12px;
}

.tg-cause-title {
    font-size: 13px;
    font-weight: 700;
    color: #ecfaf6;
    margin-bottom: 4px;
}

.tg-cause-desc {
    font-size: 12px;
    color: #aabfbe;
    line-height: 1.5;
    margin-bottom: 8px;
}

.tg-cause-fix {
    font-size: 12px;
    color: #93debe;
    line-height: 1.5;
}

.tg-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.tg-check-card {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(11, 23, 30, 0.72);
    padding: 12px;
}

.tg-check-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #e7faf5;
    margin-bottom: 8px;
}

.tg-check-item {
    position: relative;
    padding-left: 16px;
    font-size: 12px;
    line-height: 1.55;
    color: #a7bcbd;
    margin-bottom: 6px;
}

.tg-check-item:last-child {
    margin-bottom: 0;
}

.tg-check-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4fd6a2;
    position: absolute;
    top: 7px;
    left: 2px;
}

.tg-guide-reco-list {
    display: grid;
    gap: 8px;
}

.tg-guide-reco-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(11, 23, 30, 0.7);
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.55;
    color: #aec2c4;
}

.tg-guide-reco-icon {
    color: #67d8ad;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-width: 16px;
    margin-top: 1px;
}

/* ─── Warmup Phases Grid ──────────────────────────────────── */
.warmup-phases-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}
.warmup-phase-card {
    flex: 0 0 140px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s;
}
.warmup-phase-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}
.warmup-phase-num {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}
.warmup-phase-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.warmup-phase-time {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 6px;
}
.warmup-phase-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}
.warmup-phase-arrow {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ─── Warmup Mode Info Card ───────────────────────────────── */
.warmup-mode-info-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}
.warmup-mode-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.warmup-mode-info-row:last-child { border-bottom: none; }
.warmup-mode-info-row strong {
    color: var(--accent-primary);
    font-size: 12px;
}

/* ============================================================
   2026 UI Refresh - Light editorial dashboard
   ============================================================ */

:root {
    --bg-primary: #f2f6f4;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(17, 56, 56, 0.05);
    --bg-input: #eef4f2;

    --text-primary: #102726;
    --text-secondary: #2d4948;
    --text-muted: #6a8483;

    --accent-primary: #0f8b8d;
    --accent-secondary: #2ca77b;
    --accent-light: #53b6a4;
    --accent-gradient: linear-gradient(135deg, #0f8b8d, #2ca77b, #f0a54a);
    --accent-glow: rgba(15, 139, 141, 0.2);

    --success: #167a53;
    --success-bg: rgba(22, 122, 83, 0.1);
    --warning: #ba6a10;
    --warning-bg: rgba(186, 106, 16, 0.12);
    --danger: #c1423f;
    --danger-bg: rgba(193, 66, 63, 0.1);
    --info: #216f9f;
    --info-bg: rgba(33, 111, 159, 0.1);

    --border-color: rgba(16, 39, 38, 0.1);
    --border-active: rgba(15, 139, 141, 0.36);
    --bg-tertiary: #e9f2ef;
    --text-error: var(--danger);

    --sidebar-width: 288px;
    --header-height: 70px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 10px rgba(20, 49, 47, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 49, 47, 0.12);
    --shadow-lg: 0 18px 50px rgba(20, 49, 47, 0.16);
    --shadow-glow: 0 18px 32px rgba(15, 139, 141, 0.15);

    --transition: all 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
}

h1, h2, h3, h4,
.sidebar-title,
.header-title,
.panel-title,
.stat-value,
.modal-title,
.limits-hero-title {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

body::before {
    background:
        radial-gradient(45% 42% at 10% 2%, rgba(15, 139, 141, 0.14), transparent 70%),
        radial-gradient(52% 40% at 84% 6%, rgba(240, 165, 74, 0.14), transparent 74%),
        radial-gradient(44% 36% at 52% 96%, rgba(44, 167, 123, 0.14), transparent 74%);
    opacity: 0.9;
    animation: ambient-drift 22s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(0, -16px, 0) scale(1.03); }
}

.app {
    isolation: isolate;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(176deg, rgba(248, 252, 250, 0.96), rgba(242, 248, 246, 0.9));
    border-right: 1px solid rgba(16, 39, 38, 0.09);
    box-shadow: 12px 0 34px rgba(18, 46, 44, 0.08);
    backdrop-filter: blur(12px);
}

.sidebar-header {
    padding: 24px 22px 18px;
    border-bottom: 1px solid rgba(16, 39, 38, 0.07);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #f9fffb;
    background: var(--accent-gradient);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(15, 139, 141, 0.28);
}

.sidebar-title {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.sidebar-subtitle {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 0.14em;
}

.sidebar-nav {
    padding: 14px 12px 20px;
}

.nav-section {
    margin-bottom: 18px;
}

.nav-section-title {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #6c8886;
    margin-bottom: 6px;
}

.nav-item {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #375452;
}

.nav-item:hover {
    background: #eaf3f1;
    color: #163332;
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.15), rgba(44, 167, 123, 0.15));
    color: #0c6f70;
    border: 1px solid rgba(15, 139, 141, 0.18);
}

.nav-item.active::before {
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 8px;
    background: linear-gradient(180deg, #0f8b8d, #2ca77b);
}

.nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #e5efec;
    color: #2f504e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-item.active .nav-icon {
    background: rgba(15, 139, 141, 0.18);
    color: #0b7172;
}

.nav-badge {
    background: linear-gradient(135deg, #f0a54a, #e86c4f);
    color: #fff;
}

.nav-badge-alert {
    background: linear-gradient(135deg, #d16633, #bb3f2f);
}

.main {
    margin-left: var(--sidebar-width);
}

.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(16, 39, 38, 0.08);
    box-shadow: 0 8px 30px rgba(16, 39, 38, 0.06);
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-title {
    font-size: 24px;
    color: #143130;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(15, 139, 141, 0.2);
    border-radius: 10px;
    background: #f0f7f5;
    color: #0c6f70;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 139, 141, 0.16);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 22, 0.4);
    backdrop-filter: blur(3px);
    z-index: 96;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

.content {
    padding: 32px;
}

.section.active {
    animation: section-in 0.32s ease-out;
}

@keyframes section-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section.active .stat-card,
.section.active .panel {
    animation: rise-in 0.46s ease-out both;
}

.section.active .stat-card:nth-child(2),
.section.active .panel:nth-of-type(2) {
    animation-delay: 0.05s;
}

.section.active .stat-card:nth-child(3),
.section.active .panel:nth-of-type(3) {
    animation-delay: 0.1s;
}

.section.active .stat-card:nth-child(4),
.section.active .panel:nth-of-type(4) {
    animation-delay: 0.15s;
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.stat-card,
.panel,
.chat-layout,
.modal {
    background: var(--bg-card);
    border: 1px solid rgba(16, 39, 38, 0.1);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.stat-card::before {
    opacity: 0.64;
    height: 3px;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    border-radius: 12px;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.stat-icon.accounts { background: rgba(15, 139, 141, 0.14); color: #0b6f71; }
.stat-icon.parsing { background: rgba(22, 122, 83, 0.14); color: #126845; }
.stat-icon.users { background: rgba(33, 111, 159, 0.14); color: #1d5f86; }
.stat-icon.tasks { background: rgba(186, 106, 16, 0.14); color: #95540f; }

.stat-value {
    font-size: 34px;
    color: #13302f;
}

.stat-label {
    color: #65817f;
}

.panel {
    border-radius: 18px;
    margin-bottom: 22px;
}

.panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(16, 39, 38, 0.08);
}

.panel-title {
    font-size: 17px;
    color: #133130;
}

.panel-body {
    padding: 22px;
}

.panel-footer {
    border-top: 1px solid rgba(16, 39, 38, 0.08);
}

.btn {
    border-radius: 11px;
    padding: 10px 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    color: #f6fffb;
    box-shadow: 0 8px 18px rgba(15, 139, 141, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 12px 22px rgba(15, 139, 141, 0.28);
}

.btn-secondary {
    background: #edf4f2;
    border: 1px solid rgba(16, 39, 38, 0.12);
    color: #224342;
}

.btn-secondary:hover {
    background: #e4eeeb;
    border-color: rgba(15, 139, 141, 0.34);
}

.btn-danger {
    background: rgba(193, 66, 63, 0.1);
    border-color: rgba(193, 66, 63, 0.24);
    color: #a43835;
}

.btn-icon {
    background: #edf4f2;
    border-color: rgba(16, 39, 38, 0.12);
    color: #426463;
}

.btn-icon:hover {
    background: #e5efec;
}

.form-label {
    color: #365352;
    margin-bottom: 7px;
}

.form-input,
.form-select {
    min-height: 44px;
    background: #edf4f2;
    border-color: rgba(16, 39, 38, 0.12);
    color: #173534;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

thead th {
    border-bottom-color: rgba(16, 39, 38, 0.1);
    color: #688281;
    font-size: 11px;
}

tbody td {
    border-bottom-color: rgba(16, 39, 38, 0.07);
}

tbody tr:hover {
    background: rgba(15, 139, 141, 0.05);
}

.table-hover tbody tr:hover {
    background: rgba(15, 139, 141, 0.05);
}

.status-badge {
    border: 1px solid transparent;
}

.status-badge.active,
.status-badge.completed {
    border-color: rgba(22, 122, 83, 0.26);
}

.status-badge.running {
    border-color: rgba(33, 111, 159, 0.24);
}

.status-badge.failed,
.status-badge.banned {
    border-color: rgba(193, 66, 63, 0.24);
}

.status-badge.invalid {
    border-color: rgba(193, 66, 63, 0.24);
}

.status-badge.in_work {
    border-color: rgba(33, 111, 159, 0.24);
}

.status-badge.quarantined {
    border-color: rgba(181, 47, 118, 0.24);
}

.status-badge.frozen,
.status-badge.reauth {
    border-color: rgba(191, 109, 25, 0.24);
}

.status-badge.frozen {
    border-color: rgba(77, 70, 179, 0.24);
}

.status-badge.pending,
.status-badge.inactive {
    border-color: rgba(106, 132, 131, 0.22);
}

.account-status-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    vertical-align: middle;
    background: rgba(100, 116, 139, 0.14);
    color: #64748b;
    transform: translateY(-1px);
}

.account-status-icon svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-status-icon.active { background: rgba(34, 197, 94, 0.16); color: #168a45; }
.account-status-icon.in_work { background: rgba(59, 130, 246, 0.16); color: #2269b5; }
.account-status-icon.quarantined { background: rgba(236, 72, 153, 0.16); color: #b52f76; }
.account-status-icon.invalid { background: rgba(239, 68, 68, 0.16); color: #bf3a3a; }
.account-status-icon.frozen { background: rgba(79, 70, 229, 0.16); color: #4d46b3; }
.account-status-icon.reauth { background: rgba(249, 115, 22, 0.16); color: #bd5d1e; }

.user-avatar {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
}

.filter-chip {
    background: #edf4f2;
    border-color: rgba(16, 39, 38, 0.12);
    color: #355352;
}

.filter-chip:hover,
.filter-chip.active {
    background: rgba(15, 139, 141, 0.12);
    color: #0e7778;
}

.account-proxy-chip {
    border: 1px solid rgba(16, 39, 38, 0.13);
    background: #edf4f2;
    color: #274746;
    border-radius: 999px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
}

button.account-proxy-chip {
    cursor: pointer;
    transition: var(--transition);
}

button.account-proxy-chip:hover {
    border-color: rgba(15, 139, 141, 0.34);
    background: #e4efeb;
}

.account-proxy-chip.muted {
    opacity: 0.7;
}

.account-proxy-chip svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.account-proxy-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.account-proxy-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-proxy-meta .status-circle {
    margin-right: 0 !important;
}

.proxy-inline-note {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.proxy-check-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.diag-loading {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.diag-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.diag-item {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: #f8fbfa;
    padding: 12px 14px;
}

.diag-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.diag-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f3e3d;
}

.diag-item-text {
    font-size: 13px;
    color: #56706f;
    line-height: 1.45;
}

.diag-summary {
    margin-top: 14px;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 39, 38, 0.14);
}

.diag-summary-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #1d3b3a;
}

.diag-summary-text {
    font-size: 13px;
    color: #4f6867;
}

.diag-ok {
    border-color: rgba(22, 122, 83, 0.28);
    background: rgba(22, 122, 83, 0.08);
}

.diag-warn {
    border-color: rgba(186, 106, 16, 0.3);
    background: rgba(186, 106, 16, 0.08);
}

.diag-fail {
    border-color: rgba(193, 66, 63, 0.28);
    background: rgba(193, 66, 63, 0.08);
}

.diag-na {
    border-color: rgba(106, 132, 131, 0.22);
    background: rgba(106, 132, 131, 0.08);
}

.account-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.metric-badge {
    border: 1px solid rgba(15, 139, 141, 0.2);
    background: rgba(15, 139, 141, 0.09);
    color: #0f7172;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.metric-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.account-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.account-open-btn {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.account-open-btn:focus-visible {
    outline: 3px solid rgba(15, 139, 141, 0.22);
    outline-offset: 4px;
    border-radius: 10px;
}

.account-manager-modal {
    width: min(1120px, calc(100vw - 20px));
    max-width: min(1120px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    min-height: min(760px, calc(100dvh - 20px));
    height: calc(100dvh - 20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#modal-account-manager {
    padding: 10px;
}

#modal-account-manager .modal-header {
    flex-shrink: 0;
}

#modal-account-manager .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#modal-account-manager .modal-footer {
    flex-shrink: 0;
}

.account-manager-header {
    align-items: center;
}

.account-manager-header-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.account-manager-head-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    box-shadow: 0 8px 18px rgba(15, 139, 141, 0.22);
}

.account-manager-head-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-manager-subtitle {
    color: #5f7978;
    font-size: 13px;
}

.account-manager-hero {
    border-radius: 14px;
    border: 1px solid rgba(16, 39, 38, 0.12);
    background: linear-gradient(135deg, #0f5178, #0f7a88 58%, #1f8b73);
    color: #ffffff;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.account-manager-hero-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.account-manager-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}

.account-manager-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.account-manager-subline {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.account-manager-country-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 700;
}

.account-manager-hero-badges {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.account-manager-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.account-manager-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.account-manager-tab {
    appearance: none;
    border: 1px solid rgba(16, 39, 38, 0.12);
    background: #edf4f2;
    border-radius: 9px;
    padding: 8px 11px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #395554;
    cursor: pointer;
    transition: var(--transition);
}

.account-manager-tab:hover {
    border-color: rgba(15, 139, 141, 0.34);
    background: #e3efeb;
    color: #0f7576;
}

.account-manager-tab.active {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15, 139, 141, 0.25);
}

.account-manager-panel {
    border-radius: 12px;
}

.account-manager-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

.account-manager-grid.single {
    grid-template-columns: 1fr;
}

.account-manager-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-manager-card {
    background: #f8fbfa;
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 12px;
    padding: 14px;
}

.account-manager-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.account-manager-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #1c3a39;
}

.account-manager-info-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.account-manager-info-row {
    min-height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(16, 39, 38, 0.08);
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    font-size: 13px;
}

.account-manager-info-row span {
    color: #668281;
}

.account-manager-info-row strong {
    color: #204140;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.account-manager-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.account-manager-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.account-action-last {
    border: 1px solid rgba(16, 39, 38, 0.1);
    background: #eef5f2;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.account-action-last-title {
    font-size: 14px;
    font-weight: 800;
    color: #1d3b3a;
}

.account-action-last-text {
    margin-top: 3px;
    font-size: 13px;
    color: #4d6c6b;
    line-height: 1.4;
}

.account-action-last-time {
    margin-top: 6px;
    font-size: 11px;
    color: #738b89;
}

.account-action-last-errors {
    margin-top: 8px;
    border-top: 1px dashed rgba(16, 39, 38, 0.18);
    padding-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #9c4a47;
    font-size: 12px;
    line-height: 1.35;
}

.account-action-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-action-group {
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 12px;
    background: #f7fbf9;
    padding: 10px;
}

.account-action-group h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #244443;
}

.account-manager-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.account-manager-date-card {
    border: 1px solid rgba(16, 39, 38, 0.1);
    background: #f8fbfa;
    border-radius: 12px;
    padding: 14px;
}

.account-manager-date-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6a8483;
    margin-bottom: 6px;
}

.account-manager-date-value {
    font-size: 15px;
    font-weight: 700;
    color: #1f3f3e;
}

.account-manager-health-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #345352;
    line-height: 1.5;
}

.account-manager-muted {
    color: #658280;
    font-size: 13px;
    line-height: 1.5;
}

.account-health-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.account-health-card {
    min-height: 0;
}

.account-health-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.account-health-summary-wrap {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.account-health-ring {
    --ring-color: #23b26d;
    --ring-track: #dce8e2;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(var(--ring-color) calc(var(--health-pct, 0) * 1%), var(--ring-track) 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-health-ring.low {
    --ring-color: #26ad67;
}

.account-health-ring.medium {
    --ring-color: #e49f3a;
}

.account-health-ring.high {
    --ring-color: #db5f5b;
}

.account-health-ring-inner {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #f8fbfa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #2d7f5e;
    line-height: 1;
}

.account-health-summary-text {
    min-width: 98px;
}

.account-health-summary-label {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.account-health-summary-label.low {
    color: #2da96d;
}

.account-health-summary-label.medium {
    color: #c9892c;
}

.account-health-summary-label.high {
    color: #ce534f;
}

.account-health-summary-sub {
    margin-top: 4px;
    font-size: 13px;
    color: #6c8786;
}

.account-health-noevents {
    text-align: center;
    font-size: 14px;
    color: #688381;
    margin-top: 8px;
}

.account-health-collapse-btn {
    border: 1px solid rgba(16, 39, 38, 0.2);
    background: #edf4f2;
    color: #244544;
    border-radius: 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.account-health-collapse-btn:hover {
    border-color: rgba(15, 139, 141, 0.36);
    background: #e2efeb;
    color: #0f7273;
}

.account-health-score-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.account-health-score-value {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    color: #203f3e;
}

.account-health-score-value span {
    font-size: 24px;
    color: #708988;
    margin-left: 4px;
}

.account-health-risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid transparent;
}

.account-health-risk-badge.low {
    color: #1c7f4d;
    background: rgba(28, 127, 77, 0.12);
    border-color: rgba(28, 127, 77, 0.24);
}

.account-health-risk-badge.medium {
    color: #a76617;
    background: rgba(167, 102, 23, 0.12);
    border-color: rgba(167, 102, 23, 0.24);
}

.account-health-risk-badge.high {
    color: #b44744;
    background: rgba(180, 71, 68, 0.12);
    border-color: rgba(180, 71, 68, 0.22);
}

.account-health-factors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-health-factor {
    border-top: 1px solid rgba(16, 39, 38, 0.08);
    padding-top: 8px;
}

.account-health-factor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.account-health-factor-title {
    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
    color: #203f3e;
}

.account-health-factor-score {
    font-size: 18px;
    font-weight: 800;
}

.account-health-factor-score.good {
    color: #2ca569;
}

.account-health-factor-score.mid {
    color: #b07b2e;
}

.account-health-factor-score.bad {
    color: #cf5955;
}

.account-health-factor-desc {
    font-size: 12px;
    line-height: 1.45;
    color: #78908f;
    margin-bottom: 4px;
}

.account-health-factor-bar {
    height: 4px;
    border-radius: 999px;
    background: #dde8e3;
    overflow: hidden;
}

.account-health-factor-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.account-health-factor-bar.good span {
    background: #34ad6f;
}

.account-health-factor-bar.mid span {
    background: #dfa14a;
}

.account-health-factor-bar.bad span {
    background: #dc5f5b;
}

.account-health-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.account-health-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.account-health-tag.good {
    background: rgba(40, 168, 105, 0.12);
    border-color: rgba(40, 168, 105, 0.24);
    color: #2f9c68;
}

.account-health-tag.bad {
    background: rgba(204, 86, 82, 0.12);
    border-color: rgba(204, 86, 82, 0.2);
    color: #c25956;
}

.account-health-reco-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-health-reco {
    border-radius: 10px;
    border: 1px solid rgba(16, 39, 38, 0.1);
    background: #eef5f2;
    color: #446968;
    font-size: 13px;
    padding: 8px 10px;
}

.account-health-events-card {
    margin-top: 12px;
}

.account-health-events-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.account-health-event {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(16, 39, 38, 0.1);
    background: #f6faf8;
    color: #3f6766;
    font-size: 13px;
    line-height: 1.45;
}

.account-health-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5d8f8d;
    flex-shrink: 0;
}

.account-health-event.ok .account-health-event-dot {
    background: #31aa6a;
}

.account-health-event.warn .account-health-event-dot {
    background: #dd9e44;
}

.account-health-event.fail .account-health-event-dot {
    background: #d85f5b;
}

.account-health-event-time {
    margin-left: auto;
    font-size: 11px;
    color: #7a9392;
    white-space: nowrap;
}

.proxy-main-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.proxy-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.proxy-main-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f3f3e;
}

.proxy-main-sub {
    font-size: 12px;
    color: #688281;
    margin-top: 2px;
}

.proxy-status-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.proxy-empty-icon svg {
    width: 44px;
    height: 44px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(16, 39, 38, 0.13);
    background: #edf4f2;
    color: #365958;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 139, 141, 0.34);
    background: #e3efeb;
    color: #0f7172;
}

.icon-btn:focus-visible {
    outline: 3px solid rgba(15, 139, 141, 0.2);
    outline-offset: 1px;
}

.icon-btn.danger {
    color: #a43b38;
    border-color: rgba(193, 66, 63, 0.24);
    background: rgba(193, 66, 63, 0.1);
}

.icon-btn.danger:hover {
    color: #922f2d;
    border-color: rgba(193, 66, 63, 0.34);
    background: rgba(193, 66, 63, 0.16);
}

.chat-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

.empty-state {
    color: #708786;
}

.empty-state-icon {
    opacity: 0.45;
}

.modal-overlay {
    background: rgba(8, 24, 24, 0.38);
}

.modal {
    background: #fdfefe;
    border-color: rgba(16, 39, 38, 0.12);
}

.modal-close:hover {
    background: #edf4f2;
    color: #183736;
}

.toast-container {
    top: 22px;
    right: 22px;
}

#toast-container.toast-container {
    position: fixed !important;
    z-index: 20000 !important;
}

.toast {
    border-radius: 12px;
    background: #f8fcfb;
    border: 1px solid rgba(16, 39, 38, 0.12);
    color: #234241;
    min-width: 280px;
}

.toast.success { background: rgba(22, 122, 83, 0.1); border-color: rgba(22, 122, 83, 0.22); color: #166f4d; }
.toast.error { background: rgba(193, 66, 63, 0.1); border-color: rgba(193, 66, 63, 0.2); color: #a93937; }
.toast.info { background: rgba(33, 111, 159, 0.1); border-color: rgba(33, 111, 159, 0.22); color: #205f87; }

.chat-layout {
    height: calc(100vh - var(--header-height) - 92px);
}

.chat-column {
    background: rgba(251, 254, 252, 0.6);
    border-right-color: rgba(16, 39, 38, 0.08);
}

.chat-header-small {
    color: #6e8684;
    border-bottom-color: rgba(16, 39, 38, 0.08);
}

.chat-item:hover {
    background: rgba(15, 139, 141, 0.08);
}

.chat-item.active {
    background: rgba(15, 139, 141, 0.14);
    border-left: 3px solid #0f8b8d;
}

.chat-main-header {
    background: rgba(239, 246, 243, 0.9);
}

.message-bubble.in {
    background: #ebf2f0;
    color: #1e3b3a;
}

.message-bubble.out {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
}

.chat-input-area {
    background: rgba(241, 248, 245, 0.92);
}

.chat-input-area .form-input {
    background: #ffffff;
    border: 1px solid rgba(16, 39, 38, 0.12);
}

.chat-folders {
    background: rgba(241, 248, 245, 0.92);
}

.chat-folder:hover {
    background: rgba(15, 139, 141, 0.08);
}

.chat-folder.active {
    background: #0f8b8d;
}

.limits-hero {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.12), rgba(44, 167, 123, 0.1), rgba(240, 165, 74, 0.12));
    border-color: rgba(15, 139, 141, 0.2);
}

.limits-hero::before {
    background: radial-gradient(ellipse at 30% 20%, rgba(15, 139, 141, 0.12) 0%, transparent 60%);
}

.limits-hero-title {
    color: #123130;
    background: none;
    -webkit-text-fill-color: initial;
}

.limits-reason-card:hover,
.trust-level-card:hover,
.step-item:hover,
.summary-item:hover,
.warmup-phase-card:hover {
    box-shadow: var(--shadow-sm);
}

.limits-warning-box code,
.summary-item code {
    background: rgba(15, 139, 141, 0.12);
    color: #0f7576;
}

.warmup-phase-num,
.step-number {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
}

.steps-timeline::before {
    background: linear-gradient(180deg, rgba(15, 139, 141, 0.9), rgba(44, 167, 123, 0.8), rgba(240, 165, 74, 0.35));
}

.warmup-mode-info-row {
    border-bottom-color: rgba(16, 39, 38, 0.08);
}

.warmup-ai-assist {
    background: rgba(15, 139, 141, 0.08);
    border: 1px solid rgba(15, 139, 141, 0.26);
    border-radius: 12px;
    padding: 15px;
}

.massrx-hero {
    border: 1px solid rgba(15, 139, 141, 0.22);
    background: linear-gradient(145deg, rgba(15, 139, 141, 0.1), rgba(44, 167, 123, 0.08));
    border-radius: 14px;
    padding: 14px 14px 12px;
    margin-bottom: 16px;
}

.massrx-hero-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.massrx-hero-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 139, 141, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f7a7b;
    flex-shrink: 0;
}

.massrx-hero-title {
    font-size: 15px;
    line-height: 1.2;
    color: #114746;
    margin-bottom: 6px;
}

.massrx-hero-text {
    font-size: 12px;
    line-height: 1.55;
    color: #4f6e6c;
}

.massrx-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.massrx-step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 38, 0.12);
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    font-size: 12px;
    color: #18403f;
    font-weight: 700;
}

.massrx-flow-arrow {
    color: #4f7c79;
    font-size: 14px;
    font-weight: 700;
}

.massrx-step-icon,
.massrx-title-icon,
.massrx-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex-shrink: 0;
}

.massrx-step-icon svg,
.massrx-title-icon svg,
.massrx-inline-icon svg,
.massrx-hero-icon svg {
    width: 16px;
    height: 16px;
}

.massrx-title-icon svg {
    width: 15px;
    height: 15px;
}

.massrx-step-icon svg path,
.massrx-title-icon svg path,
.massrx-inline-icon svg path,
.massrx-hero-icon svg path {
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.massrx-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(15, 139, 141, 0.1);
    color: #0f7b7c;
}

.massrx-title-icon {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(15, 139, 141, 0.1);
    color: #0f7f80;
}

.massrx-inline-icon {
    width: 15px;
    height: 15px;
    margin-right: 2px;
}

.massrx-log-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.massrx-log-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 38, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: #1d4e4d;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
}

.massrx-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #11b463;
    box-shadow: 0 0 0 3px rgba(17, 180, 99, 0.2);
}

.massrx-log-chip {
    border: 1px solid rgba(16, 39, 38, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #2c5957;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.massrx-log-chip span {
    color: #0f6f7a;
    margin-left: 2px;
}

.massrx-log-chip.active {
    border-color: rgba(15, 139, 141, 0.35);
    background: rgba(15, 139, 141, 0.14);
    color: #0f6268;
}

.massrx-log-filters {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(180px, 1.2fr);
    gap: 8px;
}

.warmup-ai-assist-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.warmup-ai-assist-title {
    font-weight: 700;
    font-size: 14px;
    color: #0e7879;
}

.warmup-ai-assist-text {
    color: #4f6e6c;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.warmup-accounts-shell {
    background: #edf4f2;
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    padding: 10px;
}

.warmup-accounts-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.warmup-accounts-list {
    max-height: 170px;
    overflow-y: auto;
    padding-right: 2px;
}

.warmup-account-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.warmup-account-option:hover {
    border-color: rgba(15, 139, 141, 0.34);
    background: #ffffff;
}

.warmup-account-option.inactive {
    opacity: 0.82;
}

.warmup-account-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
}

.warmup-account-meta {
    min-width: 0;
    flex: 1;
}

.warmup-account-title {
    font-size: 13px;
    font-weight: 700;
    color: #183a38;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warmup-account-sub {
    font-size: 11px;
    color: #647f7e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warmup-empty-note {
    color: var(--text-muted);
    font-size: 13px;
    padding: 10px 2px;
}

.account-transfer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.account-transfer-head-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.account-transfer-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    font-size: 14px;
    font-weight: 700;
}

.account-transfer-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-transfer-head-title {
    font-size: 28px;
    font-weight: 800;
    color: #155d5e;
}

.account-transfer-head-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 139, 141, 0.14);
    color: #156f70;
    font-size: 12px;
    font-weight: 700;
}

.account-transfer-shell {
    background: #f2f9f7;
    border: 1px dashed rgba(15, 139, 141, 0.22);
    border-radius: 14px;
    padding: 12px;
}

.account-transfer-grid-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.account-transfer-panel {
    border: 1px solid #d7e2ee;
    border-radius: 14px;
    background: #f7fbff;
    display: flex;
    flex-direction: column;
    min-height: 330px;
}

.account-transfer-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #dee7f2;
    padding: 10px 12px;
}

.account-transfer-panel-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-transfer-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #28384d;
}

.account-transfer-panel-count {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbe9f8;
    color: #4c7aa8;
    font-weight: 700;
    font-size: 13px;
}

.account-transfer-refresh {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #b8cde4;
    background: #eaf3fc;
    color: #4c7aa8;
    cursor: pointer;
    font-size: 16px;
}

.account-transfer-filter-row {
    padding: 10px 12px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 8px;
}

.account-transfer-actions-row {
    border-top: 1px solid #e3ebf4;
    border-bottom: 1px solid #e3ebf4;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.account-transfer-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #54749b;
}

.account-transfer-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3f8fd9;
}

.account-transfer-list {
    padding: 10px 12px;
    max-height: 185px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.account-transfer-item {
    width: 100%;
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.account-transfer-item:hover {
    border-color: #9fc0df;
    box-shadow: 0 8px 18px rgba(34, 84, 132, 0.08);
}

.account-transfer-item.inactive {
    opacity: 0.8;
}

.account-transfer-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-transfer-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f314a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-transfer-sub {
    font-size: 11px;
    color: #607894;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-transfer-meta {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.account-transfer-pill {
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid #d6e3f0;
    color: #5b7797;
    background: #f0f6fd;
}

.account-transfer-pill.ok {
    color: #1f7a4f;
    border-color: #b5e1cb;
    background: #e9f8f0;
}

.account-transfer-pill.busy {
    color: #b3533a;
    border-color: #f0d0c7;
    background: #fff1ec;
}

.account-transfer-pill.muted {
    color: #6b7e95;
    border-color: #d8e2ec;
    background: #f6f9fc;
}

.account-transfer-score {
    font-size: 11px;
    color: #2d6fae;
    font-weight: 700;
    white-space: nowrap;
}

.account-transfer-empty {
    color: #8a9cb1;
    font-size: 22px;
    text-align: center;
    padding: 44px 12px;
}

.account-transfer-empty-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a6b5c8;
}

.account-transfer-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-transfer-empty-text {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.neuro-commenting-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.neuro-commenting-config {
    width: 100%;
}

.nc-panel {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 14px;
    padding: 10px;
}

.nc-panel-accounts {
    order: -1;
}

.nc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.nc-panel-head-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nc-panel-icon {
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    box-shadow: 0 8px 18px rgba(15, 139, 141, 0.2);
}

.nc-panel-icon-warn {
    background: linear-gradient(135deg, #d27f1f, #f0a54a);
    box-shadow: 0 8px 18px rgba(240, 165, 74, 0.24);
}

.nc-panel-title {
    font-size: 15px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #113433;
}

.nc-panel-chip {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(15, 139, 141, 0.12);
    color: #136d6e;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.nc-guard-card {
    border: 1px solid rgba(15, 139, 141, 0.3);
    border-radius: 12px;
    background: rgba(15, 139, 141, 0.06);
    padding: 10px;
    margin-bottom: 10px;
}

.nc-guard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.nc-guard-title {
    font-size: 14px;
    font-weight: 700;
    color: #134746;
}

.nc-guard-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nc-help-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(15, 139, 141, 0.35);
    background: rgba(15, 139, 141, 0.1);
    color: #0f7d7e;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    position: relative;
    padding: 0;
}

.nc-help-dot:focus-visible {
    outline: 2px solid rgba(15, 139, 141, 0.5);
    outline-offset: 2px;
}

.nc-help-popover {
    position: absolute;
    left: 28px;
    top: -8px;
    width: min(420px, calc(100vw - 80px));
    border-radius: 12px;
    border: 1px solid rgba(16, 39, 38, 0.16);
    background: #ffffff;
    color: #2f4d4b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
    padding: 10px 12px;
    box-shadow: 0 14px 28px rgba(16, 39, 38, 0.18);
    z-index: 18;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.nc-help-dot:hover .nc-help-popover,
.nc-help-dot:focus-visible .nc-help-popover {
    opacity: 1;
    transform: translateY(0);
}

.nc-guard-desc {
    font-size: 12px;
    color: #597573;
    line-height: 1.45;
    margin-top: 2px;
}

.nc-guard-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.nc-guard-mode {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(16, 39, 38, 0.15);
    background: #ffffff;
    color: #2f4d4b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.nc-guard-mode:hover {
    border-color: rgba(15, 139, 141, 0.35);
}

.nc-guard-mode.active {
    border-color: rgba(15, 139, 141, 0.52);
    background: rgba(15, 139, 141, 0.14);
    color: #116769;
    box-shadow: 0 8px 18px rgba(15, 139, 141, 0.16);
}

.nc-mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.nc-mode-card {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    padding: 10px;
}

.nc-mode-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1b4f4e;
    margin-bottom: 8px;
}

.nc-mode-keywords {
    margin-top: 8px;
}

.nc-range-row {
    margin-top: 8px;
}

.nc-range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.nc-range-label {
    font-size: 12px;
    color: #4f6f6d;
    font-weight: 600;
}

.nc-range-value {
    border-radius: 9px;
    padding: 4px 10px;
    background: rgba(15, 139, 141, 0.12);
    color: #0f7a7b;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.nc-range-input {
    width: 100%;
    accent-color: #0f8b8d;
}

.nc-segmented {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.nc-segmented-btn {
    border: 1px dashed rgba(16, 39, 38, 0.24);
    border-radius: 10px;
    min-height: 38px;
    padding: 0 12px;
    background: #ffffff;
    color: #3b5e5d;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.nc-segmented-btn:hover {
    border-color: rgba(15, 139, 141, 0.42);
    color: #125f61;
}

.nc-segmented-btn.active {
    border-style: solid;
    border-color: rgba(15, 139, 141, 0.55);
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.9), rgba(44, 167, 123, 0.9));
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(15, 139, 141, 0.2);
}

.nc-import-actions {
    display: inline-flex;
    align-items: center;
}

.nc-import-note {
    border: 1px solid rgba(16, 39, 38, 0.08);
    border-radius: 10px;
    background: rgba(15, 139, 141, 0.05);
    color: #4f6f6d;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.nc-msg-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nc-msg-group {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    padding: 10px;
}

.nc-msg-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.nc-msg-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #1c4f4e;
}

.nc-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 8px;
}

.nc-role-card {
    position: relative;
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 82px;
    cursor: pointer;
    transition: var(--transition);
}

.nc-role-card:hover {
    border-color: rgba(15, 139, 141, 0.34);
    box-shadow: 0 8px 16px rgba(15, 139, 141, 0.1);
}

.nc-role-card.active {
    border-color: rgba(15, 139, 141, 0.56);
    background: rgba(15, 139, 141, 0.12);
    box-shadow: 0 9px 18px rgba(15, 139, 141, 0.14);
}

.nc-role-card.active::after {
    content: '✓';
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #0f8b8d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 7px 14px rgba(15, 139, 141, 0.24);
}

.nc-role-card-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: #284847;
}

.nc-role-card-subtitle {
    font-size: 11px;
    line-height: 1.4;
    color: #55706f;
    margin-top: -2px;
}

.nc-role-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nc-role-action-btn {
    min-width: 34px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(16, 39, 38, 0.14);
    background: #ffffff;
    color: #385957;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.nc-role-action-btn:hover {
    border-color: rgba(15, 139, 141, 0.36);
    color: #0f7071;
}

.nc-custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.nc-custom-create-card {
    min-height: 72px;
    border-radius: 10px;
    border: 1px dashed rgba(15, 139, 141, 0.35);
    background: rgba(15, 139, 141, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f7374;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.nc-custom-create-card:hover {
    border-color: rgba(15, 139, 141, 0.5);
    background: rgba(15, 139, 141, 0.1);
}

.nc-custom-create-card span {
    font-size: 18px;
    font-weight: 800;
    margin-right: 4px;
}

.nc-custom-card {
    min-height: 72px;
}

.nc-inline-setting {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nc-inline-setting-label {
    font-size: 13px;
    font-weight: 700;
    color: #234947;
}

.nc-inline-setting-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nc-inline-setting-tag {
    font-size: 11px;
    font-weight: 700;
    color: #6a8280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nc-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.nc-toggle-item {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nc-toggle-item-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: #2f514f;
}

.nc-prompt-preview {
    border: 1px solid rgba(15, 139, 141, 0.22);
    border-radius: 10px;
    background: rgba(15, 139, 141, 0.06);
    color: #3c5f5d;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 12px;
    min-height: 42px;
}

.nc-profile-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nc-profile-modal-desc {
    border: 1px solid rgba(15, 139, 141, 0.22);
    border-radius: 12px;
    background: rgba(15, 139, 141, 0.08);
    padding: 14px 16px;
    color: #2f5655;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 600;
}

.nc-profile-modal-section {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    padding: 12px;
}

.nc-profile-modal-label {
    font-size: 14px;
    font-weight: 800;
    color: #1f4a49;
    margin-bottom: 8px;
}

.nc-profile-modal-code {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 14px;
    color: #294847;
    font-size: 19px;
    line-height: 1.6;
    font-family: 'JetBrains Mono', monospace;
}

.nc-profile-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 190px);
    gap: 10px;
}

.nc-profile-meta-item {
    border: 1px dashed rgba(15, 139, 141, 0.34);
    border-radius: 12px;
    background: rgba(15, 139, 141, 0.06);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nc-profile-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 11px;
    font-weight: 800;
    color: #587372;
}

.nc-profile-meta-value {
    color: #117778;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
}

.nc-profile-vars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nc-profile-var-chip {
    border-radius: 10px;
    border: 1px solid rgba(44, 167, 123, 0.35);
    background: rgba(44, 167, 123, 0.12);
    color: #227f61;
    padding: 6px 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.nc-custom-editor-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nc-custom-vars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.nc-custom-var-option {
    border: 1px solid rgba(16, 39, 38, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.84);
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #315251;
    font-size: 13px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.nc-custom-var-option input {
    accent-color: #0f8b8d;
}

.nc-custom-preview-box {
    border: 1px solid rgba(15, 139, 141, 0.22);
    border-radius: 12px;
    background: rgba(15, 139, 141, 0.07);
    padding: 12px;
    color: #365e5d;
    font-size: 13px;
    line-height: 1.5;
}

.nc-prompt-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.nc-prompt-preset {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 10px;
    min-height: 40px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #355755;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.nc-prompt-preset:hover {
    border-color: rgba(15, 139, 141, 0.34);
}

.nc-prompt-preset.active {
    border-color: rgba(15, 139, 141, 0.5);
    background: rgba(15, 139, 141, 0.12);
    color: #0f6768;
}

.nc-mini-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nc-mini-badge {
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 38, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: #5f7674;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
}

.nc-mini-badge-btn {
    cursor: pointer;
    transition: var(--transition);
}

.nc-mini-badge-btn:hover {
    border-color: rgba(15, 139, 141, 0.44);
    color: #0f6768;
}

.nc-mini-badge-btn.active {
    border-color: rgba(15, 139, 141, 0.5);
    background: rgba(15, 139, 141, 0.16);
    color: #0f6768;
}

.nc-run-panel {
    border-color: rgba(16, 39, 38, 0.14);
    background: rgba(255, 255, 255, 0.9);
}

.nc-run-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.nc-stat-card {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nc-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.nc-stat-icon-ok {
    background: linear-gradient(135deg, #1d9a67, #34b47f);
}

.nc-stat-icon-warn {
    background: linear-gradient(135deg, #d68928, #f0a54a);
}

.nc-stat-body {
    min-width: 0;
}

.nc-stat-label {
    font-size: 11px;
    color: #6a8483;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.nc-stat-value {
    font-size: 29px;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
    color: #113a39;
    margin-top: 3px;
}

.nc-config-alert {
    border: 1px solid rgba(193, 66, 63, 0.2);
    border-radius: 12px;
    background: rgba(193, 66, 63, 0.08);
    color: #a53c39;
    padding: 12px;
    margin-bottom: 12px;
}

.nc-config-alert.ok {
    border-color: rgba(22, 122, 83, 0.26);
    background: rgba(22, 122, 83, 0.1);
    color: #196847;
}

.nc-config-alert-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.nc-config-alert-list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.55;
}

.nc-run-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    padding: 12px;
    margin-bottom: 12px;
}

.nc-run-row #neuro-commenting-start-btn {
    min-width: 220px;
}

.nc-run-status {
    font-size: 15px;
    color: #5b7372;
    font-weight: 600;
}

.nc-run-status.running {
    color: #1b6b97;
}

.nc-logs-box {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    overflow: hidden;
}

.nc-logs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(16, 39, 38, 0.08);
    background: rgba(15, 139, 141, 0.05);
    font-size: 14px;
    font-weight: 700;
    color: #1c4f4e;
}

.nchat-collapse-head {
    margin-bottom: 0;
}

.nchat-collapse-toggle {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid rgba(16, 39, 38, 0.14);
    background: rgba(255, 255, 255, 0.84);
    color: #496766;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.nchat-collapse-toggle:hover {
    border-color: rgba(15, 139, 141, 0.34);
    color: #0f7071;
}

.nchat-collapse-body {
    margin-top: 10px;
}

.nchat-collapse-body[hidden] {
    display: none !important;
}

.nchat-history-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.nchat-history-metric-card {
    border: 1px dashed rgba(16, 39, 38, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    padding: 10px 12px;
}

.nchat-history-metric-label {
    font-size: 12px;
    color: #607c7a;
    font-weight: 700;
    margin-bottom: 4px;
}

.nchat-history-metric-value {
    font-size: 36px;
    line-height: 1;
    color: #113b3a;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
}

.nchat-history-generator {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px 12px;
    margin-bottom: 10px;
}

.nchat-history-generator-head {
    margin-bottom: 8px;
}

.nchat-history-generator-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a4e4d;
    margin-bottom: 2px;
}

.nchat-threshold-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.nchat-history-generator-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nchat-history-filters {
    border: 1px dashed rgba(16, 39, 38, 0.2);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1.2fr minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto auto;
    gap: 8px;
    margin-bottom: 10px;
}

.nchat-history-table th:last-child,
.nchat-history-table td:last-child {
    text-align: right;
}

.nchat-history-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 38, 0.14);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

.nchat-history-status.success {
    color: #1a7d54;
    border-color: rgba(26, 125, 84, 0.32);
    background: rgba(26, 125, 84, 0.1);
}

.nchat-history-status.error {
    color: #ab403d;
    border-color: rgba(171, 64, 61, 0.35);
    background: rgba(171, 64, 61, 0.1);
}

.nchat-history-status.attempt {
    color: #1e6d97;
    border-color: rgba(30, 109, 151, 0.3);
    background: rgba(30, 109, 151, 0.1);
}

.nchat-history-status.read {
    color: #0f7d7e;
    border-color: rgba(15, 125, 126, 0.28);
    background: rgba(15, 125, 126, 0.1);
}

.nchat-history-status.info {
    color: #5f7270;
    border-color: rgba(95, 114, 112, 0.3);
    background: rgba(95, 114, 112, 0.1);
}

.nchat-history-type {
    display: inline-block;
    margin-left: 6px;
    color: #6a8280;
    font-size: 11px;
    font-weight: 700;
}

.nchat-history-pagination {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.nchat-history-pagination span {
    min-width: 64px;
    text-align: center;
    color: #5d7674;
    font-size: 12px;
    font-weight: 700;
}

.nchat-blacklist-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

@media (max-width: 1100px) {
    .nchat-history-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nchat-history-filters {
        grid-template-columns: 1fr 1fr;
    }
}

.warmup-pro-shell {
    display: grid;
    gap: 14px;
}

.warmup-pro-header {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(15, 139, 141, 0.1), rgba(44, 167, 123, 0.08), rgba(240, 165, 74, 0.08));
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.warmup-pro-head-main {
    min-width: 0;
}

.warmup-pro-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.03em;
    color: #103130;
}

.warmup-pro-subtitle {
    margin: 6px 0 0;
    color: #4d6d6b;
    font-size: 13px;
    line-height: 1.55;
    max-width: 880px;
}

.warmup-pro-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.warmup-pro-icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(15, 139, 141, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #0f7e80;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.warmup-pro-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.warmup-pro-icon-btn:hover {
    background: #ffffff;
    border-color: rgba(15, 139, 141, 0.42);
    transform: translateY(-1px);
}

.warmup-pro-card {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 12px 32px rgba(15, 45, 44, 0.06);
    overflow: hidden;
}

.warmup-pro-card-head {
    border-bottom: 1px solid rgba(16, 39, 38, 0.1);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.warmup-pro-card-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.warmup-pro-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #1a3837;
}

.warmup-pro-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(15, 139, 141, 0.95), rgba(44, 167, 123, 0.95));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(15, 139, 141, 0.22);
}

.warmup-pro-card-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.warmup-pro-card-icon-live {
    background: linear-gradient(145deg, rgba(231, 119, 56, 0.94), rgba(245, 177, 80, 0.94));
    box-shadow: 0 8px 16px rgba(186, 106, 16, 0.28);
}

.warmup-pro-card-chip {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 139, 141, 0.25);
    background: rgba(15, 139, 141, 0.1);
    color: #0f797b;
    font-size: 12px;
    font-weight: 700;
}

.warmup-pro-soft-chip {
    border-radius: 999px;
    border: 1px solid rgba(16, 39, 38, 0.14);
    background: rgba(16, 39, 38, 0.07);
    color: #2f5554;
    font-size: 12px;
    padding: 1px 8px;
}

.warmup-pro-live-pill {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #18844f;
    border: 1px solid rgba(24, 132, 79, 0.28);
    background: rgba(24, 132, 79, 0.12);
}

.warmup-pro-card-body {
    padding: 12px;
}

.warmup-pro-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.warmup-pro-settings-grid:last-child {
    margin-bottom: 0;
}

.warmup-pro-setting-box {
    border: 1px solid rgba(16, 39, 38, 0.11);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
}

.warmup-pro-setting-title {
    font-size: 15px;
    font-weight: 800;
    color: #1b3b3a;
    margin-bottom: 10px;
}

.warmup-pro-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.warmup-pro-label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: #4f6d6c;
}

.warmup-pro-label .form-input,
.warmup-pro-label .form-select {
    min-height: 38px;
}

.warmup-pro-toggle {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #2d4f4d;
    font-size: 13px;
    line-height: 1.4;
}

.warmup-pro-toggle .switch {
    margin-left: auto;
}

.warmup-pro-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.warmup-pro-mode-btn {
    border: 1px solid rgba(16, 39, 38, 0.14);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.84);
    color: #2b4e4d;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 74px;
}

.warmup-pro-mode-btn:hover {
    border-color: rgba(15, 139, 141, 0.36);
    transform: translateY(-1px);
}

.warmup-pro-mode-btn.active {
    border-color: rgba(15, 139, 141, 0.52);
    background: rgba(15, 139, 141, 0.1);
    box-shadow: inset 0 0 0 1px rgba(15, 139, 141, 0.2);
}

.warmup-pro-mode-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #184241;
}

.warmup-pro-mode-sub {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: #577775;
}

.warmup-pro-limits-grid .warmup-pro-label {
    min-width: 0;
}

.warmup-pro-duration-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.warmup-pro-duration-chip {
    border: 1px solid rgba(16, 39, 38, 0.16);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.82);
    color: #325251;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.warmup-pro-duration-chip:hover {
    border-color: rgba(15, 139, 141, 0.35);
}

.warmup-pro-duration-chip.active {
    border-color: rgba(15, 139, 141, 0.46);
    background: rgba(15, 139, 141, 0.14);
    color: #0f7576;
}

.warmup-pro-custom-duration {
    display: grid;
    grid-template-columns: auto minmax(92px, 120px) minmax(88px, 110px);
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #4e6f6d;
}

.warmup-pro-custom-duration .form-input,
.warmup-pro-custom-duration .form-select {
    min-height: 36px;
}

.warmup-pro-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.warmup-pro-action-item {
    border: 1px solid rgba(16, 39, 38, 0.14);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 252, 250, 0.96), rgba(242, 248, 246, 0.96));
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    font-size: 14px;
    color: #2c4d4c;
    transition: var(--transition);
}

.warmup-pro-action-item:hover {
    border-color: rgba(15, 139, 141, 0.28);
    box-shadow: 0 8px 20px rgba(15, 139, 141, 0.08);
    transform: translateY(-1px);
}

.warmup-pro-action-item > span {
    line-height: 1.25;
    font-weight: 600;
    color: #355958;
}

/* Compact and clean toggles only for warmup action cards */
.warmup-pro-action-item .switch {
    width: 34px;
    height: 18px;
    flex: 0 0 auto;
}

.warmup-pro-action-item .slider {
    background: #c6d8d4;
    border: 1px solid rgba(86, 120, 118, 0.3);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.warmup-pro-action-item .slider:before {
    width: 14px;
    height: 14px;
    left: 3px;
    bottom: 1px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.warmup-pro-action-item .switch input:checked + .slider {
    background: linear-gradient(135deg, #0f8b8d, #2ca77b);
    border-color: rgba(15, 139, 141, 0.42);
}

.warmup-pro-action-item .switch input:checked + .slider:before {
    transform: translateX(16px);
}

.warmup-pro-action-item .switch input:focus-visible + .slider {
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(15, 139, 141, 0.2);
}

.warmup-pro-target-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.warmup-pro-target-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.warmup-pro-target-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(16, 39, 38, 0.15);
    border-radius: 999px;
    background: rgba(16, 39, 38, 0.08);
    color: #2f5050;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warmup-pro-live-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.warmup-pro-live-stat {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    min-width: 0;
}

.warmup-pro-live-stat-label {
    display: block;
    color: #678483;
    font-size: 11px;
    margin-bottom: 4px;
}

.warmup-pro-live-stat strong {
    color: #1d4645;
    font-size: 20px;
    line-height: 1;
}

.warmup-pro-issues {
    border: 1px solid rgba(193, 66, 63, 0.22);
    border-radius: 12px;
    background: rgba(193, 66, 63, 0.08);
    color: #b04e4b;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.warmup-pro-start-errors {
    border: 1px solid rgba(193, 66, 63, 0.3);
    border-radius: 12px;
    background: rgba(193, 66, 63, 0.1);
    color: #8f3d3b;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 10px;
}

.warmup-pro-start-errors strong {
    display: block;
    color: #7f2f2c;
    margin-bottom: 6px;
}

.warmup-pro-start-errors .warmup-pro-start-error-line {
    margin: 4px 0;
}

.warmup-pro-run-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.warmup-pro-run-row .btn {
    min-width: 150px;
}

.warmup-pro-progress-box {
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    padding: 10px;
    margin-bottom: 12px;
}

.warmup-pro-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #4b6e6c;
    margin-bottom: 8px;
}

.warmup-pro-progress-head strong {
    color: #155d5e;
    font-size: 18px;
}

.warmup-pro-progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(16, 39, 38, 0.12);
    overflow: hidden;
}

.warmup-pro-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f8b8d, #2ca77b);
    transition: width 0.35s ease;
}

.warmup-pro-progress-meta {
    margin-top: 8px;
    color: #607f7d;
    font-size: 12px;
}

.warmup-pro-logs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.warmup-pro-log-levels {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.warmup-pro-log-chip {
    border: 1px solid rgba(16, 39, 38, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #4a6a69;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.warmup-pro-log-chip.active {
    color: #ffffff;
    border-color: rgba(15, 139, 141, 0.52);
    background: linear-gradient(140deg, rgba(15, 139, 141, 1), rgba(44, 167, 123, 1));
}

.warmup-pro-log-filters {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.warmup-pro-log-filters .form-select {
    width: 170px;
}

.warmup-pro-log-filters .form-input {
    width: 220px;
}

.warmup-pro-logs.warmup-logs-console {
    height: 280px;
    border-radius: 12px;
    border: 1px solid rgba(16, 39, 38, 0.12);
}

.warmup-rules-summary {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(16, 39, 38, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.warmup-rules-line {
    font-size: 12px;
    color: #486564;
    line-height: 1.45;
}

.warmup-rules-line strong {
    color: #155d5e;
}

.warmup-logs-console {
    background: #edf4f2;
    color: #244342;
    padding: 10px;
    font-size: 12px;
    height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
}

.warmup-log-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid rgba(16, 39, 38, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    margin-bottom: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.warmup-log-time {
    color: #5e7776;
    font-family: 'JetBrains Mono', monospace;
    min-width: 72px;
}

.warmup-log-account {
    color: #1f5d5d;
    font-weight: 700;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warmup-log-type {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid rgba(16, 39, 38, 0.16);
    border-radius: 999px;
    padding: 2px 8px;
}

.warmup-log-type.error { color: #a93937; border-color: rgba(193, 66, 63, 0.28); background: rgba(193, 66, 63, 0.1); }
.warmup-log-type.info { color: #205f87; border-color: rgba(33, 111, 159, 0.24); background: rgba(33, 111, 159, 0.1); }
.warmup-log-type.warning { color: #8f5a10; border-color: rgba(186, 129, 34, 0.3); background: rgba(186, 129, 34, 0.14); }
.warmup-log-type.sleep { color: #6a7070; border-color: rgba(106, 112, 112, 0.2); background: rgba(106, 112, 112, 0.09); }
.warmup-log-type.subscribe,
.warmup-log-type.react,
.warmup-log-type.read,
.warmup-log-type.neuro_chat,
.warmup-log-type.success,
.warmup-log-type.chat {
    color: #166f4d;
    border-color: rgba(22, 122, 83, 0.24);
    background: rgba(22, 122, 83, 0.1);
}
.warmup-log-type.typing,
.warmup-log-type.thread_status,
.warmup-log-type.threads_distribution,
.warmup-log-type.debug {
    color: #35537b;
    border-color: rgba(53, 83, 123, 0.24);
    background: rgba(53, 83, 123, 0.1);
}

.warmup-log-text {
    color: #2d4c4b;
    display: block;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#section-web-chats .warmup-log-row {
    align-items: flex-start;
}

#section-web-chats .warmup-log-text {
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.warmup-logs-placeholder {
    color: #5f8f7f;
    padding: 8px 4px;
}

.neuro-strategy-help {
    background: rgba(15, 139, 141, 0.08);
    border: 1px solid rgba(15, 139, 141, 0.24);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.neuro-strategy-help-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f7f80;
    margin-bottom: 8px;
}

.neuro-strategy-help-row {
    border-top: 1px solid rgba(16, 39, 38, 0.1);
    padding-top: 8px;
    margin-top: 8px;
}

.neuro-strategy-help-name {
    font-size: 12px;
    font-weight: 700;
    color: #1b4f4e;
    margin-bottom: 2px;
}

.neuro-strategy-help-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #4f6e6c;
}

.neuro-strategy-help-note {
    margin-top: 10px;
    font-size: 11px;
    color: #0f6f70;
    font-weight: 600;
}

.neuro-dialog-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.neuro-dialog-style-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(16, 39, 38, 0.12);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.neuro-dialog-style-card strong {
    font-size: 12px;
    color: #165756;
}

.neuro-dialog-style-card span {
    font-size: 11px;
    color: #4f6e6c;
    line-height: 1.45;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #bfd4cf;
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: var(--transition);
}

input:checked + .slider {
    background: #0f8b8d;
}

.switch input:focus-visible + .slider {
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.2);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 999px;
}

.slider.round:before {
    border-radius: 999px;
}

/* ─── AI Shield + Channel Map ────────────────────────────── */
.shield-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shield-inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.shield-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.shield-scope-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    font-size: 13px;
}

.shield-scope-item input {
    accent-color: var(--accent-primary);
}

.shield-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.shield-check input {
    accent-color: var(--accent-primary);
}

.shield-sim-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.shield-sim-result.allow {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #9ce7bd;
}

.shield-sim-result.deny {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f6b2b2;
}

.shield-risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.shield-risk-pill.low {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.shield-risk-pill.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}

.shield-risk-pill.high {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.shield-state-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shield-state-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.shield-state-tag.blocked {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.38);
}

.shield-state-tag.quarantine {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.35);
}

.shield-state-tag.ok {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.26);
}

.channel-map-canvas {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background:
        radial-gradient(circle at 20% 12%, rgba(99, 102, 241, 0.2), transparent 35%),
        radial-gradient(circle at 84% 88%, rgba(34, 197, 94, 0.12), transparent 30%),
        rgba(10, 14, 26, 0.65);
    overflow: hidden;
}

#channel-map-svg {
    width: 100%;
    height: 460px;
    display: block;
}

.channel-map-empty {
    fill: #64748b;
    font-size: 15px;
    text-anchor: middle;
}

.channel-map-node-text {
    fill: #dbe4f5;
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
}

@media (max-width: 1100px) {
    .chat-layout {
        height: auto;
        min-height: 600px;
    }
    .chat-accounts {
        width: 200px;
    }
    .chat-dialogs {
        width: 270px;
    }
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar {
        transform: translateX(-102%);
        z-index: 110;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .header {
        padding: 0 16px;
    }
    .content {
        padding: 20px 14px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .shield-inline-fields {
        grid-template-columns: 1fr;
    }
    .chat-layout {
        flex-direction: column;
        min-height: 70vh;
    }
    .chat-accounts,
    .chat-dialogs,
    .chat-main {
        width: 100%;
        min-height: 210px;
        border-right: none;
        border-bottom: 1px solid rgba(16, 39, 38, 0.08);
    }

    .tg-guide-hero-grid {
        grid-template-columns: 1fr;
    }

    .tg-guide-hero-visual {
        min-height: 150px;
    }

    .tg-guide-flow {
        flex-direction: column;
    }

    .tg-guide-flow-arrow,
    .tg-cycle-arrow,
    .tg-flood-arrow {
        transform: rotate(90deg);
        margin: 2px auto;
    }

    .tg-flood-flow {
        flex-direction: column;
    }

    .massrx-flow {
        flex-direction: column;
        align-items: flex-start;
    }

    .massrx-flow-arrow {
        transform: rotate(90deg);
        margin-left: 4px;
    }

    .massrx-log-filters {
        grid-template-columns: 1fr;
    }

    .account-transfer-grid-panels {
        grid-template-columns: 1fr;
    }

    .account-transfer-filter-row {
        grid-template-columns: 1fr;
    }

    .nc-mode-grid {
        grid-template-columns: 1fr;
    }

    .nc-guard-modes {
        grid-template-columns: 1fr;
    }

    .nc-role-grid,
    .nc-custom-grid {
        grid-template-columns: 1fr;
    }

    .nc-inline-setting {
        flex-direction: column;
        align-items: flex-start;
    }

    .nc-toggle-grid {
        grid-template-columns: 1fr;
    }

    .nc-run-stats {
        grid-template-columns: 1fr 1fr;
    }

    .nc-run-row {
        flex-direction: column;
        align-items: stretch;
    }

    .nc-run-row #neuro-commenting-start-btn {
        width: 100%;
        min-width: 0;
    }

    .nc-profile-modal-desc {
        font-size: 17px;
    }

    .nc-profile-modal-code {
        font-size: 14px;
    }

    .nc-profile-meta-value {
        font-size: 28px;
    }

    .nc-profile-var-chip {
        font-size: 13px;
    }

    .account-transfer-head-title {
        font-size: 24px;
    }

    .account-manager-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-manager-hero-badges {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .account-manager-grid {
        grid-template-columns: 1fr;
    }

    .account-health-layout {
        grid-template-columns: 1fr;
    }

    .account-health-card {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .header-title {
        font-size: 20px;
    }
    .btn {
        font-size: 13px;
    }
    .panel-header,
    .panel-body {
        padding: 16px;
    }
    .toast {
        min-width: 0;
        width: calc(100vw - 24px);
    }

    .tg-guide-hero {
        padding: 18px 16px;
    }

    .tg-guide-hero-title {
        font-size: 24px;
    }

    .tg-guide-tab {
        width: 100%;
        justify-content: flex-start;
    }

    .tg-limit-row {
        grid-template-columns: 1fr auto;
    }

    .warmup-log-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .warmup-log-time {
        min-width: 0;
    }

    .warmup-log-account {
        max-width: 100%;
    }

    .warmup-log-text {
        white-space: normal;
    }

    .warmup-pro-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .warmup-pro-title {
        font-size: 24px;
    }

    .warmup-pro-settings-grid {
        grid-template-columns: 1fr;
    }

    .warmup-pro-inline-grid {
        grid-template-columns: 1fr;
    }

    .warmup-pro-mode-grid {
        grid-template-columns: 1fr;
    }

    .warmup-pro-actions-grid {
        grid-template-columns: 1fr;
    }

    .warmup-pro-custom-duration {
        grid-template-columns: 1fr;
    }

    .warmup-pro-live-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .warmup-pro-log-filters {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .warmup-pro-log-filters .form-select,
    .warmup-pro-log-filters .form-input {
        width: 100%;
    }

    .account-manager-modal {
        width: calc(100vw - 8px);
        max-width: calc(100vw - 8px);
        height: calc(100dvh - 8px);
        max-height: calc(100dvh - 8px);
        min-height: calc(100dvh - 8px);
    }

    #modal-account-manager {
        padding: 4px;
    }

    .account-manager-name {
        font-size: 22px;
    }

    .account-manager-subline {
        flex-wrap: wrap;
    }

    .account-manager-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-manager-tab {
        width: 100%;
    }

    .account-manager-actions-grid {
        grid-template-columns: 1fr;
    }

    .account-health-summary-wrap {
        flex-direction: column;
        min-height: 0;
        padding: 6px 0;
    }

    .account-health-score-head {
        align-items: center;
        flex-wrap: wrap;
    }

    .account-health-score-value {
        font-size: 34px;
    }

    .account-health-score-value span {
        font-size: 18px;
    }

    .account-health-factor-title {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

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

.subscription-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-panel);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscription-card.active {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.18) inset;
}

.subscription-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.subscription-name {
    font-size: 14px;
    font-weight: 700;
}

.subscription-price {
    font-size: 20px;
    font-weight: 700;
}

.subscription-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.45;
    flex: 1;
}

.subscription-meter {
    width: 130px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.2);
}

.subscription-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--success);
}

.subscription-meter span.running {
    background: var(--warning);
}

.subscription-meter span.failed {
    background: var(--danger);
}

.parsing-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.accounts-kpi-wrap {
    padding: 10px 18px 8px;
    border-bottom: 1px solid rgba(16, 39, 38, 0.08);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(15, 139, 141, 0.08) 0%, rgba(15, 139, 141, 0) 58%),
        radial-gradient(90% 70% at 100% 0%, rgba(44, 167, 123, 0.09) 0%, rgba(44, 167, 123, 0) 60%);
}

.accounts-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.accounts-kpi-card {
    min-height: 54px;
    border-radius: 12px;
    border: 1px dashed rgba(16, 39, 38, 0.2);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(16, 39, 38, 0.07);
    padding: 6px 10px;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    grid-template-areas:
        "icon . value"
        "title title title"
        "hint hint hint";
    gap: 2px 8px;
    transition: var(--transition);
}

.accounts-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 139, 141, 0.45);
    box-shadow: 0 12px 24px rgba(15, 139, 141, 0.14);
}

.accounts-kpi-icon {
    grid-area: icon;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.accounts-kpi-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.accounts-kpi-value {
    grid-area: value;
    justify-self: end;
    align-self: center;
    margin-top: 0;
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #102726;
}

.accounts-kpi-title {
    grid-area: title;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #5f7473;
}

.accounts-kpi-hint {
    grid-area: hint;
    margin-top: 0;
    font-size: 10px;
    line-height: 1.15;
    color: #6f8785;
}

.accounts-kpi-card.active .accounts-kpi-icon {
    background: rgba(34, 197, 94, 0.16);
    color: #168a45;
}

.accounts-kpi-card.working .accounts-kpi-icon {
    background: rgba(59, 130, 246, 0.16);
    color: #2269b5;
}

.accounts-kpi-card.quarantine .accounts-kpi-icon {
    background: rgba(236, 72, 153, 0.16);
    color: #b52f76;
}

.accounts-kpi-card.invalid .accounts-kpi-icon {
    background: rgba(239, 68, 68, 0.16);
    color: #bf3a3a;
}

.accounts-kpi-card.frozen .accounts-kpi-icon {
    background: rgba(79, 70, 229, 0.16);
    color: #4d46b3;
}

.accounts-kpi-card.reauth .accounts-kpi-icon {
    background: rgba(249, 115, 22, 0.16);
    color: #bd5d1e;
}

@media (max-width: 1400px) {
    .accounts-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .accounts-kpi-wrap {
        padding: 10px 12px 8px;
    }

    .accounts-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .accounts-kpi-grid {
        grid-template-columns: 1fr;
    }

    .accounts-kpi-value {
        font-size: 21px;
    }
}
