:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --done: #15803d;
    --progress: #b45309;
    --danger: #b91c1c;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
.nav {
    background: #475569;
    color: white;
    padding: 14px 24px;
}
.nav-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.nav a { color: white; margin-left: 16px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { font-size: 32px; font-weight: bold; margin-top: 8px; }
.muted { color: var(--muted); }
.btn, button {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: bold;
}
.btn:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: #475569; }
.btn-danger { background: var(--danger); }
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    background: white;
}
textarea { min-height: 90px; }
label { display: block; font-weight: bold; margin: 12px 0 6px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: 13px; text-transform: uppercase; color: #475569; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: bold; }
.badge-done { background: #dcfce7; color: var(--done); }
.badge-progress { background: #fef3c7; color: var(--progress); }
.progress-wrap { background: #e5e7eb; border-radius: 999px; overflow: hidden; height: 12px; min-width: 120px; }
.progress-bar { background: var(--primary); height: 12px; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.filters > div { min-width: 180px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }
@media (max-width: 900px) {
    .grid, .grid-2 { grid-template-columns: 1fr; }
    .nav-inner { flex-direction: column; align-items: flex-start; }
    table { display: block; overflow-x: auto; }
}

.table-scroll { overflow-x: auto; }
.status-cell { min-width: 150px; }
.remarks-box { min-width: 220px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 48px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; }
.text-center { text-align: center; }
.task-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}
.task-complete {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.task-incomplete {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
@media (max-width: 900px) {
    .brand-logo { height: 42px; }
    .nav-links { width: 100%; }
}

/* Full-width client progress table */
body:has(.client-progress-page) .container {
    max-width: none;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}
.client-progress-page table {
    width: 100%;
    min-width: 100%;
}
.client-progress-page.card {
    width: 100%;
}
