/* ===== Global Layout ===== */
body {
    font-family: system-ui, sans-serif;
    padding: 0 2rem 0;
}

/* ===== Headings ===== */
h1 {
    margin-bottom: 0.5rem;
}

/* ===== Generic Table Styles ===== */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
}

th, td {
    border: 1px solid #ccc;
    padding: 4px;
    font-size: 0.9rem;
}

th {
    background-color: #f3f3f3;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

/* ===== Sortable Table Headers ===== */
th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: #e5e5e5;
}

/* ===== Actions / Buttons / Links ===== */
.actions a {
    margin-right: 8px;
}

.disabled {
    color: #888;
    pointer-events: none;
    text-decoration: none;
}

/* ===== Form Layout ===== */
.row {
    margin-bottom: 10px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

input[type=text],
select,
textarea {
    width: 100%;
    max-width: 900px;
    padding: 6px;
}

textarea {
    resize: vertical;
}

.inline {
    display: inline-block;
    min-width: 220px;
    margin-right: 18px;
}

.actions {
    margin-top: 16px;
}

/* ===== Muted / Secondary Text ===== */
.muted {
    color: #666;
    font-size: 0.9rem;
}

/* ===== Details Table (View Pages) ===== */
table.details {
    border-collapse: collapse;
    width: 100%;
    max-width: 1000px;
    margin: 1rem 0;
}

table.details th,
table.details td {
    border: 1px solid #ccc;
    padding: 6px;
    vertical-align: top;
    text-align: left;
    font-size: 0.95rem;
}

table.details th {
    background-color: #f7f7f7;
    width: 20%;
    white-space: nowrap;
}

a.back-link {
    display: inline-block;
    margin-bottom: 1rem;
}

    .nav {
        background-color: #f4f4f4;
        padding: 10px;
        margin-bottom: 15px;
        border-bottom: 1px solid #ccc;
        font-family: system-ui, sans-serif;
    }
    .nav a {
        text-decoration: none;
        color: #333;
        margin-right: 15px;
        font-weight: 500;
    }
    .nav a.active {
        font-weight: bold;
        text-decoration: underline;
    }
    
        table.sources { border-collapse: collapse; width: 100%; max-width: 1100px; margin-top: 1rem; }
        table.sources th, table.sources td { border: 1px solid #ccc; padding: 6px; font-size: 0.9rem; }
        table.sources th { background-color: #f3f3f3; }
