:root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f5f7fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fa;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    min-height: 56px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px;
}

.narrow {
    max-width: 620px;
}

.hero {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 18px;
}

.hero h1 {
    margin: 3px 0 0;
    font-size: 28px;
}

.eyebrow,
.muted {
    color: #6b7280;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2ff;
    font-size: 12px;
    font-weight: 700;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric span {
    display: block;
    color: #6b7280;
    font-size: 14px;
}

.metric strong {
    display: block;
    margin-top: 4px;
    font-size: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.primary {
    background: #111827;
    color: white;
}

.full {
    width: 100%;
}

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

input,
select {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: white;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.activity {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid #eef0f3;
}

.activity:first-child {
    border-top: 0;
}

.hours {
    white-space: nowrap;
    font-weight: 800;
    font-size: 18px;
}

.empty {
    color: #6b7280;
    margin: 0;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(100%, 420px);
}

.alert,
.success {
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.alert {
    background: #fee2e2;
}

.success {
    background: #dcfce7;
}

.admin-link {
    font-weight: 700;
    color: #111827;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.inline-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eef0f3;
    text-align: left;
    vertical-align: top;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status.active {
    background: #dcfce7;
    color: #166534;
}

.status.inactive {
    background: #f3f4f6;
    color: #374151;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.checkbox-row input {
    width: auto;
    min-height: unset;
    margin: 0;
}

button.btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    background: #e5e7eb;
    color: #111827;
}

@media (max-width: 560px) {
    .summary-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hero .btn {
        width: 100%;
    }

    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-controls {
        width: 100%;
    }

    .inline-controls > * {
        flex: 1 1 100%;
    }
}
