/* ============================================================
   NHS-Style Theme
   Global typography, table, layout, buttons, cards, settings UI
   ============================================================ */

:root {
    --brand: #005EB8;
    --brand-dark: #003087;
    --accent: #0072CE;

    --bg: #f7f9fc;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: #e5e7eb;
}

/* Base */
* { box-sizing: border-box; }

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.small {
    color: var(--muted);
    font-size: .9rem;
}

/* Header/Nav */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-main {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.brand a {
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: .93rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--brand);
    color: var(--brand-dark);
}
.btn-secondary:hover {
    background: #eef5ff;
}

.btn-danger {
    background: #d92c2c;
    color: #fff;
}
.btn-danger:hover {
    background: #b42525;
}

/* Card */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    padding: .65rem .5rem;
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #f0f4f9;
    font-weight: 600;
}

/* Actions row (keep everything on ONE LINE) */
.actions {
    white-space: nowrap;
}
.actions .btn {
    margin-right: 6px;
    margin-bottom: 0;
}

/* Tag chip */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 20px;
    font-size: .82rem;
}

/* Layout helpers */
.row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.col {
    flex: 1 1 260px;
    min-width: 240px;
}

/* Form elements */
.label {
    display: block;
    font-weight: 600;
    color: var(--brand-dark);
    margin: .25rem 0 .35rem;
}

.input, select.input, textarea.input {
    width: 100%;
    padding: .55rem .65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: .95rem;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
}

.input:focus,
select.input:focus,
textarea.input:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0,114,206,.15);
}

select.input {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--brand) 50%),
        linear-gradient(135deg, var(--brand) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(1em + 4px),
        calc(100% - 13px) calc(1em + 4px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* Alerts */
.alert.info {
    background: #eef5ff;
    border: 1px solid #d0e7ff;
    padding: .5rem .75rem;
    border-radius: 6px;
}
.alert.error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    padding: .5rem .75rem;
    border-radius: 6px;
}