:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #172033;
    background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; }

.site-header {
    align-items: center;
    background: #172033;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 22px max(24px, calc((100vw - 1440px) / 2));
}

.site-header h1 { font-size: 24px; margin: 2px 0 0; }
.eyebrow { color: #8ae0ca; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.refresh-link { color: #fff; font-weight: 600; text-decoration: none; }
.header-actions { align-items: center; display: flex; gap: 18px; }
.signed-in-user { color: #ced8e9; font-size: 14px; }
.logout-form { margin: 0; }
.logout-button { background: transparent; border: 1px solid #8090aa; border-radius: 5px; color: #fff; cursor: pointer; font: inherit; padding: 6px 9px; }
.page-content { margin: 0 auto; max-width: 1440px; padding: 30px 24px 60px; }

.intro { align-items: flex-start; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 24px; }
.intro h2 { margin: 0 0 8px; }
.intro p, .group-description { color: #5f697d; margin: 0; }
.summary { display: flex; gap: 10px; margin: 0; }
.summary div { background: #fff; border: 1px solid #dbe1eb; border-radius: 8px; min-width: 110px; padding: 10px 14px; }
.summary dt { color: #697386; font-size: 12px; }
.summary dd { font-size: 22px; font-weight: 700; margin: 2px 0 0; }

.notice { border-radius: 8px; margin: 0 0 24px; padding: 13px 16px; }
.notice.success { background: #dcfce7; color: #166534; }
.notice.warning { background: #fef3c7; color: #92400e; }
.loading-state { align-items: center; background: #fff; border: 1px solid #dbe1eb; border-radius: 12px; display: flex; gap: 18px; justify-content: center; margin: 8vh auto; max-width: 650px; min-height: 180px; padding: 28px; }
.loading-state h2 { font-size: 20px; margin: 0 0 6px; }
.loading-state p { color: #5f697d; margin: 0; }
.loading-spinner { animation: card-linker-spin .85s linear infinite; border: 5px solid #dce8e6; border-radius: 50%; border-top-color: #087b69; display: inline-block; flex: 0 0 auto; height: 42px; width: 42px; }
@keyframes card-linker-spin { to { transform: rotate(360deg); } }
.login-panel { background: #fff; border: 1px solid #dbe1eb; border-radius: 12px; box-shadow: 0 12px 30px rgba(23, 32, 51, .08); margin: 8vh auto; max-width: 460px; padding: 32px; }
.login-panel h2 { margin: 8px 0 10px; }
.login-panel p { color: #5f697d; line-height: 1.5; }
.login-form { display: grid; gap: 8px; margin-top: 24px; }
.login-form input:not([type="checkbox"]) { border: 1px solid #bdc8d9; border-radius: 6px; font: inherit; padding: 10px; }
.password-field { position: relative; }
.password-field input { padding-right: 48px !important; width: 100%; }
.password-toggle { align-items: center; background: transparent; border: 0; color: #536075; cursor: pointer; display: flex; height: 100%; justify-content: center; padding: 0; position: absolute; right: 0; top: 0; width: 46px; }
.password-toggle:hover { color: #087b69; }
.password-toggle:focus-visible { outline: 2px solid #087b69; outline-offset: -4px; }
.password-toggle svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 21px; }
.checkbox-label { align-items: center; display: flex; gap: 8px; margin: 8px 0; }
.login-button { margin-top: 6px; }
.validation { color: #b42318; font-size: 13px; min-height: 18px; }

.card-group { background: #fff; border: 1px solid #dbe1eb; border-radius: 12px; margin-top: 22px; overflow: hidden; padding: 22px; }
.card-group.actionable { border-color: #9ad8c9; }
.group-heading { align-items: center; display: flex; justify-content: space-between; gap: 20px; }
.group-heading > div:first-child { align-items: center; display: flex; gap: 10px; }
.group-heading h2 { font-size: 20px; margin: 0; }
.group-heading small { color: #697386; font-size: 14px; font-weight: 500; }
.group-number { align-items: center; background: #e7f7f2; border-radius: 50%; color: #0d6b5a; display: inline-flex; font-weight: 800; height: 30px; justify-content: center; width: 30px; }
.group-description { margin: 12px 0 16px; }
.group-total { color: #697386; font-size: 13px; font-weight: 600; margin: 15px 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 650; padding: 9px 13px; white-space: nowrap; }
.button.primary { background: #087b69; color: #fff; }
.button.primary:hover { background: #065f53; }
.button.secondary { background: #eef2f6; color: #2f3a4f; }
.row-button { background: #e7f7f2; color: #0d6b5a; padding: 7px 10px; }

.table-wrap { border: 1px solid #e2e8f0; border-radius: 8px; overflow-x: auto; }
table { border-collapse: collapse; min-width: 1000px; width: 100%; }
th, td { border-bottom: 1px solid #e7ebf1; padding: 10px 12px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #536075; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfd; }
.select-column { text-align: center; width: 42px; }
.apply-column { text-align: right; width: 90px; }
.empty { color: #697386; padding: 20px; text-align: center; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; }

@media (max-width: 760px) {
    .site-header, .intro, .group-heading { align-items: flex-start; flex-direction: column; }
    .summary { width: 100%; }
    .summary div { flex: 1; }
}
