:root {
  color-scheme: light;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  color: #172333;
  background: #f4f7fa;
  --navy: #17395c;
  --navy-2: #245a86;
  --blue-soft: #eaf2f8;
  --line: #dce4eb;
  --muted: #647386;
  --green: #1c7c54;
  --orange: #b85c00;
  --shadow: 0 18px 48px rgba(31, 55, 76, 0.12);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f4f7fa; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin-top: 0; }
.muted, small { color: var(--muted); }
.eyebrow { margin-bottom: 7px; color: var(--navy-2); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr); }
.login-intro { padding: clamp(48px, 8vw, 110px); display: flex; flex-direction: column; justify-content: center; color: white; background: linear-gradient(145deg, #102e4b 0%, #1f527b 68%, #34739b 100%); position: relative; overflow: hidden; }
.login-intro::after { content: ""; position: absolute; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -160px; bottom: -210px; box-shadow: 0 0 0 60px rgba(255,255,255,.035), 0 0 0 120px rgba(255,255,255,.025); }
.login-intro .eyebrow { color: #b9d9ed; margin-top: auto; }
.login-intro h1 { max-width: 670px; font-size: clamp(2.35rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: -0.045em; margin-bottom: 28px; }
.intro-copy { max-width: 590px; color: #dceaf3; font-size: 1.12rem; line-height: 1.65; }
.login-notes { margin-top: auto; display: flex; gap: 22px; color: #dceaf3; font-size: .88rem; }
.login-notes span::before { content: "✓"; color: #8fd1bd; margin-right: 7px; font-weight: 800; }
.login-panel { padding: clamp(36px, 7vw, 90px); display: flex; flex-direction: column; justify-content: center; background: white; }
.login-panel h2 { font-size: 2rem; margin-bottom: 8px; }
.identity-list { display: grid; gap: 12px; margin-top: 32px; }
.version-label { margin: 28px 0 0; color: var(--muted); font-size: .78rem; }
.identity-card { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 16px; color: inherit; transition: .2s ease; }
.identity-card:hover, .identity-card:focus-visible { border-color: #77a9cc; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(31, 55, 76, .1); outline: none; }
.identity-card strong, .identity-card small { display: block; }
.identity-card small { margin-top: 3px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--navy-2); font-size: .78rem; font-weight: 800; }
.avatar.small { width: 36px; height: 36px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .08em; }
.brand-large { margin-bottom: 90px; font-size: 1.2rem; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--navy); color: white; border-radius: 9px; letter-spacing: 0; }
.login-intro .brand-mark { color: var(--navy); background: white; }

.app-header { min-height: 68px; padding: 0 clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.menu-button { display: none; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.menu-button span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--navy); }
.network-status { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: .82rem; font-weight: 700; }
.network-status span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.network-status.offline { color: var(--orange); }
.profile-button { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; text-align: left; color: inherit; }
.profile-copy strong, .profile-copy small { display: block; }
.profile-copy small { margin-top: 2px; font-size: .72rem; }
.section-nav { padding: 0 clamp(18px, 4vw, 56px); display: flex; gap: 24px; background: white; border-bottom: 1px solid var(--line); }
.section-nav button { padding: 15px 0 13px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-weight: 700; }
.section-nav button.active { color: var(--navy); border-bottom-color: var(--navy-2); }
.portal-main { max-width: 1240px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 44px) 72px; }
.app-footer { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px) 26px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .76rem; }
.sync-notice { margin-bottom: 18px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid #e2b58c; border-radius: 10px; background: #fff4e9; color: #743d0c; }
.sync-notice span { flex: 1; min-width: 220px; }

.week-toolbar, .content-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.week-title-row { display: flex; align-items: center; gap: 14px; }
.week-title-row h1, .content-heading h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.35rem); letter-spacing: -.03em; }
.week-title-row p, .content-heading p { margin: 4px 0 0; color: var(--muted); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: white; font-size: 1.45rem; line-height: 1; }
.week-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.employee-picker { color: var(--muted); font-size: .76rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.employee-picker select { padding: 9px 30px 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.status-pill { border-radius: 999px; padding: 8px 12px; font-size: .78rem; font-weight: 800; text-transform: capitalize; background: #edf1f4; color: #4e5e6e; }
.status-pill.complete { background: #dff3e9; color: #14613f; }
.status-pill.locked { background: #f7e8dd; color: #8a460b; }
.button { border-radius: 9px; padding: 10px 15px; border: 1px solid transparent; font-weight: 800; }
.button.primary { color: white; background: var(--navy); }
.button:disabled { cursor: default; opacity: .68; }
.button.secondary { color: var(--navy); border-color: #afc3d2; background: white; }
.button.text { color: var(--navy-2); background: transparent; padding-inline: 8px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-grid article { padding: 17px 19px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.summary-grid span, .summary-grid strong { display: block; }
.summary-grid span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.summary-grid strong { margin-top: 7px; font-size: 1.45rem; color: var(--navy); }
.days-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.day-card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 5px 18px rgba(31,55,76,.035); }
.day-card.today { border-color: #7eafd0; box-shadow: 0 0 0 2px #dcecf7; }
.day-card > header { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.day-card h2 { display: inline; margin: 0; font-size: 1rem; }
.day-card header span { margin-left: 8px; padding: 3px 6px; border-radius: 5px; background: var(--blue-soft); color: var(--navy-2); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.entry-list { min-height: 62px; }
.entry-row { display: grid; grid-template-columns: 9px 1fr auto auto; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #edf1f4; }
.entry-row strong, .entry-row small { display: block; }
.entry-row strong { font-size: .88rem; }
.entry-row small { margin-top: 3px; font-size: .72rem; }
.entry-details { min-width: 0; padding: 3px 5px; border: 0; border-radius: 7px; color: inherit; background: transparent; text-align: left; }
.entry-details:hover, .entry-details:focus-visible { background: var(--blue-soft); outline: 2px solid #8ab6d3; outline-offset: 1px; }
.type-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e7db0; }
.type-dot.pto { background: #7f63b8; }
.type-dot.sick { background: #cf714c; }
.delete-button { border: 0; color: #8b5960; background: transparent; font-size: 1.15rem; }
.empty-state { padding: 19px 17px; margin: 0; color: #8a97a4; font-size: .84rem; }
.add-entry { width: 100%; padding: 12px 16px; border: 0; color: var(--navy-2); background: #fbfcfd; text-align: left; font-weight: 800; }

.admin-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.inline-form { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
label { color: #425164; font-size: .78rem; font-weight: 800; }
input, select, textarea { width: 100%; margin-top: 6px; border: 1px solid #bdcad4; border-radius: 8px; padding: 10px 11px; color: #172333; background: white; }
.inline-form label { flex: 1; }
.customer-list > div, .audit-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; border-bottom: 1px solid #edf1f4; }
.customer-list > div:last-child, .audit-list > div:last-child { border-bottom: 0; }
.customer-list strong, .customer-list small, .audit-list strong, .audit-list small { display: block; }
.customer-list small, .audit-list small { margin-top: 3px; }
.user-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.user-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; }
.checkbox-field { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; }
.checkbox-field input { width: auto; margin: 0; }
.login-email-field { grid-column: 1 / -1; }
.login-email-field.is-hidden { display: none; }
.user-help { margin: 14px 0 4px; }
.user-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; border-bottom: 1px solid #edf1f4; }
.user-list > div:last-child { border-bottom: 0; }
.user-list strong, .user-list small { display: block; }
.user-list small { margin-top: 3px; overflow-wrap: anywhere; }
.user-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.audit-list > div { justify-content: flex-start; }
.audit-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy-2); font-weight: 900; }
.backup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.backup-card h2, .backup-list h2 { margin-bottom: 8px; }
.backup-card p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.backup-card .button { margin-top: 14px; }
.backup-card ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.backup-list > div { padding: 13px 2px; border-top: 1px solid var(--line); }
.backup-list strong, .backup-list small { display: block; }
.backup-list small { margin-top: 3px; }
.readiness-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.readiness-list span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--blue-soft); color: var(--navy); font-weight: 900; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.report-context { margin: -8px 0 18px; padding: 11px 14px; display: flex; gap: 8px; flex-wrap: wrap; border: 1px solid #bfd4e3; border-radius: 10px; background: #edf5fa; color: #294f6e; font-size: .82rem; }
.report-card { display: grid; gap: 18px; }
.report-card h2 { margin-bottom: 5px; }
.report-card p { color: var(--muted); line-height: 1.45; }
.report-form { display: flex; align-items: end; gap: 10px; padding: 16px; border-radius: 11px; background: #f7f9fb; }
.report-form label { flex: 1; }
.report-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-form-grid label:last-of-type { grid-column: 1 / -1; }
.report-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; }
.table-scroll { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.report-table th, .report-table td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.report-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.report-table .status-pill { display: inline-block; padding: 5px 8px; }
.employee-report-link { padding: 2px 0; border: 0; border-bottom: 1px solid currentColor; color: var(--navy-2); background: transparent; font: inherit; font-weight: 800; text-align: left; }
.report-result { margin: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(10, 27, 43, .58); }
.entry-modal { width: min(570px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: white; border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.entry-modal > header { padding: 20px 22px 14px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.entry-modal h2 { margin: 0; }
.entry-modal form { padding: 20px 22px 22px; display: grid; gap: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field-help { margin: -7px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.optional { color: #8793a0; font-weight: 500; }
.form-error { margin: 0; min-height: 18px; color: #a33232; font-size: .78rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 800px) {
  .login-page { grid-template-columns: 1fr; }
  .login-intro { min-height: 42vh; padding: 38px 24px; }
  .brand-large { margin-bottom: 50px; }
  .login-intro h1 { font-size: 2.7rem; }
  .login-notes { margin-top: 26px; flex-wrap: wrap; }
  .login-panel { padding: 42px 24px 56px; }
  .profile-copy { display: none; }
  .menu-button { display: block; }
  .section-nav { display: none; padding: 8px 18px 14px; flex-direction: column; gap: 0; }
  .section-nav.is-open { display: flex; }
  .section-nav button { width: 100%; padding: 13px 4px; border-bottom: 1px solid var(--line); text-align: left; }
  .section-nav button.active { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--navy-2); padding-left: 12px; }
  .week-toolbar { align-items: flex-start; flex-direction: column; }
  .week-actions { width: 100%; justify-content: flex-start; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .days-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .backup-grid { grid-template-columns: 1fr; }
  .user-form { grid-template-columns: 1fr; }
  .user-form-actions { grid-column: 1; }
}

@media (max-width: 480px) {
  .app-header { padding-inline: 14px; }
  .section-nav { padding-inline: 14px; }
  .portal-main { padding: 24px 12px 56px; }
  .header-actions { gap: 9px; }
  .network-status { gap: 5px; font-size: .72rem; white-space: nowrap; }
  .network-status span { width: 7px; height: 7px; }
  .week-title-row { gap: 8px; }
  .week-title-row h1 { font-size: 1.45rem; }
  .summary-grid { gap: 8px; }
  .summary-grid article { padding: 14px; }
  .entry-row { grid-template-columns: 8px 1fr auto; }
  .delete-button { grid-column: 3; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .button { width: 100%; }
  .user-list > div { align-items: flex-start; flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; }
  .report-form, .report-form-grid { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .report-form-grid label:last-of-type, .report-actions { grid-column: 1; }
  .report-actions { display: grid; }
  .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; width: 100%; }
  .report-table thead { display: none; }
  .report-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .report-table td { display: flex; justify-content: space-between; gap: 16px; padding: 7px 2px; border: 0; white-space: normal; text-align: right; }
  .report-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: left; }
  .app-footer { flex-direction: column; gap: 4px; }
}
