:root {
  color-scheme: light;
  --navy: #123b67;
  --navy-dark: #0c2b4d;
  --ink: #1d2b3a;
  --muted: #748194;
  --line: #e6ebf0;
  --canvas: #f5f7fa;
  --orange: #e8782c;
  --green: #238663;
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
body.app-page { width: 100%; max-width: 100%; overflow-x: hidden; padding-top: calc(68px + env(safe-area-inset-top)); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: radial-gradient(ellipse at 85% 12%, #dce9f7 0, transparent 34%), var(--canvas);
}
.login-card {
  width: min(100%, 440px);
  padding: 42px;
  border: 1px solid rgba(226, 233, 241, .9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(28, 55, 85, .09);
}
.admin-login-card { margin: 48px auto; }
.login-card input[type="email"], .login-card input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
.password-input-wrapper { position: relative; }
.login-card .password-input-wrapper input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #748194;
  background: transparent;
  transform: translateY(-50%);
}
.password-toggle:hover { color: var(--navy); background: #f1f5f8; }
.password-toggle:focus-visible { outline: 3px solid #8ac5a5; outline-offset: 1px; }
.password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle .eye-slash { opacity: 0; }
.password-toggle.is-visible .eye-slash { opacity: 1; }
.login-card input:focus { border-color: #5a84b1; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.admin-password-label { margin-top: 18px; }
.entry-actions { display: flex; align-items: center; gap: 12px; }
.login-logo { display: block; width: 180px; height: auto; }
.eyebrow { margin: 26px 0 8px; color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
h1, h2, p { margin-top: 0; }
.login-card h1, .page-heading h1 { margin-bottom: 12px; font: 800 35px/1.12 Manrope, sans-serif; letter-spacing: -1.2px; }
.login-card h1 span { color: var(--navy); }
.login-copy, .muted { color: var(--muted); line-height: 1.6; }
.login-copy { margin-bottom: 28px; }
.field-label { display: block; margin-bottom: 8px; color: #38495b; font-size: 13px; font-weight: 700; }
input[type="date"], input[type="number"], select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
input[type="date"] {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.time-entry-control { display: flex; gap: 8px; }
.time-entry-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 2px;
  padding: 0 12px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.time-entry-value:focus-within {
  border-color: #5a84b1;
  box-shadow: 0 0 0 3px rgba(40, 100, 160, .11);
}
.time-entry-value input {
  flex: 0 0 2.6ch;
  width: 2.6ch;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  text-align: center;
}
.time-entry-value input::placeholder {
  color: var(--ink);
  opacity: .7;
}
.time-entry-value input:focus {
  border: 0;
  outline: none;
  box-shadow: none;
}
.time-entry-control select { flex: 0 0 112px; width: 112px; }
input:focus, select:focus { border-color: #5a84b1; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.primary-button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--navy);
  font-weight: 700;
  transition: background .15s, transform .15s;
}
.primary-button:hover { transform: translateY(-1px); background: var(--navy-dark); }
#entrySubmitButton,
#toggleInternRosterButton,
#saveInternButton,
#saveInternProfileButton {
  width: auto;
  min-width: 100px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--green);
  font-size: 13px;
  white-space: nowrap;
}
#entrySubmitButton:hover,
#toggleInternRosterButton:hover,
#saveInternButton:hover,
#saveInternProfileButton:hover { background: #176a4c; }
.primary-button:focus-visible, .text-button:focus-visible, .delete-button:focus-visible { outline: 3px solid #97bfeb; outline-offset: 2px; }
.password-reset-button { display: block; margin: 14px auto 0; padding: 4px 8px; border: 0; color: var(--navy); background: transparent; font-size: 12px; font-weight: 600; }
.password-reset-button:hover { color: var(--green); text-decoration: underline; }
.password-reset-button:focus-visible { outline: 3px solid #8ac5a5; outline-offset: 2px; border-radius: 4px; }
.password-reset-button:disabled { cursor: wait; opacity: .65; }
.full-width { width: 100%; margin-top: 20px; }
.storage-note { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #e2a543; }
.admin-entry-link { display: block; margin-top: 18px; color: var(--navy); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; }
.admin-entry-link:hover { color: var(--orange); }

.topbar {
  position: fixed;
  top: env(safe-area-inset-top);
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  align-self: flex-start;
  padding: 0 max(calc((100vw - 1120px) / 2), 24px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand, .user-menu { display: flex; align-items: center; }
.brand { color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: 118px; height: auto; }
.user-menu { gap: 10px; font-size: 13px; font-weight: 600; }
.user-menu .admin-nav-link { margin: 0 8px 0 0; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy); text-decoration: none; }
.user-menu .admin-nav-link:hover { background: #f3f7fa; }
.user-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: #eaf1f8; }
.user-avatar img { width: 21px; height: 21px; object-fit: contain; }
.text-button { margin-left: 8px; padding: 6px 0 6px 8px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--navy); }
#cancelInternEditButton,
#cancelEntryEditButton { margin-left: 0; padding: 8px 12px; border: 1px solid #f1c6c3; border-radius: 7px; color: #b83b36; background: #fff3f2; font-weight: 600; }
#cancelInternEditButton:hover,
#cancelEntryEditButton:hover { color: #9f2824; background: #fde7e5; }
#cancelEntryEditButton:not([hidden]) { display: inline-flex; width: 112px; min-width: 112px; height: 38px; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.user-menu #viewProfileButton { margin-left: 2px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy); white-space: nowrap; }
.user-menu #viewProfileButton:hover { background: #f3f7fa; }
.app-page:not(.admin-page) .topbar { padding-right: max(calc((100vw - 1440px) / 2), 24px); padding-left: max(calc((100vw - 1440px) / 2), 24px); }
.admin-page .topbar { padding-right: max(calc((100vw - 1800px) / 2), 16px); padding-left: max(calc((100vw - 1800px) / 2), 16px); }
.profile-save-toast { position: fixed; z-index: 20; top: 50%; left: 50%; max-width: calc(100vw - 32px); margin: 0; padding: 12px 18px; transform: translate(-50%, -50%); border: 1px solid #a7d2ba; border-radius: 9px; color: #176a4c; background: #eaf6ef; box-shadow: 0 8px 26px rgba(28, 55, 85, .16); font-size: 14px; font-weight: 700; text-align: center; }
.profile-save-toast[hidden] { display: none; }
.profile-dialog { width: min(600px, calc(100% - 32px)); max-height: min(90vh, 760px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 22px 65px rgba(28, 55, 85, .2); }
.profile-dialog::backdrop { background: rgba(15, 35, 55, .48); }
.profile-dialog-heading {
  position: sticky;
  top: -24px;
  z-index: 2;
  align-items: flex-start;
  margin-bottom: 20px;
  margin-top: -24px;
  padding-top: 24px;
  background: #fff;
}
.profile-dialog-heading h2 { margin: 0 0 5px; font: 700 19px Manrope, sans-serif; }
.profile-dialog-heading p { max-width: 470px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-dialog-close { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; color: #647487; background: #f1f5f8; font-size: 23px; line-height: 1; }
.profile-dialog-close:hover { color: var(--navy); background: #e5edf5; }
.profile-dialog-close:focus-visible { outline: 3px solid #97bfeb; outline-offset: 2px; }
.dashboard { width: min(1440px, calc(100% - 48px)); margin: 34px auto 60px; }
.admin-page .dashboard { width: min(1800px, calc(100% - 32px)); }
.admin-page .dashboard,
.admin-page .content-card { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.timesheet-heading {
  padding: 12px 0;
  background: var(--canvas);
  box-shadow: 0 8px 16px rgba(245, 247, 250, .96);
}
.page-heading .eyebrow { margin: 0 0 8px; }
.page-heading h1 { margin-bottom: 7px; font-size: 30px; }
.timesheet-heading #timesheetHeadingName { color: #346a9e; font-size: 16px; font-style: normal; }
.page-heading .muted { margin: 0; font-size: 14px; }
.admin-dashboard-controls { display: flex; align-items: flex-end; gap: 12px; }
.date-chip { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; color: #516174; background: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.filter-control { display: flex; align-items: center; gap: 10px; color: #657487; font-size: 12px; font-weight: 600; }
.filter-control select { width: auto; min-width: 150px; min-height: 40px; }
.calendar-icon { color: var(--navy); font-size: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.dashboard .outsource-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard .admin-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-card { display: flex; min-height: 110px; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.summary-card > div { min-width: 0; }
.summary-card[hidden] { display: none; }
.summary-grid[hidden] { display: none; }
.summary-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; font-size: 20px; }
.summary-icon.blue { color: #346a9e; background: #eaf2fa; }
.summary-icon.green { color: var(--green); background: #e8f5ef; }
.summary-icon.orange { color: #bb672a; background: #fff0e4; }
.summary-card p { margin: 1px 0 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-card strong { display: block; font: 700 24px Manrope, sans-serif; letter-spacing: -.5px; }
.summary-card small { display: block; margin-top: 4px; color: #9aa4b1; font-size: 11px; }
.summary-card .summary-time-words { font: 600 14px/1.35 "DM Sans", "Segoe UI", sans-serif; letter-spacing: 0; }
.mobile-entry-trigger,
.mobile-entry-back { display: none; }
.content-card { margin-bottom: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.section-heading { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.section-heading h2 { margin: 0 0 5px; font: 700 17px Manrope, sans-serif; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-heading #adminRecordsSubtitle .selected-outsource-name { color: var(--ink); font-size: 15px; font-weight: 700; }
.section-step { align-self: flex-start; padding: 6px 9px; border-radius: 6px; color: #657b93; background: #f1f5f8; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.outsource-profile-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.outsource-profile-form-grid input[type="text"],
.outsource-profile-form-grid input[type="email"],
.outsource-profile-form-grid input[type="tel"],
.outsource-profile-form-grid input[type="date"],
.outsource-profile-form-grid textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
.outsource-profile-form-grid textarea { min-height: 84px; padding: 10px 13px; resize: vertical; }
.outsource-profile-form-grid input[readonly] { color: #66778a; background: #f5f7fa; }
.outsource-profile-form-grid input:focus,
.outsource-profile-form-grid textarea:focus { border-color: #5a84b1; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.profile-address-field { grid-column: 1 / -1; }
.outsource-roster-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.outsource-roster-form-grid input[type="text"],
.outsource-roster-form-grid input[type="email"],
.outsource-roster-form-grid input[type="tel"],
.outsource-roster-form-grid input[type="date"],
.outsource-roster-form-grid input[type="url"],
.outsource-roster-form-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
.outsource-roster-form-grid textarea { min-height: 72px; padding: 10px 13px; resize: vertical; }
.outsource-roster-form-grid input:focus,
.outsource-roster-form-grid textarea:focus {
  border-color: #5a84b1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 100, 160, .11);
}
.outsource-admin-profile-fields { margin-top: 14px; }
.outsource-admin-profile-fields .section-heading { margin-bottom: 8px; }
.outsource-admin-profile-fields .section-heading h2 { font-size: 15px; }
.outsource-admin-profile-fields .section-heading p { font-size: 11px; }
.form-field { min-width: 0; }
.admin-entry-editor input[type="date"],
.admin-entry-editor input[type="time"],
.admin-entry-editor input[type="number"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
.admin-entry-editor input[type="date"]:focus,
.admin-entry-editor input[type="time"]:focus,
.admin-entry-editor input[type="number"]:focus {
  border-color: #5a84b1;
  box-shadow: 0 0 0 3px rgba(40, 100, 160, .11);
}
.admin-entry-editor textarea {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.admin-entry-editor textarea:focus { border-color: #5a84b1; outline: none; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.admin-entry-remarks { margin-top: 20px; }
.outsource-roster-search-label { display: block; margin: 0 0 6px; color: #657487; font-size: 12px; font-weight: 600; }
.outsource-roster-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.outsource-roster-search { display: block; width: 100%; max-width: 420px; min-width: 0; min-height: 40px; flex: 1 1 280px; margin: 0; padding: 0 12px; border: 1px solid #dce3eb; border-radius: 8px; color: var(--ink); background: #fff; }
.outsource-roster-search:focus { border-color: #5a84b1; outline: none; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.outsource-roster-export { min-height: 32px; flex: 0 0 auto; padding: 0 9px; font-size: 11px; white-space: nowrap; }
.outsource-roster-delete-selected { min-height: 32px; flex: 0 0 auto; padding: 0 9px; white-space: nowrap; }
.outsource-roster-delete-selected:disabled { cursor: not-allowed; opacity: .5; }
.outsource-roster-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.outsource-roster-scroll-hint { display: none; margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.outsource-roster-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.outsource-roster-table-wrap,
.records-card .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}
.outsource-roster-table th,
.outsource-roster-table td {
  padding: 9px 8px;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow-wrap: normal;
}
.outsource-roster-table th { padding: 9px 6px; font-size: 13px; }
.outsource-roster-table thead { background: #e6f2fc; }
.outsource-roster-table th { color: #315b80; text-align: center; }
.outsource-roster-table th:nth-child(1), .outsource-roster-table td:nth-child(1) { width: 34px; min-width: 34px; max-width: 34px; text-align: center; }
.outsource-roster-table th:nth-child(2), .outsource-roster-table td:nth-child(2) { width: 52px; min-width: 52px; max-width: 52px; text-align: center; }
.outsource-roster-table th:nth-child(3), .outsource-roster-table td:nth-child(3) { width: 34px; min-width: 34px; max-width: 34px; text-align: center; }
.outsource-roster-table th:nth-child(4), .outsource-roster-table td:nth-child(4) { min-width: 130px; }
.outsource-roster-table th:nth-child(5), .outsource-roster-table td:nth-child(5) { min-width: 95px; }
.outsource-roster-table th:nth-child(6), .outsource-roster-table td:nth-child(6) { min-width: 65px; }
.outsource-roster-table th:nth-child(7), .outsource-roster-table td:nth-child(7) { min-width: 180px; }
.outsource-roster-table th:nth-child(8), .outsource-roster-table td:nth-child(8) { min-width: 120px; }
.outsource-roster-table th:nth-child(9), .outsource-roster-table td:nth-child(9) { min-width: 90px; }
.outsource-roster-table th:nth-child(10), .outsource-roster-table td:nth-child(10) { min-width: 45px; }
.outsource-roster-table th:nth-child(11), .outsource-roster-table td:nth-child(11) { min-width: 220px; text-align: center; }
.outsource-roster-table th:nth-child(12), .outsource-roster-table td:nth-child(12) { min-width: 260px; }
.outsource-roster-table td:nth-child(-n+4) { position: sticky; z-index: 2; background: #fff; }
.outsource-roster-table th:nth-child(-n+4) { position: sticky; z-index: 3; background: #e6f2fc; }
.outsource-roster-table th:nth-child(1), .outsource-roster-table td:nth-child(1) { left: 0; }
.outsource-roster-table th:nth-child(2), .outsource-roster-table td:nth-child(2) { left: 34px; }
.outsource-roster-table th:nth-child(3), .outsource-roster-table td:nth-child(3) { left: 86px; }
.outsource-roster-table th:nth-child(4), .outsource-roster-table td:nth-child(4) { left: 120px; box-shadow: 2px 0 4px rgba(29, 43, 58, .12); }
.outsource-roster-row.is-selected td { background: #e6f2fc; }
.outsource-roster-select-checkbox { width: 16px; height: 16px; accent-color: var(--navy); }
.outsource-roster-name strong { color: var(--ink); font-size: 15px; }
.outsource-roster-empty { color: var(--muted); font-size: 12px; text-align: center; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 60px; }
.input-suffix span { position: absolute; top: 50%; right: 12px; color: #8a96a4; font-size: 11px; transform: translateY(-50%); pointer-events: none; }
.department-field { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.department-field > .field-label { font-size: 15px; }
.optional-label { margin-left: 7px; color: #748194; font-size: 13px; font-weight: 400; }
.department-options { display: flex; flex-wrap: wrap; gap: 9px; }
.department-option { position: relative; cursor: pointer; }
.department-option input { position: absolute; opacity: 0; }
.department-option span { display: flex; min-height: 38px; align-items: center; padding: 8px 14px; border: 1px solid #dce3eb; border-radius: 7px; color: #566679; background: #fff; font-size: 14px; transition: .15s; }
.department-option input:checked + span { border-color: #a7d2ba; color: #236548; background: #eaf6ef; font-weight: 700; }
.department-option input:focus-visible + span { outline: 3px solid #8ac5a5; outline-offset: 2px; }
.entry-remarks-field { margin-top: 16px; }
.entry-remarks-field textarea { display: block; width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid #dce3eb; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
.entry-remarks-field textarea:focus { border-color: #5a84b1; outline: none; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 21px; padding-top: 17px; border-top: 1px solid #edf0f3; }
.outsource-roster-form-footer { justify-content: flex-end; }
.form-hint { margin: 0; color: #8995a2; font-size: 11px; }
.form-message { margin: 10px 0 0; color: var(--green); font-size: 12px; }
.form-message.error { color: #bd473d; }
.records-card { padding-bottom: 17px; }
.records-card table { min-width: 980px; }
.records-heading { align-items: center; margin-bottom: 17px; }
.records-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.download-pdf-button { min-height: 32px; padding: 0 11px; border: 1px solid #cce7d9; border-radius: 7px; color: #236548; background: #eaf6ef; font-size: 11px; font-weight: 700; }
.download-pdf-button:hover:not(:disabled) { background: #d9efdf; }
.download-pdf-button:focus-visible { outline: 3px solid #8ac5a5; outline-offset: 2px; }
.download-pdf-button:disabled { cursor: not-allowed; opacity: .55; }
.record-count { padding: 6px 10px; border-radius: 20px; color: #64788e; background: #f1f5f8; font-size: 11px; font-weight: 600; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f7f9fb; }
th { padding: 11px 12px; color: #7d8997; font-size: 10px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #edf0f3; color: #445367; font-size: 12px; white-space: nowrap; }
.time-edit-heading, .time-edit-cell { width: 58px; min-width: 58px; padding-right: 6px; padding-left: 6px; text-align: center; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: #263b51; font-weight: 600; }
.outsource-name-cell { color: var(--navy); font-weight: 700; }
.hours-cell { color: var(--navy); font-weight: 700; }
.department-tags { color: #657487; }
.remarks-cell { min-width: 180px; max-width: 320px; white-space: normal; overflow-wrap: anywhere; }
.remarks-display { white-space: pre-wrap; }
.remarks-cell .remarks-display { display: block; }
.records-card .edit-button {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  white-space: nowrap;
}
.records-card .edit-button.entry-edit-icon { display: inline-grid; width: 34px; min-width: 34px; height: 34px; place-items: center; padding: 0; }
.records-card td:last-child .edit-button,
.records-card td:last-child .delete-button {
  display: inline-flex;
  width: 84px;
  min-width: 84px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  white-space: nowrap;
}
.records-card td:last-child .edit-button { margin-right: 8px; }
.remarks-cell .edit-button { margin: 6px 0 0; }
.remarks-cell .remark-actions .edit-button { margin: 0; }
.remark-editor { display: block; width: 220px; max-width: 100%; min-height: 72px; padding: 8px; border: 1px solid #dce3eb; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
.remark-actions { display: flex; gap: 6px; margin-top: 6px; }
.save-remark-button { display: inline-flex; min-width: 44px; height: 34px; align-items: center; justify-content: center; padding: 0 8px; border: 0; border-radius: 6px; color: #fff; background: var(--green); font-size: 11px; font-weight: 700; line-height: 1; }
.save-remark-button:hover { background: #176a4c; }
.save-remark-button:disabled { cursor: wait; opacity: .65; }
.remark-edit-dialog { width: min(560px, calc(100% - 32px)); max-height: min(86vh, 700px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 22px 65px rgba(28, 55, 85, .2); }
.remark-edit-dialog::backdrop { background: rgba(15, 35, 55, .48); }
.remark-edit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.remark-edit-heading h2 { margin: 0 0 5px; font: 700 19px Manrope, sans-serif; }
.remark-edit-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.remark-edit-dialog textarea { display: block; width: 100%; min-height: 180px; max-height: 55vh; padding: 12px; border: 1px solid #dce3eb; border-radius: 8px; color: var(--ink); background: #fff; font: 16px/1.5 "DM Sans", "Segoe UI", sans-serif; resize: vertical; }
.remark-edit-dialog textarea:focus { border-color: #5a84b1; outline: none; box-shadow: 0 0 0 3px rgba(40, 100, 160, .11); }
.remark-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.remark-dialog-cancel { min-height: 34px; padding: 0 12px; border: 1px solid #dce3eb; border-radius: 6px; color: var(--ink); background: #edf4fa; font-size: 12px; font-weight: 600; }
.remark-dialog-cancel:hover { background: #dceaf6; }
.edit-button, .delete-button { padding: 5px 8px; border: 0; border-radius: 6px; font-size: 13px; font-weight: 700; }
.edit-button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; color: var(--navy); background: #edf4fa; }
.edit-button svg { width: 16px; height: 16px; fill: currentColor; }
.edit-button:hover { background: #dceaf6; }
.delete-button { color: #b42318; background: #fff3f1; }
.delete-button:hover { background: #ffe4e0; }
.empty-state { display: flex; min-height: 174px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.empty-state[hidden] { display: none; }
.empty-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 9px; border-radius: 50%; color: #7890a8; background: #edf3f8; font-size: 20px; }
.empty-state strong { color: #48596d; font-size: 13px; }
.empty-state p { margin: 5px 0 0; font-size: 11px; }
.data-notice { margin: 15px 0 0; padding-top: 13px; border-top: 1px solid #edf0f3; color: #8793a0; font-size: 11px; }
.data-notice span { margin-right: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 760px) {
  .outsource-roster-table th:nth-child(9),
  .outsource-roster-table td:nth-child(9),
  .outsource-roster-table th:nth-child(10),
  .outsource-roster-table td:nth-child(10) {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
  }
  .outsource-roster-table th:nth-child(10) { white-space: normal; }
  .dashboard { width: min(100% - 32px, 560px); margin-top: 25px; }
  .topbar { padding: 0 16px; }
  .admin-page .dashboard { width: calc(100% - 24px); }
  .admin-page .topbar { padding-right: 16px; padding-left: 16px; }
  .timesheet-heading { width: 100%; min-width: 0; align-items: flex-start; flex-direction: column; }
  .timesheet-heading #timesheetHeadingName { display: block; font-size: 16px; letter-spacing: -.4px; }
  .timesheet-heading .date-chip { width: fit-content; max-width: 100%; min-width: 0; white-space: normal; }
  .timesheet-heading .date-chip #todayLabel { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .records-card .records-heading { align-items: flex-start; flex-direction: column; }
  .outsource-roster-scroll-hint { display: block; }
  .records-heading-actions { max-width: 100%; flex-wrap: wrap; }
  .department-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .form-grid input[type="date"] { width: calc(100% - 28px); max-width: calc(100% - 28px); }
  .outsource-profile-form-grid input[type="date"] { width: 100%; max-width: 100%; }
  .admin-entry-editor .form-grid input[type="date"] { width: 100%; max-width: 100%; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { gap: 9px; }
  .dashboard .outsource-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard .admin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-entry-trigger { display: flex; width: fit-content; min-height: 44px; margin: 0 0 18px auto; background: var(--green); }
  .mobile-entry-trigger:hover { background: #176a4c; }
  .mobile-entry-back { display: inline-flex; min-height: 38px; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: #fff; font-weight: 600; }
  .entry-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .entry-card { display: none; }
  body.mobile-entry-open .timesheet-heading,
  body.mobile-entry-open .outsource-summary-grid,
  body.mobile-entry-open .records-card,
  body.mobile-entry-open .mobile-entry-trigger { display: none; }
  body.mobile-entry-open .entry-card { display: block; }
  body.mobile-entry-open .entry-card .section-heading { align-items: flex-start; flex-direction: column; }
  .summary-card { gap: 9px; padding: 14px 12px; }
  .summary-icon { width: 32px; height: 32px; }
  .summary-card strong { font-size: 20px; }
  .summary-card .summary-time-words { font-size: 14px; }
  .summary-card small { font-size: 10px; }
}
@media (max-width: 480px) {
  .login-page { padding: 16px 14px; }
  .login-page > .login-card { width: min(100%, 400px); padding: 22px 20px; border-radius: 16px; }
  .login-page .login-logo { width: 145px; }
  .login-page .eyebrow { margin: 17px 0 6px; font-size: 10px; }
  .login-page .login-card h1 { margin-bottom: 8px; font-size: 30px; }
  .login-page .login-copy { margin-bottom: 17px; font-size: 14px; }
  .login-page .field-label { margin-bottom: 5px; }
  .login-page .admin-password-label { margin-top: 12px; }
  .login-page .full-width { margin-top: 14px; }
  .login-page .password-reset-button { margin-top: 8px; }
  .login-page .storage-note { margin-top: 15px; font-size: 11px; }
  .login-page .admin-entry-link { margin-top: 11px; }
  .topbar { padding-right: 10px; padding-left: 10px; }
  .admin-page .topbar { padding-right: 10px; padding-left: 10px; }
  .brand-logo { width: 82px; }
  .user-menu { gap: 6px; }
  .user-menu .admin-nav-link { margin-right: 1px; padding: 5px 6px; font-size: 11px; }
  .user-menu #currentUser { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-menu #viewProfileButton { margin-left: 0; padding: 6px 7px; font-size: 11px; }
  .dashboard { width: calc(100% - 24px); margin-top: 22px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .admin-dashboard-controls { width: 100%; align-items: flex-start; flex-direction: column; }
  .filter-control { width: 100%; justify-content: space-between; }
  .filter-control select { flex: 1; }
  .summary-grid { grid-template-columns: 1fr; }
  .dashboard .admin-summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 86px; align-items: center; }
  .summary-card div { display: grid; grid-template-columns: 1fr auto; flex: 1; align-items: center; column-gap: 8px; }
  .summary-card p { grid-column: 1; margin: 0; }
  .summary-card strong { grid-column: 2; grid-row: 1 / span 2; }
  .summary-card .summary-time-words { grid-column: 1 / -1; grid-row: 2; }
  .summary-card small { grid-column: 1; margin-top: 4px; }
  .content-card { padding: 18px 14px; }
  .profile-dialog {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 11px 12px;
  }
  .profile-dialog-heading {
    top: -11px;
    margin-top: -11px;
    margin-bottom: 8px;
    padding-top: 11px;
  }
  .profile-dialog-heading h2 { font-size: 17px; }
  .profile-dialog-heading p { font-size: 10px; line-height: 1.3; }
  .profile-dialog .field-label { margin-bottom: 3px; font-size: 11px; }
  .form-grid { gap: 12px 9px; }
  .outsource-roster-form-grid { grid-template-columns: 1fr; }
  .outsource-profile-form-grid { grid-template-columns: 1fr; }
  .outsource-profile-form-grid { gap: 6px; }
  .profile-birthday-field { width: 100%; min-width: 0; }
  .profile-dialog .profile-birthday-field #profileBirthday,
  .profile-dialog #profileStartDate {
    display: block;
    width: 50% !important;
    max-width: 50% !important;
  }
  .outsource-profile-form-grid input[type="text"],
  .outsource-profile-form-grid input[type="email"],
  .outsource-profile-form-grid input[type="tel"],
  .outsource-profile-form-grid input[type="date"] { min-height: 40px; padding: 0 11px; }
  .profile-dialog .outsource-profile-form-grid input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-right: 8px;
  }
  .profile-dialog .outsource-profile-form-grid input[type="date"]::-webkit-calendar-picker-indicator {
    width: 18px;
    max-width: 18px;
    margin: 0 0 0 4px;
    padding: 0;
  }
  .outsource-profile-form-grid textarea { min-height: 56px; padding: 7px 11px; }
  .profile-address-field { grid-column: auto; }
  .profile-dialog .form-footer { align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; }
  .profile-dialog .form-hint { min-width: 0; font-size: 9px; }
  .profile-dialog .form-footer .primary-button { width: auto; min-width: 72px; min-height: 38px; flex: 0 0 auto; padding: 0 10px; font-size: 12px; white-space: nowrap; }
  .outsource-roster-form-footer { align-items: center; flex-direction: row; }
  .outsource-roster-form-footer .primary-button { width: auto; }
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .outsource-roster-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-field > .field-label { font-size: 15px; }
  .optional-label { font-size: 13px; }
  .department-option span {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 9px 12px;
    color: #40546a;
    font-size: 14px;
  }
}
@media (max-width: 1100px) {
  .dashboard .outsource-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-card #entryDate { width: 50%; max-width: 50%; }
  .entry-card .time-entry-control,
  .entry-card .input-suffix { width: 50%; max-width: 50%; }
  .entry-card .time-entry-control { gap: 6px; }
  .entry-card .time-entry-control select { width: 72px; flex-basis: 72px; min-height: 40px; padding: 0 8px; }
  .entry-card .time-entry-value { padding: 0 7px; }
}
@media (max-width: 480px) {
  .outsource-roster-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dashboard .outsource-summary-grid { grid-template-columns: minmax(0, 1fr); }
}
