/* ── Reset & Base ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

/* ── Navbar ── */
.navbar {
    background-color: #0f132d;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    font-size: 1.5rem;
    color: #00bdff;
}

.nav-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.nav-links a {
    color: #00bdff;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ffffff;
}

/* ── Main Content ── */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ── Page Header ── */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f132d;
}

.page-header p {
    color: #718096;
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* ── Stats Cards ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #e2e8f0;
}

.stat-card.critical {
    border-left-color: #fd4a00;
}

.stat-card.warning {
    border-left-color: #dd6b20;
}

.stat-card.due {
    border-left-color: #d69e2e;
}

.stat-card.total {
    border-left-color: #1a365d;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
}

.stat-label {
    font-size: 0.8rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ── Worklist Table ── */
.worklist-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.worklist-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.worklist-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a365d;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f7fafc;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f7fafc;
}

/* ── Status Badges ── */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-critical {
    background-color: #fff5f5;
    color: #c53030;
}

.badge-warning {
    background-color: #fffaf0;
    color: #c05621;
}

.badge-due {
    background-color: #fffff0;
    color: #b7791f;
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
    font-size: 0.8rem;
}

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

/* ── Forms ── */
.form-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2d3748;
    background: #f7fafc;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a365d;
    background: #ffffff;
}

.form-group small {
    font-size: 0.75rem;
    color: #718096;
}

.checkbox-group label {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* ── Buttons ── */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #1a365d;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2a4a7f;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.badge-no-history {
    background-color: #ebf8ff;
    color: #2b6cb0;
}

.badge-due-soon {
    background-color: #fffff0;
    color: #b7791f;
}

.badge-ok {
    background-color: #c6f6d5;
    color: #22543d;
    font-weight: 600;
}