:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9dee7;
    --brand: #0f766e;
    --brand-2: #1d4ed8;
    --danger: #b42318;
    --ok: #047857;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}
.brand {
    color: var(--text);
    font-weight: 800;
    font-size: 20px;
}
nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 14px;
}
.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 60px;
}
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 34px; margin-bottom: 4px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; margin-bottom: 0; }
.hero p, .muted, small { color: var(--muted); }

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border: 0;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.button:hover { text-decoration: none; background: #115e59; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.account-stats {
    grid-template-columns: repeat(6, 1fr);
}
.stats article, .panel, .project-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.stats span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}
.stats strong { font-size: 24px; }
.account-stats strong { font-size: 18px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.form-grid { grid-template-columns: 360px 1fr; align-items: start; }
.wide { overflow: hidden; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.panel-head h2 { margin: 0; }
.list { display: grid; gap: 10px; }
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
}
.row:last-child { border-bottom: 0; }
.row small, td small {
    display: block;
    margin-top: 2px;
}
.stacked { display: block; }
.bar {
    height: 9px;
    margin-top: 9px;
    background: #e7ebf0;
    border-radius: 999px;
    overflow: hidden;
}
.bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.form {
    display: grid;
    gap: 12px;
}
label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 700;
    font-size: 14px;
}
input, select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 9px 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
textarea { min-height: 92px; resize: vertical; }

.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: top;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef6f4;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}
.neg { color: var(--danger); font-weight: 800; white-space: nowrap; }
.pos { color: var(--ok); font-weight: 800; white-space: nowrap; }
.dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 8px;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.project-card {
    display: grid;
    gap: 9px;
}
.project-card p { margin-bottom: 0; color: var(--muted); }

.flash {
    padding: 11px 13px;
    border-radius: 7px;
    margin-bottom: 16px;
    background: #ecfdf3;
    color: #05603a;
    border: 1px solid #abefc6;
}
.flash.error {
    background: #fef3f2;
    color: var(--danger);
    border-color: #fecdca;
}
.install {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.auth-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}
.auth-card form { display: grid; gap: 14px; }
.auth-card h2 {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 16px;
}

@media (max-width: 820px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
    .shell { width: min(100% - 24px, 1180px); margin-top: 18px; }
    .hero { align-items: flex-start; flex-direction: column; }
    h1 { font-size: 28px; }
    .stats, .account-stats, .grid.two, .form-grid { grid-template-columns: 1fr; }
    th, td { padding: 9px 8px; }
}
