.portal-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .75rem 1rem;
  background: rgba(243, 247, 239, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.portal-tab {
  flex: 0 0 auto;
  background: #eaf3e7;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  min-height: 42px;
  padding: .55rem .9rem;
}
.portal-tab.active {
  background: var(--green);
  color: #fff;
}
.portal-panel, .portal-subpanel {
  display: none;
}
.portal-panel.active, .portal-subpanel.active {
  display: block;
}
.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.portal-header { position: relative; overflow: hidden; justify-content: space-between; padding: 1rem clamp(1rem, 3vw, 2rem); text-align: left; }
.portal-header::after { position: absolute; right: 4%; bottom: -2.5rem; width: 9rem; height: 9rem; border: 1px solid rgba(213,182,74,.35); border-radius: 50%; content: ""; }
.portal-header .brand-block { justify-content: flex-start; width: auto; }
.portal-header .brand-block .site-logo { width: min(250px, 48vw); height: 78px; border-radius: .55rem; box-shadow: none; }
.portal-header h1 { font-size: clamp(1.45rem, 4vw, 2rem); }
.portal-header-subtitle { color: #e6f0e3; font-size: .95rem; }
.portal-welcome { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; margin: 1.2rem 0; padding: clamp(1.25rem, 4vw, 2rem); color: #fff; background: linear-gradient(120deg,#123d1d,#2d6a3c); border: 1px solid #2d6a3c; border-radius: 1.25rem; box-shadow: 0 16px 34px rgba(18,61,29,.18); }
.portal-welcome h2 { max-width: 34rem; margin: .25rem 0 .5rem; color: #fff; font-size: clamp(1.55rem, 4vw, 2.3rem); }
.portal-welcome p:not(.eyebrow) { max-width: 42rem; margin: 0; color: #e7f2e5; line-height: 1.5; }
.portal-welcome .eyebrow { margin: 0; color: #fff3b8; }
.portal-welcome-mark { display: grid; place-items: center; flex: 0 0 96px; height: 96px; color: #123d1d; background: #fff; border: 8px solid #d5b64a; border-radius: 50%; font-weight: 950; letter-spacing: -.08em; transform: rotate(-8deg); }
.portal-quick-actions { margin: 1.5rem 0; }
.portal-section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: .8rem; }
.portal-section-heading h2 { margin: .1rem 0 0; color: var(--green); }
.portal-section-heading .eyebrow { margin: 0; color: var(--green-2); }
.portal-secure-chip { display: inline-flex; align-items: center; min-height: 32px; padding: .3rem .65rem; color: #0d4c16; background: #e4f2e0; border: 1px solid #a9caa1; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.portal-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.portal-action-card { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; min-height: 96px; padding: 1rem; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 8px 18px rgba(0,0,0,.06); transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.portal-action-card:hover, .portal-action-card:focus-visible { border-color: var(--green-2); box-shadow: 0 14px 26px rgba(18,61,29,.14); transform: translateY(-2px); }
.portal-action-card strong, .portal-action-card small { display: block; }
.portal-action-card strong { color: var(--green); font-size: 1.05rem; }
.portal-action-card small { margin-top: .2rem; color: var(--muted); line-height: 1.3; }
.portal-action-primary { color: #fff; background: var(--green); border-color: var(--green); }
.portal-action-primary strong, .portal-action-primary small { color: #fff; }
.portal-action-primary small { color: #d9ecd5; }
.portal-action-gold { background: #fffdf3; border-color: #d5b64a; }
.portal-action-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; color: var(--green); background: #eaf3e7; border-radius: .7rem; font-size: 1.35rem; font-weight: 950; }
.portal-action-primary .portal-action-icon { color: var(--green); background: #fff; }
.portal-arrow { color: var(--green-2); font-size: 1.3rem; font-weight: 900; }
.portal-action-primary .portal-arrow { color: #fff; }
.portal-updates {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 1.2rem 0;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  color: #fff;
  background: linear-gradient(120deg, #123d1d, #2d6a3c);
  border: 1px solid #2d6a3c;
  border-radius: 1.1rem;
  box-shadow: 0 16px 34px rgba(18, 61, 29, .18);
}
.portal-updates h2 { margin: .25rem 0 .4rem; color: #fff; font-size: clamp(1.4rem, 3.5vw, 2rem); }
.portal-updates p:not(.eyebrow) { margin: 0; color: #e7f2e5; line-height: 1.5; }
.portal-updates .eyebrow { margin: 0; color: #fff3b8; }
.portal-notification-empty {
  display: flex;
  gap: .65rem;
  align-items: center;
  min-width: 220px;
  padding: .8rem 1rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: .9rem;
}
.portal-notification-empty > span { display: grid; place-items: center; width: 2rem; height: 2rem; color: #123d1d; background: #fff; border-radius: 50%; font-weight: 900; }
.portal-notification-empty strong, .portal-notification-empty small { display: block; color: #fff; }
.portal-notification-empty small { margin-top: .15rem; color: #e7f2e5; }
.portal-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0; }
.portal-calendar-preview { grid-column: 1 / -1; padding: 1rem 1.1rem; background: rgba(255, 255, 255, .82); border: 1px solid var(--line); border-radius: 1rem; }
.portal-calendar-preview-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.portal-calendar-preview h2 { margin: .25rem 0 0; color: var(--green); }
.portal-calendar-month { margin-top: .75rem; }
.portal-calendar-month-title { margin-bottom: .45rem; color: var(--green); font-weight: 900; }
.portal-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.portal-calendar-weekday, .portal-calendar-day { display: grid; place-items: center; min-height: 2rem; border-radius: .45rem; font-size: .82rem; }
.portal-calendar-weekday { color: var(--muted); font-weight: 800; }
.portal-calendar-day { background: #f5f8f3; border: 1px solid transparent; }
.portal-calendar-day.is-empty { background: transparent; }
.portal-calendar-day.is-today { color: #fff; background: var(--green); font-weight: 900; }
.portal-calendar-empty { margin: .65rem 0 0; color: var(--muted); font-size: .9rem; }
.portal-dashboard-help { grid-column: 1 / -1; margin: 0; }
.portal-profile-card.account-settings-page { margin-top: 1.5rem; }
.clock-location-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; align-items: end; }
.clock-location-control button { width: auto; white-space: nowrap; }
.clock-location-status { min-height: 1.3em; margin: 0; }
.portal-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; margin: 1rem 0; }
.portal-overview-card { padding: 1rem 1.1rem; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 1rem; }
.portal-overview-card h2 { margin: .3rem 0; color: var(--green); font-size: 1.2rem; }
.portal-overview-card p { margin: 0 0 .8rem; color: var(--muted); line-height: 1.4; }
.portal-card-kicker { color: var(--green-2); font-size: .78rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.portal-text-link { color: var(--green); font-weight: 900; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.portal-feature-card {
  display: grid;
  gap: .4rem;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.portal-feature-card span {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 900;
}
.portal-feature-card small {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.35;
}
.portal-training-card {
  border-color: #bfa23b;
  background: #fffdf4;
}
.training-intro h2 {
  margin: 0 0 .3rem;
  color: var(--green);
}
.training-intro p {
  margin-bottom: 0;
}
.training-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}
.training-video-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: .9rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}
.training-video-card h2 {
  margin: 0 0 .35rem;
  color: var(--green);
  font-size: 1.1rem;
}
.training-video-card p {
  min-height: 3.8em;
  margin: 0 0 .75rem;
  color: var(--muted);
  line-height: 1.4;
}
.training-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #17241b;
  border: 1px solid #6e7a6c;
  border-radius: .45rem;
}
.portal-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.portal-profile-card h2 {
  margin: 0;
  color: var(--green);
}
.portal-profile-form {
  display: grid;
  gap: .65rem;
}
.portal-profile-form label {
  display: grid;
  gap: .25rem;
  color: var(--ink);
  font-weight: 800;
}
.portal-profile-form input {
  width: 100%;
}
.portal-profile-form input[readonly] { color: var(--muted); background: #f1f5ef; }
.portal-account-links { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; margin-top: 1rem; }
.portal-auth-status {
  width: min(92%, 520px);
  margin: 3rem auto;
  padding: 1rem 1.1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .75rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}
.portal-auth-status button {
  margin-top: .85rem;
}
.clock-card {
  cursor: default;
  align-content: start;
}
.clock-card *,
.clock-card *::before,
.clock-card *::after {
  box-sizing: border-box;
}
.clock-card [hidden] {
  display: none !important;
}
.clock-card-heading {
  display: grid;
  gap: .4rem;
}
.clock-card label {
  display: grid;
  gap: .2rem;
  color: #1f2937;
  font-size: .95rem;
}
.clock-card input,
.clock-card select,
.clock-card textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: .2rem;
}
.clock-card input[type="time"] {
  min-height: 46px;
  text-align: center;
}
.clock-card label {
  min-width: 0;
}
.clock-card button {
  width: 100%;
  margin-top: .25rem;
}
.clock-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.clock-actions legend {
  width: 100%;
  margin: 0 0 .3rem;
  color: #1f2937;
  font-size: .95rem;
  font-weight: 800;
}
.clock-actions button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: .45rem .35rem;
  border: 1px solid #8a978a;
  border-radius: .45rem;
  color: var(--green);
  background: #fff;
  font: inherit;
  font-size: .83rem;
  font-weight: 800;
  line-height: 1.15;
}
.clock-actions button[aria-pressed="true"] {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}
.clock-actions .clock-full-day-button {
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}
.clock-full-day {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: #f7faf5;
}
.clock-full-day > p {
  margin: 0 0 .6rem;
  color: var(--green);
  font-weight: 900;
}
.clock-full-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.clock-note-details {
  border-top: 1px solid var(--line);
  padding-top: .65rem;
}
.clock-note-details summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 800;
}
.clock-note-details label {
  margin-top: .65rem;
}
.clock-note-details textarea {
  resize: vertical;
}
.clock-card .clock-status {
  min-height: 1.4em;
  margin: .1rem 0 0;
}
.clock-card .clock-status.ok {
  color: #0d4c16;
  font-weight: 800;
}
.clock-card .clock-status.error {
  color: var(--danger);
  font-weight: 800;
}
@media (min-width: 680px) {
  .clock-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.portal-two-column {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}
.portal-form h3,
.card h3 {
  margin-top: 0;
  color: var(--green);
}
.portal-list {
  display: grid;
  gap: .65rem;
}
.portal-item {
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: .8rem;
  background: #fbfdf9;
}
.portal-item strong {
  display: block;
  color: var(--green);
  margin-bottom: .25rem;
}
.portal-item-meta {
  color: var(--muted);
  font-size: .9rem;
  margin: .15rem 0;
}
.portal-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}
.portal-item-actions button {
  min-height: 36px;
  padding: .35rem .65rem;
  font-size: .9rem;
}
.portal-history-card { max-width: 920px; margin-inline: auto; }
.portal-identity-name { display: inline-flex; align-items: center; max-width: 15rem; padding: .55rem .85rem; color: #fff; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.portal-history-toolbar .small-text { margin: 0; }
.portal-history-toolbar button { flex: 0 0 auto; min-height: 38px; }
.portal-history-filter { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .9rem; font-weight: 800; }
.portal-history-filter select { min-height: 38px; padding: .35rem 2rem .35rem .65rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; color: var(--ink); font: inherit; }
.portal-history-frame { display: block; width: 100%; min-height: 360px; margin-top: .8rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.portal-history-actions { display: flex; justify-content: flex-start; margin-top: 1rem; }
.portal-primary-link { background: var(--green); color: #fff; border-radius: 999px; font-weight: 900; }
.portal-history-empty { margin: 0; padding: 1rem; background: #f5f8f3; border: 1px dashed var(--line); border-radius: .75rem; }
.portal-history-warning { margin: .45rem 0 0; color: #7a3f00; font-weight: 800; }
.portal-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-weight: 900;
  font-size: .78rem;
  background: #eaf3e7;
  color: var(--green);
}
.portal-status.pending { background: #fff1b8; color: #5a4100; }
.portal-status.approved, .portal-status.completed { background: #dff4df; color: #0d4c16; }
.portal-status.rejected, .portal-status.urgent { background: #ffe0d8; color: #80200d; }
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 1rem;
  align-items: start;
}
.kanban-column {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .85rem;
  min-height: 220px;
}
.kanban-column h3 {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}
.task-card {
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .75rem;
  background: #fbfdf9;
  margin-bottom: .65rem;
}
.task-card h4 {
  margin: 0 0 .3rem;
  color: var(--green);
}
.portal-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .6rem;
}
.portal-check-grid label {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #fbfdf9;
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .7rem;
}
.portal-check-grid input {
  width: auto;
  margin: 0;
  min-height: auto;
}
.org-preview img {
  max-width: 180px;
  max-height: 110px;
  object-fit: contain;
  display: block;
  margin-bottom: 1rem;
}
.calendar-date-group {
  border-left: 5px solid var(--green);
  padding-left: .7rem;
}
.calendar-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.calendar-intro h2 { margin: 0 0 .3rem; }
.calendar-intro p { margin: 0; }
.calendar-intro-actions { display: grid; gap: .45rem; justify-items: end; }
.button-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: .45rem .8rem;
  text-decoration: none;
}
.calendar-sync-status { font-size: .86rem; color: var(--muted); text-align: right; }
.calendar-board { overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.calendar-toolbar h2 { margin: 0; color: var(--green); font-size: 1.15rem; }
.icon-button { width: 38px; height: 38px; min-height: 38px; padding: 0; font-size: 1.35rem; line-height: 1; }
.calendar-weekdays,
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border: 1px solid var(--line); border-bottom: 0; border-radius: .65rem .65rem 0 0; background: #f5f8f3; }
.calendar-weekdays span { padding: .55rem .35rem; color: var(--muted); font-size: .8rem; font-weight: 800; text-align: center; }
.calendar-month-grid { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.calendar-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .4rem; background: #fff; overflow: hidden; }
.calendar-day time { display: block; color: var(--green); font-weight: 900; font-size: .85rem; margin-bottom: .35rem; }
.calendar-day-today { background: #f2f8ee; box-shadow: inset 0 0 0 2px #98b990; }
.calendar-day-empty { background: #fafcf9; }
.calendar-event { display: block; overflow: hidden; padding: .15rem .3rem; margin-top: .2rem; border-radius: .25rem; background: #eaf3e7; color: #0d4c16; font-size: .72rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-sick-day { background: #ffe0d8; color: #80200d; }
.calendar-event-holiday { background: #fff1b8; color: #5a4100; }
.calendar-event-job { background: #dfeaf7; color: #17456d; }
.calendar-more { display: block; margin-top: .2rem; color: var(--muted); font-size: .7rem; font-weight: 700; }
.back-button {
  margin: .5rem 0;
}
@media (max-width: 850px) {
  .portal-two-column,
  .kanban-board,
  .portal-profile-card {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .portal-header { text-align: center; }
  .portal-header .brand-block { justify-content: center; }
  .portal-header .brand-block .site-logo { width: min(230px,72vw); height: 70px; }
  .portal-header .header-actions { position: relative; z-index: 1; }
  .portal-welcome { align-items: flex-start; }
  .portal-welcome-mark { flex-basis: 68px; width: 68px; height: 68px; border-width: 6px; font-size: .85rem; }
  .portal-section-heading { align-items: flex-start; flex-direction: column; }
  .portal-action-grid, .portal-overview-grid { grid-template-columns: 1fr; }
  .portal-updates { align-items: flex-start; flex-direction: column; }
  .portal-history-toolbar { align-items: stretch; flex-wrap: wrap; }
  .portal-history-toolbar .small-text { flex: 1 1 100%; }
  .portal-history-filter { flex: 1 1 auto; justify-content: space-between; }
  .portal-history-filter select { flex: 1 1 auto; min-width: 0; }
  .portal-notification-empty { width: 100%; }
  .portal-dashboard-grid { grid-template-columns: 1fr; }
  .portal-calendar-preview { grid-column: auto; }
  .portal-calendar-preview-heading { align-items: flex-start; flex-direction: column; }
  .clock-location-control { grid-template-columns: 1fr; }
  .clock-location-control button { width: 100%; }
  .portal-tabs {
    padding: .6rem .55rem;
  }
  .portal-tab {
    font-size: .9rem;
    padding: .5rem .75rem;
  }
  .calendar-intro { align-items: flex-start; flex-direction: column; }
  .calendar-intro-actions { width: 100%; justify-items: stretch; }
  .calendar-sync-status { text-align: left; }
  .calendar-day { min-height: 78px; padding: .25rem; }
  .calendar-weekdays span { padding: .4rem .15rem; font-size: .67rem; }
  .calendar-event { padding: .1rem .2rem; font-size: .62rem; }
  .training-video-grid { grid-template-columns: 1fr; }
  .training-video-card p { min-height: 0; }
}
