/* ---- Base theme ---- */
:root{
  --bg:#020617;
  --panel:#0b1120;
  --panel-soft:#020617;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --border:#1f2937;
  --accent:#2563eb;
  --accent-ghost:#1e3a8a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
a{color:#93c5fd;text-decoration:none}
a:hover{text-decoration:underline}

.muted{color:var(--muted);font-size:13px}
.kbd{
  padding:2px 6px;
  border:1px solid var(--border);
  border-radius:6px;
  background:#0b1220;
  color:#cbd5e1;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:12px;
}

/* ---- Layout wrappers ---- */
.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px 72px; /* bottom padding for bottom nav */
}

/* ---- Topbar / brand ---- */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background:#020617ee;
  backdrop-filter:blur(12px);
  position:sticky;
  top:0;
  z-index:20;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:700;
}
.logo{
  width:28px;
  height:28px;
  border-radius:8px;
  background:linear-gradient(135deg,var(--accent),#3b82f6);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-size:14px;
  box-shadow:0 6px 20px rgba(37,99,235,.35);
  overflow:hidden;
}
.logo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}

.nav a{
  margin-left:12px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#0b1220;
}
.nav a.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

/* ---- Buttons ---- */
.btn,
.btn-sm{
  border-radius:10px;
  border:1px solid var(--border);
  background:#020617;
  color:var(--text);
  cursor:pointer;
  font-weight:500;
}
.btn{
  padding:12px 14px;
  font-size:14px;
}
.btn-sm{
  padding:6px 10px;
  font-size:12px;
}
.btn.primary,
.btn-sm.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn.ghost{
  background:#0b1220;
}
.btn:disabled,
.btn-sm:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* ---- Hero (landing) ---- */
.hero{padding:56px 0 20px}
.hero-inner{
  display:grid;
  grid-template-columns:0.9fr 1.4fr;
  gap:28px;
  align-items:center;
}
.headline{
  font-size:36px;
  line-height:1.2;
  margin:0 0 10px;
}
.sub{
  color:var(--muted);
  font-size:15px;
  margin:0 0 18px;
}

/* ---- Screenshot “window” ---- */
.shot{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
}
.shot .bar{
  display:flex;
  gap:6px;
  padding:6px 8px;
  border-bottom:1px solid var(--border);
}
.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#ef4444;
}
.dot:nth-child(2){background:#f59e0b}
.dot:nth-child(3){background:#10b981}
.shot .img{
  background:#0b1220 url('/assets/two-panel.png') center/contain no-repeat;
  border:1px solid #0f1b33;
  border-radius:10px;
  width:100%;
  aspect-ratio:16 / 9;
}

/* ---- Feature grid + gallery ---- */
.features{padding:24px 0 48px}
.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  min-height:140px;
}
.card h3{margin:0 0 8px;font-size:15px}
.card p{margin:0;color:var(--muted);font-size:13px}
.icon{font-size:18px;margin-right:8px}

.gallery{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:12px;
  margin-top:18px;
}
.tile{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
}
.tile .img{
  aspect-ratio:16/9;
  background:#0c1426 url('/assets/choose-file.png') center/cover no-repeat;
  display:block;
}
.tile.small .img{
  aspect-ratio:4/3;
  background-image:url('/assets/two-panel.png');
}
.tile.caption{
  padding:10px;
  color:var(--muted);
  font-size:12px;
  border-top:1px solid var(--border);
}

/* ---- Footer ---- */
.foot{
  padding:28px 0;
  color:var(--muted);
  font-size:12px;
  border-top:1px solid var(--border);
  margin-top:36px;
}

/* ---- Bottom nav ---- */
.bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  border-top:1px solid var(--border);
  background:#020617f5;
  backdrop-filter:blur(16px);
  display:flex;
  z-index:30;
}
.bottom-nav a{
  flex:1;
  text-align:center;
  padding:8px 4px 10px;
  font-size:11px;
  color:var(--muted);
  text-decoration:none;
}
.bottom-nav a span{
  display:block;
  font-size:16px;
  margin-bottom:2px;
}
.bottom-nav a.active{
  color:#bfdbfe;
  border-top:2px solid var(--accent);
}

/* ---- Generic status msgs ---- */
.msg,
#msg{
  margin-top:8px;
  font-size:13px;
}
.msg.ok,
#msg.ok{color:#22c55e}
.msg.err,
#msg.err{color:#f97373}

/* ---- Devices list ---- */
.device-list{margin:0;padding:0;list-style:none}
.device-item{
  padding:8px 6px;
  border-radius:10px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}
.device-item:nth-child(odd){background:rgba(15,23,42,.7)}
.device-item:nth-child(even){background:rgba(15,23,42,.4)}
.device-name{font-weight:500}
.device-platform{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.device-meta{font-size:11px;color:var(--muted)}
.chip{
  font-size:11px;
  border-radius:999px;
  padding:2px 8px;
  border:1px solid #1d4ed8;
  color:#bfdbfe;
  background:#020617;
}

/* ---- Server table ---- */
.toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  margin:10px 0;
  flex-wrap:wrap;
}
.cwd{
  font-family:ui-monospace,monospace;
  font-size:12px;
  color:var(--muted);
}
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:8px 0;
  overflow:hidden;
}
table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
th,td{
  padding:6px 10px;
  border-bottom:1px solid #020617;
}
th{
  text-align:left;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
tr:hover{
  background:rgba(15,23,42,.7);
  cursor:pointer;
}
.name-col{
  display:flex;
  align-items:center;
  gap:6px;
}
.badge{
  font-size:11px;
  padding:1px 6px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
}

/* ---- Simple card layout (convert / connections / auth helper) ---- */
.simple-card{
  max-width:440px;
  margin:24px auto 0;
  background:#111827;
  border:1px solid #1f2937;
  border-radius:16px;
  padding:24px;
  box-shadow:0 10px 30px rgba(0,0,0,.3);
}

/* ---- Auth form tweaks (login/register) ---- */
.auth-card{
  max-width:440px;
  margin:24px auto 0;
  background:#111827;
  border:1px solid #1f2937;
  border-radius:16px;
  padding:24px;
  box-shadow:0 10px 30px rgba(0,0,0,.3);
}
.auth-card h1{font-size:20px;margin:0 0 12px}
.auth-card label{
  display:block;
  margin:14px 0 6px;
  font-size:14px;
  color:#cbd5e1;
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"]{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid #334155;
  background:#0b1220;
  color:#e5e7eb;
  outline:none;
}
.auth-card input:focus{border-color:#60a5fa}
.auth-card button{
  width:100%;
  margin-top:16px;
  padding:12px;
  border-radius:10px;
  border:0;
  background:#2563eb;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}
.auth-card button:disabled{opacity:.6;cursor:not-allowed}
.auth-muted{
  color:#94a3b8;
  font-size:13px;
  margin-top:12px;
  text-align:center;
}

/* ---- Responsive tweaks ---- */
@media (max-width:1000px){
  .hero-inner{grid-template-columns:1fr}
  .gallery{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr 1fr}
}
@media (max-width:680px){
  .grid{grid-template-columns:1fr}
  .headline{font-size:28px}
}
