:root {
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-terminal: #0d0d0d;
    --green: #a3e635;
    --green-dark: #84cc16;
    --green-glow: rgba(163, 230, 53, 0.3);
    --red: #ef4444;
    --text: #e5e5e5;
    --text-muted: #a3a3a3;
    --border: #262626;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.5;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

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

.badge-online {
    background: rgba(163,230,53,0.15);
    color: var(--green);
    border: 1px solid var(--green);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-label {
    font-family: var(--font-mono);
    color: var(--green);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero h1 .highlight {
    color: var(--green);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.tag {
    background: rgba(163,230,53,0.1);
    border: 1px solid rgba(163,230,53,0.3);
    color: var(--green);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* Terminal */
.terminal-wrapper {
    max-width: 960px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.terminal {
    background: var(--bg-terminal);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.5), 0 0 20px var(--green-glow);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.terminal-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-off { color: var(--red); }
.status-on { color: var(--green); }

.terminal-ticker {
    display: flex;
    gap: 1.25rem;
    padding: 0.5rem 1rem;
    background: #111;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    overflow-x: auto;
    white-space: nowrap;
}

.ticker-item { color: var(--text-muted); }
.ticker-item .up { color: #22c55e; }
.ticker-item .down { color: #ef4444; }

.terminal-body {
    display: grid;
    grid-template-columns: 1fr 200px;
    min-height: 320px;
}

@media (max-width: 700px) {
    .terminal-body { grid-template-columns: 1fr; }
}

.terminal-log {
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    overflow-y: auto;
    max-height: 340px;
    line-height: 1.6;
}

.log-line {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2px;
}

.log-time { color: #525252; min-width: 55px; }
.log-type {
    font-weight: 700;
    min-width: 40px;
}
.type-COPY { color: #a3e635; }
.type-SCAN { color: #60a5fa; }
.type-SINAL { color: #fbbf24; }
.type-GRID { color: #c084fc; }
.type-SYS { color: #94a3b8; }

.log-msg { color: #d4d4d4; flex: 1; }

.terminal-sidebar {
    border-left: 1px solid var(--border);
    padding: 1rem;
    background: #0f0f0f;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.sidebar-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sidebar-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.sidebar-value.green { color: var(--green); }

.terminal-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 1rem;
    background: #1a1a1a;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Overlay when off */
.terminal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0 0 12px 12px;
}

.terminal-relative { position: relative; }

.power-icon {
    width: 48px;
    height: 48px;
    border: 2px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--red);
    font-size: 1.5rem;
}

/* Steps / Cards */
.steps {
 gridd: 1fr;
    max-width: 520px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s;
}

.step-card.active {
    border-color: var(--green);
    box-shadow: 0 0 20px var(--green-glow);
}

.step-card.locked {
    opacity: 0.6;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.step-num {
    background: var(--green);
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.step-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.form-control {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--green);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--green);
    color: #000;
    width: 100%;
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--green);
    color: var(--green);
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

/* FAQ */
.faq {
    max-width: 600px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.faq h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.faq-q {
    padding: 0.9rem 1rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.faq-a {
    padding: 0 1rem 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: none;
}

.faq-item.open .faq-a { display: block; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Dashboard layout */
.dash-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

@media (max-width: 800px) {
    .dash-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

.sidebar {
    background: #0f0f0f;
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    transition: all 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(163,230,53,0.1);
    color: var(--green);
    text-decoration: none;
}

.main-content {
    padding: 1.5rem 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-value.green { color: var(--green); }

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #1a1a1a;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-warning { background: rgba(234,179,8,0.15); color: #eab308; }
.badge-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-info { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* Forms admin */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 560px;
    margin-bottom: 1.5rem;
}

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

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* Alert */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success { background: rgba(34,197,94,0.15); border: 1px solid #22c55e; color: #86efac; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid #ef4444; color: #fca5a5; }
.alert-info { background: rgba(59,130,246,0.15); border: 1px solid #3b82f6; color: #93c5fd; }

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #25d366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float:hover { transform: scale(1.08); text-decoration: none; }

/* HTMX loading */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* Login page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.auth-card h1 span { color: var(--green); }
