:root {
  --bg: #08080e;
  --bg-card: rgba(255,255,255,0.03);
  --bg-elevated: rgba(255,255,255,0.06);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --accent: #E8590C;
  --accent-2: #ff7b33;
  --border: rgba(255,255,255,0.08);
  --green: #22c55e;
  --red:   #ef4444;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(232,89,12,0.12);
  color: var(--accent-2);
  padding: 2px 7px;
  border-radius: 5px;
}
pre code {
  display: block; padding: 1rem; color: #ffd1b3; background: #12121c; border: 1px solid var(--border);
  border-radius: 8px; white-space: pre-wrap; word-break: break-word; font-size: .8rem; line-height: 1.5;
}

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem 1.8rem;
  background: rgba(8,8,14,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(232,89,12,0.6);
}
.topbar nav { display: flex; gap: 1.3rem; font-size: 0.92rem; color: var(--text-secondary); }
.topbar nav a { transition: color .2s; }
.topbar nav a:hover { color: #fff; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 0.8rem; }
.nav-user {
  padding: 0.35rem 0.8rem; border: 1px solid var(--border); border-radius: 100px;
  font-size: 0.85rem; color: var(--text-secondary);
}
.nav-form { display: inline; }
.nav-form button {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  padding: 0.35rem 0.9rem; border-radius: 100px; font: inherit; font-size: 0.82rem;
  cursor: pointer;
}
.nav-form button:hover { border-color: rgba(239,68,68,0.4); color: #fca5a5; }

/* Layout */
.wrap {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.2rem 1.8rem 3rem;
}
h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin-bottom: 0.7rem; }
p  { line-height: 1.6; color: var(--text-secondary); margin-bottom: 0.7rem; }
.muted { color: var(--text-muted); }
.ok { color: var(--green); }
.err { color: var(--red); background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
       padding: 0.6rem 0.9rem; border-radius: 8px; margin-bottom: 0.8rem; }

/* Hero on landing */
.hero {
  background: linear-gradient(180deg, rgba(232,89,12,0.07), rgba(0,0,0,0));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.4rem 2.2rem;
  margin-bottom: 1.4rem;
}
.hero .tag {
  display: inline-block;
  font-family: 'DM Mono', monospace; font-size: 0.72rem; letter-spacing: 0.2em;
  color: var(--accent-2); border: 1px solid rgba(232,89,12,0.35);
  background: rgba(232,89,12,0.09); padding: 3px 10px; border-radius: 100px;
  margin-bottom: 0.8rem;
}
.hero .sub { font-size: 1.05rem; color: var(--text-secondary); max-width: 680px; }
.hero .credbox {
  margin: 1.6rem 0 1rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.hero .credbox > div {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.8rem 1rem;
}
.hero .credbox span {
  display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.35rem;
}
.hero .cta { margin-top: 1.4rem; }
.hero .cta .btn { font-size: 1rem; padding: 0.8rem 1.6rem; }
.hint {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.4rem 1.6rem;
}
.hint ol { margin: 0.6rem 0 0 1.2rem; line-height: 1.7; color: var(--text-secondary); }

/* Cards / grid */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
}
.card.narrow { max-width: 420px; margin: 1.6rem auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

/* Forms */
.form label { display: block; font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 0.9rem; }
.form input, .form textarea {
  display: block; width: 100%;
  margin-top: 0.35rem;
  background: #0d0d16; color: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.65rem 0.8rem; font: inherit; font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,89,12,0.18);
}
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: none; border-radius: 100px;
  padding: 0.55rem 1.2rem; font: inherit; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 18px rgba(232,89,12,0.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(232,89,12,0.45); }

/* Dashboard lists */
.proj {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px dashed var(--border);
}
.proj:last-child { border-bottom: none; }
.pill {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.pill.active { background: rgba(34,197,94,0.14); color: #86efac; }
.pill.backlog { background: rgba(96,165,250,0.14); color: #93c5fd; }
.pill.admin { background: rgba(239,68,68,0.14); color: #fca5a5; }
.pill.user  { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

.tasklist { list-style: none; }
.tasklist li {
  padding: 0.45rem 0; display: flex; align-items: center; gap: 0.55rem;
  border-bottom: 1px dashed var(--border); color: var(--text);
}
.tasklist li.done { color: var(--text-muted); text-decoration: line-through; }
.tasklist li:last-child { border-bottom: none; }

/* Search */
.searchbar { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; }
.searchbar input {
  flex: 1;
  background: #0d0d16; color: #fff;
  border: 1px solid var(--border); border-radius: 100px;
  padding: 0.65rem 1.1rem; font: inherit; font-size: 0.95rem;
}
.searchbar input:focus { outline: none; border-color: var(--accent); }
.echo {
  padding: 0.7rem 1rem; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1rem;
}
.results { list-style: none; }
.results li {
  padding: 0.6rem 0.9rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.rowtype {
  font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-2);
  background: rgba(232,89,12,0.1); padding: 2px 8px; border-radius: 100px;
}

/* Log table */
.log {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.log th, .log td {
  text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.log th { color: var(--text-muted); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.log td code { word-break: break-all; background: transparent; color: #ffd1b3; padding: 0; }

/* Flag */
.flagbox {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.03));
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 16px; padding: 2rem 2rem 1.6rem;
  margin-bottom: 1.4rem;
}
.flagbox h2 { color: #86efac; }
.flag {
  margin-top: 1rem; padding: 1rem 1.2rem;
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem; color: #bbf7d0;
  background: #0a1510; border: 1px solid rgba(34,197,94,0.25);
  border-radius: 10px; letter-spacing: 0.02em;
}

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.8rem; font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

details summary {
  cursor: pointer; color: var(--text-secondary); font-size: 0.9rem;
  padding: 0.4rem 0; transition: color .2s;
}
details summary:hover { color: #fff; }
