        :root {
            --bg-primary: #0a0a0f;
            --bg-secondary: #12121a;
            --bg-card: #16161f;
            --accent: #6366f1;
            --accent-light: #818cf8;
            --text-primary: #f4f4f5;
            --text-secondary: #a1a1aa;
            --text-muted: #71717a;
            --border: rgba(255, 255, 255, 0.06);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
        }

        .topbar {
            padding: 1.25rem 3rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.4rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            color: var(--text-primary);
            text-decoration: none;
        }

        .logo span { color: var(--accent-light); }

        .topbar-user {
            display: flex;
            align-items: center;
            gap: 1rem;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .topbar-link {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .topbar-link:hover { color: var(--accent-light); }

        .btn-primary {
            background: linear-gradient(135deg, var(--accent), #8b5cf6);
            color: white;
            padding: 0.7rem 1.6rem;
            border-radius: 999px;
            font-size: 0.9rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            display: inline-block;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-primary);
            padding: 0.7rem 1.6rem;
            border-radius: 999px;
            font-size: 0.9rem;
            font-weight: 500;
            text-decoration: none;
            border: 1px solid var(--border);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .btn-secondary:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.08);
        }

        .btn-danger {
            background: transparent;
            color: #f87171;
            padding: 0.35rem 0.9rem;
            border-radius: 999px;
            font-size: 0.8rem;
            font-weight: 500;
            border: 1px solid rgba(248, 113, 113, 0.3);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-danger:hover { background: rgba(248, 113, 113, 0.1); }

        .page {
            max-width: 960px;
            margin: 0 auto;
            padding: 2rem 1.5rem 4rem;
        }

        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 2.5rem;
        }

        .auth-wrap { max-width: 440px; margin: 3rem auto 0; }

        h1.page-title {
            font-size: 1.8rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            margin-bottom: 0.5rem;
        }

        .subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.75rem; }

        form.auth-form, form.inline-form { display: flex; flex-direction: column; gap: 1rem; }

        label {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.35rem;
            display: block;
        }

        input[type="email"], input[type="password"], input[type="url"], input[type="text"], textarea, select {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 0.7rem 1rem;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }

        .field-error { color: #f87171; font-size: 0.8rem; margin-top: 0.3rem; }

        .form-errors {
            background: rgba(248, 113, 113, 0.08);
            border: 1px solid rgba(248, 113, 113, 0.25);
            color: #fca5a5;
            border-radius: 10px;
            padding: 0.7rem 1rem;
            font-size: 0.85rem;
        }

        .messages { list-style: none; margin-bottom: 1rem; }
        .messages li {
            background: rgba(99, 102, 241, 0.1);
            border: 1px solid rgba(99, 102, 241, 0.25);
            color: var(--accent-light);
            border-radius: 10px;
            padding: 0.7rem 1rem;
            font-size: 0.85rem;
        }

        .switch-link { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-secondary); }
        a { color: var(--accent-light); }

        table.accounts { width: 100%; border-collapse: collapse; }
        .accounts th {
            text-align: left;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            padding: 0.6rem 1rem;
        }
        .accounts td {
            padding: 0.9rem 1rem;
            border-top: 1px solid var(--border);
            font-size: 0.95rem;
        }
        .platform-badge {
            display: inline-block;
            background: rgba(99, 102, 241, 0.1);
            border: 1px solid rgba(99, 102, 241, 0.2);
            color: var(--accent-light);
            padding: 0.2rem 0.7rem;
            border-radius: 999px;
            font-size: 0.8rem;
        }
        .empty-state { text-align: center; color: var(--text-muted); padding: 2rem 0; }

        .steps { list-style: none; display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }
        .steps li { flex: 1; min-width: 0; }
        .step-bar {
            display: block;
            height: 4px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
        }
        .steps li.done .step-bar { background: var(--accent); }
        .steps li.current .step-bar {
            background: linear-gradient(90deg, var(--accent), var(--accent-light));
        }
        .step-label {
            display: block;
            margin-top: 0.5rem;
            font-size: 0.72rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .steps li.done .step-label,
        .steps li.current .step-label { color: var(--accent-light); }
        .step-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; }

        .checkbox-field {
            display: flex;
            gap: 0.75rem;
            align-items: flex-start;
            background: rgba(99, 102, 241, 0.06);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 0.9rem 1rem;
        }
        .checkbox-field label {
            margin-bottom: 0;
            flex: 1;
            font-size: 0.85rem;
            line-height: 1.5;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .checkbox-field input[type="checkbox"] {
            width: 1.15rem;
            height: 1.15rem;
            margin-top: 0.2rem;
            flex-shrink: 0;
            accent-color: var(--accent);
        }

        .banner {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            background: rgba(99, 102, 241, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.3);
            border-radius: 12px;
            padding: 0.9rem 1.2rem;
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
        }

        .status-badge {
            display: inline-block;
            padding: 0.2rem 0.7rem;
            border-radius: 999px;
            font-size: 0.8rem;
        }
        .status-badge.connected {
            background: rgba(52, 211, 153, 0.1);
            border: 1px solid rgba(52, 211, 153, 0.3);
            color: #34d399;
        }
        .status-badge.not-connected {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border);
            color: var(--text-muted);
        }

        .section-title {
            font-size: 1.05rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .channels { margin-bottom: 1.75rem; }

        .channel-row {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1rem;
            background: var(--bg-card);
            margin-bottom: 0.75rem;
        }

        .channel-fields {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.75rem;
        }

        .channel-row .field { margin-bottom: 0; }

        .delete-label {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.4rem;
            margin-top: 0.75rem;
            font-size: 0.85rem;
            color: var(--text-muted);
            cursor: pointer;
        }

        .delete-label input[type="checkbox"] {
            width: 1rem;
            height: 1rem;
            accent-color: var(--accent);
        }

        .field-help {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin: -0.5rem 0 0.75rem;
        }

        .add-channel-btn { margin-top: 0.25rem; }

        .row-remove {
            background: none;
            border: none;
            display: block;
            width: max-content;
            margin-top: 0.75rem;
            margin-left: auto;
            font-size: 0.85rem;
            color: var(--text-muted);
            cursor: pointer;
        }

        .row-remove:hover { color: #f87171; }

        .form-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 0.25rem;
        }

        .consent-label {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .consent-label input[type="checkbox"] {
            width: 1rem;
            height: 1rem;
            margin-top: 0.1rem;
            accent-color: var(--accent);
        }

        /* Hamburger */
        .hamburger {
            display: none;
            flex-direction: column;
            justify-content: space-between;
            width: 28px;
            height: 20px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        .hamburger span {
            display: block;
            height: 2px;
            width: 100%;
            background: var(--text-primary);
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .hamburger.active span:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
        }

        /* Mobile Menu */
        .mobile-menu-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

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

        .mobile-menu {
            position: fixed;
            top: 0;
            right: -320px;
            width: 300px;
            max-width: 85vw;
            height: 100vh;
            background: var(--bg-secondary);
            border-left: 1px solid var(--border);
            z-index: 999;
            padding: 4rem 2rem 2rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            transition: right 0.3s ease;
        }

        .mobile-menu.active {
            right: 0;
        }

        .close-btn {
            position: absolute;
            top: 1.25rem;
            right: 1.25rem;
            width: 36px;
            height: 36px;
            background: none;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-btn:hover {
            border-color: var(--accent);
        }

        .mobile-menu a.topbar-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 1rem;
            padding: 0.75rem 0;
            transition: color 0.2s;
        }

        .mobile-menu a.topbar-link:hover {
            color: var(--accent-light);
        }

        .mobile-menu-divider {
            height: 1px;
            background: var(--border);
            margin: 0.5rem 0;
        }

        .user-email {
            font-size: 0.85rem;
            color: var(--text-muted);
            padding: 0.25rem 0;
            word-break: break-all;
        }

        /* Responsive */
        @media (max-width: 968px) {
            .topbar { padding: 1rem 1.5rem; }
            .card { padding: 1.5rem; }

            .hamburger { display: flex; }

            .topbar-user { display: none; }
        }
    
