:root {
    --bg: #f6f8fa;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --accent: #06b3e8;
    --danger: #dc2626;
    --ok: #16a34a
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text)
}

.container {
    max-width: 960px;
    margin: 32px auto;
    padding: 0 16px
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: var(--panel);
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb
}

.nav a {
    color: var(--text);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px
}

.nav a:hover {
    background: #f1f5f9
}

.card {
    background: var(--panel);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0
}

h1,
h2 {
    margin: 0 0 12px 0
}

form {
    display: grid;
    gap: 12px
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600
}

input,
select,
textarea {
    background: #ffffff;
    color: var(--text);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px
}

/* Consistent typography across form controls and buttons */
input,
button,
a.btn,
textarea,
select {
    font-family: inherit;
    font-size: 14px;
    line-height: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    vertical-align: middle
}

button,
a.btn {
    background: var(--accent);
    border: 1px solid var(--accent);
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

button.secondary,
.btn.secondary {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: var(--text)
}

button.danger,
.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #2b1010
}

/* Ensure anchor buttons keep button color and are not underlined/overridden */
a.btn:visited {
    color: #081120
}

.nav a.btn:hover {
    background: var(--accent)
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid #e5e7eb
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.flash {
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0
}

.flash.info {
    background: #e6f6ff;
    color: var(--text);
    border: 1px solid #b6e0fe
}

.flash.error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.row>* {
    flex: 1 1 280px
}

.muted {
    color: var(--muted)
}

.form-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end
}