:root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #60a5fa;
    --error: #ef4444;
    --border: #1f2937;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
}
.subtitle {
    color: var(--muted);
    margin: 0 0 16px 0;
    font-size: 14px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

input[type="text"], select {
    background: #0b1220;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}

.hint {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.mode-switch {
    margin-bottom: 10px;
    font-size: 14px;
}

.hidden { display: none; }

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.btn {
    background: var(--accent);
    color: #0b1220;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }

.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.list-row input {
    width: 100%;
}
.remove-btn {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}
.remove-btn:hover { color: #fff; }

.totals {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.formula {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}
.result .label {
    color: var(--muted);
    font-size: 13px;
}
.result .value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
}
.small {
    color: var(--muted);
    font-size: 12px;
}

.errors {
    margin-top: 8px;
    color: #fff;
    background: #4e1113;
    border: 1px solid var(--error);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

/* NEW: limits line below results */
.limits-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

/* NEW: compliance status banner */
.status {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}
.status.ok {
    background: #0f3a21;
    border-color: #1f6d3d;
    color: #c9f1d8;
}
.status.bad {
    background: #4e1113;
    border-color: var(--error);
    color: #fff;
}

/* Keep footer as-is */
.footer {
    color: var(--muted);
    font-size: 12px;
    margin-top: 12px;
}