:root {
  --bg: #07070c; --text: #f3f5fa; --muted: #9aa1b4;
  --lime: #b8ff3a; --violet: #7c5cff; --green: #38e08a; --red: #ff5c6c; --amber: #ffce4d;
  --card: rgba(255,255,255,0.04); --border: rgba(255,255,255,0.09); --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1,h2,h3,.brand-name { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1000px 600px at 80% -10%, #15152a, var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; }
.b1 { width: 480px; height: 480px; background: var(--violet); top: -160px; left: -120px; }
.b2 { width: 420px; height: 420px; background: var(--lime); bottom: -180px; right: -120px; opacity: 0.18; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--lime), var(--violet)); color: #0a0a0f; font-family: "Space Grotesk"; font-weight: 700; }
.brand-name { font-size: 1.1rem; }

.btn { font-family: "Space Grotesk"; font-weight: 600; font-size: 0.92rem; padding: 11px 18px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; background: linear-gradient(135deg, var(--lime), #d6ff85); color: #0a0a0f; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(184,255,58,0.3); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); box-shadow: none; }

/* ===== login ===== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(8px); }
.login-card .brand { margin-bottom: 8px; }
.login-card h1 { font-size: 1.5rem; }
.login-card .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.login-card input { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--text); font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.login-card input:focus { border-color: var(--lime); }
.login-card .btn { margin-top: 8px; }
.err { color: var(--red); font-size: 0.85rem; min-height: 1em; text-align: center; }

/* ===== dashboard ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(8,8,14,0.7); backdrop-filter: blur(12px); z-index: 10; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill { font-size: 0.8rem; color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 28px 24px 60px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.kpi .v { font-family: "Space Grotesk"; font-size: 2rem; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.kpi .v.ok { color: var(--green); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 16px; }
.section-title h2 { font-size: 1.3rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.proj { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s, border-color 0.2s; position: relative; overflow: hidden; }
.proj:hover { transform: translateY(-4px); border-color: rgba(184,255,58,0.35); }
.proj-top { display: flex; align-items: center; gap: 12px; }
.proj-emoji { font-size: 1.5rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.proj-name { font-family: "Space Grotesk"; font-weight: 600; font-size: 1.08rem; }
.proj-kind { font-size: 0.76rem; color: var(--muted); }
.proj-desc { color: var(--muted); font-size: 0.9rem; flex: 1; }
.proj-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.badge.up { background: rgba(56,224,138,0.12); color: var(--green); } .badge.up .dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.badge.down { background: rgba(255,92,108,0.12); color: var(--red); } .badge.down .dot { background: var(--red); }
.badge.wait { background: rgba(255,206,77,0.12); color: var(--amber); } .badge.wait .dot { background: var(--amber); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.proj-open { font-size: 0.82rem; color: var(--lime); font-weight: 600; }
.proj-ms { font-size: 0.74rem; color: var(--muted); }
.proj-info { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; color: var(--muted); }
.proj-info .lbl { color: var(--text); font-weight: 600; }
.proj.is-ext::after { content: "externo"; position: absolute; top: 12px; right: -28px; transform: rotate(45deg); background: var(--violet); color: #0a0a0f; font-size: 0.62rem; font-weight: 700; padding: 3px 30px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.panel h3 { font-size: 1.1rem; margin-bottom: 16px; }
.list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.list li:last-child { border-bottom: none; padding-bottom: 0; }
.list .tag { font-size: 0.74rem; color: var(--muted); background: rgba(255,255,255,0.05); padding: 3px 9px; border-radius: 999px; }
.list .desc { color: var(--muted); font-size: 0.84rem; }

.vps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.vps div { background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.vps .k { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.vps .v { font-family: "Space Grotesk"; font-weight: 600; margin-top: 2px; }
.notes { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.notes li { color: var(--muted); font-size: 0.88rem; padding-left: 18px; position: relative; }
.notes li::before { content: "▸"; position: absolute; left: 0; color: var(--lime); }

/* ===== claude na vps ===== */
.claude-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cstat { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.cstat .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cstat.on .dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.cstat.off .dot { background: var(--red); }
.cstat.idle .dot { background: var(--muted); }
.cstat-l { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cstat-v { font-family: "Space Grotesk"; font-weight: 600; margin-top: 2px; }
.cstat.off .cstat-v { color: var(--red); }
@media (max-width: 720px) { .claude-grid { grid-template-columns: 1fr; } }

/* ===== deploys ===== */
.deploys { list-style: none; display: flex; flex-direction: column; }
.deploy { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.deploy:last-child { border-bottom: none; }
.deploy-prod { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deploy .commit-meta a { color: var(--lime); }
.deploys .empty { padding: 8px 0; }
@media (max-width: 720px) { .deploy { grid-template-columns: 100px 1fr; } .deploy .commit-meta { grid-column: 2; } }

/* ===== commits ===== */
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.panel-head h3 { margin-bottom: 0; }
.commits { list-style: none; display: flex; flex-direction: column; }
.commit { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.commit:last-child { border-bottom: none; }
.commit-repo { font-size: 0.72rem; font-weight: 600; text-align: center; padding: 4px 8px; border-radius: 999px; background: rgba(124,92,255,0.15); color: var(--violet-2, #b18bff); text-transform: lowercase; }
.commit-msg { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit-meta { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.commit-meta code { color: var(--lime); }
@media (max-width: 720px) {
  .commit { grid-template-columns: 70px 1fr; }
  .commit-meta { grid-column: 2; }
}

.foot { text-align: center; color: rgba(255,255,255,0.3); font-size: 0.8rem; padding: 30px; }

@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .vps { grid-template-columns: 1fr 1fr; }
}
