:root {
    --text: #222;
    --muted: #666;
    --border: #d9d9d9;
    --background: #f7f7f7;
    --surface: #fff;
    --success: #e8f5e9;
    --success-border: #81c784;
    --error: #ffebee;
    --error-border: #e57373;
    --warning: #fff8e1;
    --warning-border: #ffca28;
    --info: #e3f2fd;
    --info-border: #64b5f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-link {
    color: var(--text);
    text-decoration: none;
}

.header-link:hover {
    color: var(--text);
    text-decoration: none;
}

.site-brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
}

.site-user {
    color: var(--muted);
    border-left: 1px solid var(--border);
    padding-left: 18px;
}

.logout-form {
    margin: 0;
}

.nav-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.nav-button:hover {
    text-decoration: underline;
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.messages {
    margin-bottom: 24px;
}

.message {
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}

.message-success {
    background: var(--success);
    border-color: var(--success-border);
}

.message-error {
    background: var(--error);
    border-color: var(--error-border);
}

.message-warning {
    background: var(--warning);
    border-color: var(--warning-border);
}

.message-info {
    background: var(--info);
    border-color: var(--info-border);
}

h1,
h2,
h3 {
    line-height: 1.2;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input,
select,
textarea {
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font: inherit;
}

button {
    padding: 7px 14px;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background: #f0f0f0;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

th {
    font-weight: 600;
    background: #f3f3f3;
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* Authentication 

.auth-container {
max-width: 480px;
margin: 3rem auto;
}

.auth-card {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 6px;
padding: 2rem;
}

.auth-card h1,
.auth-card h2 {
margin-top: 0;
}

.auth-card form {
margin-top: 1.5rem;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
width: 100%;
box-sizing: border-box;
}

/*
.auth-card button {
margin-top: 1rem;
}

/* export */
.itemised-export-form {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-group label {
    margin: 0;
}
