:root {
    --bg-main: #0d1117;
    --bg-card: #161b22;
    --bg-input: #0d1117;
    --bg-hover: #21262d;
    --border-color: #30363d;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --text-dim: #484f58;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-purple: #d2a8ff;
    --accent-orange: #f0883e;
    --accent-red: #f85149;
    --primary-btn: #238636;
    --primary-btn-hover: #2ea043;
    --shadow-sm: 0 1px 0 rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --radius-md: 10px;
    --radius-sm: 6px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: #79c0ff; text-decoration: none; }

/* Auth Layout */
.auth-split-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    width: 100%;
}

.auth-info-side {
    flex: 1.2;
    padding: 40px;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.auth-form-side {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-card);
}

.auth-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 15px;
}

/* Forms */
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field input, .role-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus, .role-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary-btn);
    color: #fff;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background: var(--primary-btn-hover);
    transform: translateY(-1px);
}

.btn-google {
    background: #fff;
    color: #1f2328;
    border: 1px solid #d0d7de;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.btn-google:hover {
    background: #f6f8fa;
    border-color: #afb8c1;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-sm:hover {
    background: #30363d;
    color: #fff;
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    height: 64px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Dashboard & Stats */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--text-dim);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}

/* Remote Chat Component */
.remote-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: var(--bg-main);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
}

.chat-bubble.user {
    align-self: flex-end;
    background: #1f6feb;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 16px 24px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.chat-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 15px;
}

/* Badges */
.role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Node List */
.mini-node-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.status-dot.offline { background: var(--text-dim); }

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.pricing-card .price {
    font-size: 36px;
    font-weight: 800;
    margin: 16px 0;
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
td { padding: 14px 16px; border-bottom: 1px solid var(--bg-hover); font-size: 14px; }

@media (max-width: 900px) {
    .auth-split-layout { flex-direction: column; }
    .auth-info-side { border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* Login info side */
.info-content { max-width: 560px; }
.info-content h2 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.info-content > p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
.info-content h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 16px; }

.info-feature-list { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.info-feature-list li { display: flex; align-items: flex-start; gap: 14px; }
.info-feature-list .icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.info-feature-list h4 { color: #fff; font-size: 14px; margin-bottom: 4px; }
.info-feature-list p { color: var(--text-muted); font-size: 13px; margin: 0; line-height: 1.5; }

.download-section { margin-bottom: 24px; }
.pricing-card.free-download { text-align: left; padding: 24px; }
.pricing-card.free-download ul { list-style: none; padding: 0; margin: 12px 0 16px; color: var(--text-muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.pricing-card.free-download ul li::before { content: "✓ "; color: var(--accent-green); }
.pricing-card.free-download h4 { color: #fff; font-size: 16px; margin-bottom: 2px; }
.pricing-card.free-download .price { font-size: 28px; color: var(--text-muted); margin: 8px 0; }
.pricing-category { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.install-commands { margin-top: 8px; }

.pricing-section .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.pricing-section .pricing-card { padding: 20px; text-align: left; }
.pricing-section .pricing-card h4 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.pricing-section .pricing-card .price { font-size: 24px; font-weight: 800; color: #58a6ff; margin: 8px 0; }
.pricing-section .pricing-card .price small { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.pricing-section .pricing-card ul { list-style: none; padding: 0; margin: 8px 0 0; color: var(--text-muted); font-size: 12px; display: flex; flex-direction: column; gap: 5px; }
.pricing-section .pricing-card ul li::before { content: "✓ "; color: var(--accent-green); }
.pricing-card.highlight { border-color: #1f6feb; background: linear-gradient(#161b22, #0d1117); }
.pricing-card.dimmed { opacity: 0.6; }
