/* Actsharper Admin: a dark, developer-style theme built around the logo blue (#2E4C8C). */

:root {
    --bg: #0a0d13;
    --panel: #10141c;
    --panel-2: #151b25;
    --border: #1f2733;
    --border-strong: #2b3646;
    --text: #e4e8ef;
    --muted: #8a95a8;
    --faint: #5c6778;

    --brand: #2e4c8c;           /* the logo */
    --accent: #6d94ea;          /* the logo blue, lifted for contrast on dark */
    --accent-soft: rgba(109, 148, 234, 0.12);

    --ok: #3fb97f;
    --warn: #e0a83a;
    --err: #f0675e;

    --radius: 10px;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 var(--sans);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.35rem; }
h2 { font-size: 0.95rem; }

.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }

/* ── Brand ─────────────────────────────────────────────────────────── */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { display: block; border-radius: 6px; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; }
.brand-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 1px 7px;
}

/* ── Shell: sidebar + main ─────────────────────────────────────────── */

.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 18px 12px;
}

.sidebar-brand { padding: 2px 8px 18px; }
.sidebar-brand:hover { text-decoration: none; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-section {
    margin: 16px 8px 6px;
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 500;
}
.nav-item svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active svg { color: var(--accent); }

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 14px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
}
.deploy { display: flex; align-items: center; gap: 8px; }
.deploy a { color: var(--muted); }
.deploy a:hover { color: var(--text); }
.user { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.link-button:hover { text-decoration: underline; }

.main { min-width: 0; }
.topbar { padding: 26px 32px 18px; border-bottom: 1px solid var(--border); }
.topbar p { margin: 4px 0 0; }
.content { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; }

/* ── Environment badge ─────────────────────────────────────────────── */

.env {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid;
}
.env-dev   { color: var(--warn); border-color: rgba(224, 168, 58, 0.45); background: rgba(224, 168, 58, 0.08); }
.env-prod  { color: var(--err);  border-color: rgba(240, 103, 94, 0.45); background: rgba(240, 103, 94, 0.08); }
.env-local { color: var(--muted); border-color: var(--border-strong); }

/* ── Cards and stats ───────────────────────────────────────────────── */

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.stat-label { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.stat-value { font-family: var(--mono); font-size: 1.9rem; font-weight: 600; margin: 4px 0 2px; letter-spacing: -0.02em; }
.stat-note { color: var(--faint); font-size: 0.8rem; }
.stat-warn .stat-value { color: var(--warn); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.pill {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 2px 9px;
}

.roadmap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roadmap li { display: flex; gap: 12px; align-items: baseline; color: var(--muted); }
.roadmap li .mono {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    color: var(--faint);
    font-size: 0.75rem;
    flex-shrink: 0;
}
.roadmap li.done { color: var(--text); }
.roadmap li.done .mono { background: var(--brand); border-color: var(--brand); color: #fff; }

.checklist { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.checklist li { margin: 4px 0; }
.planned { max-width: 720px; }

/* ── Forms ─────────────────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }

input[type=email], input[type=password], input[type=text], input[type=search] {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    color: var(--text);
    font: inherit;
    padding: 9px 11px;
    outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 7px;
    padding: 9px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button-primary { background: var(--brand); border-color: #3b5ea8; color: #fff; }
.button-primary:hover { background: #355aa3; }

.alert { border-radius: 7px; padding: 10px 12px; font-size: 0.88rem; border: 1px solid; }
.alert-error { color: #ffb4ae; background: rgba(240, 103, 94, 0.08); border-color: rgba(240, 103, 94, 0.4); }

/* ── Sign-in page ──────────────────────────────────────────────────── */

.auth {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 50% -10%, rgba(46, 76, 140, 0.35), transparent 70%),
        var(--bg);
}
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.auth-card h1 { margin-top: 6px; }
.auth-card p { margin: -8px 0 4px; }
.auth-brand { margin-bottom: 4px; }

/* ── Small screens ─────────────────────────────────────────────────── */

@media (max-width: 1000px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; padding: 12px 16px; }
    .sidebar-brand { padding: 0 0 10px; }
    .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .nav-section { display: none; }
    .nav-item { padding: 6px 9px; }
    .sidebar-footer { flex-direction: row; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; }
    .topbar { padding: 18px 16px 14px; }
    .content { padding: 16px 16px 40px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 1.5rem; }
}
