:root {
  --cream: #f4f0e6;
  --cream-2: #eee8dc;
  --ink: #1c1916;
  --muted: #8a8478;
  --soft: #5f5a52;
  --forest: #14332c;
  --forest-2: #1c4038;
  --forest-3: #0f2a24;
  --lime: #c8f06a;
  --lime-2: #b6e24f;
  --green: #2f9e5a;
  --green-soft: #d8f3e3;
  --orange: #e2a54a;
  --red: #e15b57;
  --red-soft: #f8d7d6;
  --wfh: #e7c56a;
  --card: #fcfaf4;
  --line: #ece6d8;
  --shadow: 0 10px 30px rgba(40, 32, 22, 0.04);
  --rail: 72px;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --frame: 1240px;
}

html, body { margin: 0; }

.ep-shell {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ep-shell a { text-decoration: none; color: inherit; }
.ep-shell a.ws-btn,
.ep-shell a.ws-btn i,
.ep-shell a.ws-btn i::before {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.ep-shell button,
.ep-shell input,
.ep-shell select,
.ep-shell textarea {
  font-family: var(--sans);
}

.ep-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--forest-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 18px;
  z-index: 30;
}

.ep-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 18px;
}

.ep-rail-nav,
.ep-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.ep-rail-nav { flex: 1; }

.ep-rail-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.ep-rail-link { transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.ep-rail-link i,
.ep-rail-link i::before {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.ep-rail-link:hover { color: #ffffff; background: rgba(255,255,255,.1); }
.ep-rail-link.active {
  color: #ffffff;
  background: var(--lime);
}
.ep-rail-link.active i,
.ep-rail-link.active i::before {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.ep-body {
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}
.ws-frame {
  width: min(var(--frame), 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.ep-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 0;
}

.ep-tabs { display: flex; gap: 6px; align-items: center; }
.ep-tab {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.ep-tab.active {
  background: #171513;
  color: #fff;
}

.ep-top-actions { display: flex; align-items: center; gap: 10px; }
.ep-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 210px;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.ep-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  color: var(--ink);
}

.ep-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft);
  position: relative;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ep-icon-btn:hover { transform: translateY(-1px); }
.ep-icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
}

.ep-avatar-fallback,
.ep-avatar {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #efe8d8;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  cursor: pointer;
}
.ep-avatar img { width: 100%; height: 100%; object-fit: cover; display: none; }

.ep-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
}

.ep-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 0 0 22px;
}

.ep-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ep-head h1 em {
  font-style: italic;
  font-weight: 400;
}

.ep-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ep-leave-link {
  color: #5a8f2f;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.ep-clock { text-align: right; }
.ep-clock small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 700;
  font-family: var(--sans);
}
.ep-clock strong,
.ep-clock span,
[data-live-clock],
[data-time-left],
[data-live-date] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ep-clock strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
  margin: 2px 0;
  font-weight: 500;
}
.ep-clock span { color: var(--muted); font-size: 12px; }

.ep-grid {
  display: grid;
  grid-template-columns: 1.35fr .7fr .7fr 1.2fr;
  grid-template-areas:
    "today hours checkin month"
    "today ontime checkout month"
    "history history history history";
  gap: 16px;
}

.ep-card {
  background: var(--card);
  border: 1px solid rgba(236, 230, 216, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.ep-grid.ep-grid-attend { align-items: stretch; }

.ep-today {
  grid-area: today;
  background: var(--forest);
  color: #eef6f1;
  position: relative;
}
.ep-hours { grid-area: hours; }
.ep-checkin { grid-area: checkin; }
.ep-ontime { grid-area: ontime; }
.ep-checkout { grid-area: checkout; }
.ep-month { grid-area: month; }
.ep-history { grid-area: history; }

.ep-today-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-weight: 600;
}

.ep-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.ep-pill-red { background: #f3c2bf; color: #b42318; }
.ep-pill-green { background: #d7f5c8; color: #3b6d16; }

.ep-today-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.ep-ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ep-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ep-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ep-ring-center b {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.ep-ring-center span { font-size: 11px; opacity: .8; font-family: var(--sans); }

.ep-today-meta { font-size: 12px; line-height: 1.65; color: #c5d5ce; }
.ep-today-meta b {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ep-today-meta .warn { color: #f0c36a; }

.ep-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--lime);
  color: var(--forest-3);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ep-btn:hover { background: var(--lime-2); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(200, 240, 106, 0.28); }
.ep-btn-ghost { background: #e8f7c8; }

.ep-stat h3 {
  margin: 16px 0 4px;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.ep-stat span { color: var(--muted); font-size: 12px; }
.ep-stat .ep-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3eee4;
  color: var(--muted);
}

.ep-month-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}
.ep-month-head small { color: var(--muted); font-weight: 500; }

.ep-month-body {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  align-items: center;
}

.ep-legend { display: grid; gap: 6px; font-size: 13px; color: var(--soft); }
.ep-legend em {
  float: right;
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ep-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}
.ep-dot-green { background: var(--green); }
.ep-dot-yellow { background: var(--wfh); }
.ep-dot-blue { background: #4d7cff; }
.ep-dot-red { background: var(--red); }

.ep-better {
  margin-top: 12px;
  background: #e7f6c8;
  color: #3d6a14;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.ep-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ep-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.ep-showall {
  border: 0;
  background: var(--forest-3);
  color: #f4f0e6;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.ep-pills { display: flex; gap: 8px; }
.ep-mini {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3eee4;
  color: var(--soft);
  font-weight: 600;
}
.ep-mini.office { background: #e5f6ea; color: #2f9e5a; }
.ep-mini.wfh { background: #f8efd2; color: #b8871f; }
.ep-mini.leave { background: #f8e6d2; color: #c2782a; }
.ep-mini.absent { background: #f8d7d6; color: #c0392b; }

.ep-table { width: 100%; border-collapse: collapse; }
.ep-table th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 600;
  padding: 6px 8px 10px;
  font-family: var(--sans);
}
.ep-table td {
  padding: 10px 8px;
  border-top: 1px solid #f0ebe0;
  font-size: 13px;
  vertical-align: middle;
  font-family: var(--sans);
}
.ep-table td:not(:first-child) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ep-member { display: flex; align-items: center; gap: 10px; }
.ep-member-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #efe8d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.ep-member small { display: block; color: var(--muted); font-size: 11px; }

.ep-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-block;
}
.ep-status.office { background: #e7f6ee; color: #2f9e5a; }
.ep-status.wfh { background: #f8efd2; color: #b8871f; }
.ep-status.leave { background: #f8e6d2; color: #c2782a; }
.ep-status.absent { background: #fbe3e2; color: #c0392b; }
.ep-status.holiday,
.ep-status.empty { color: var(--muted); background: transparent; }

.ep-hist {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #f0ebe0;
}
.ep-hist:first-of-type { border-top: 0; }
.ep-hist strong { display: block; font-size: 14px; font-family: var(--sans); }
.ep-hist small { color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ep-hist-hours,
.ep-bar-meta {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ep-hist-hours { text-align: right; color: var(--muted); font-size: 12px; }

.ep-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #efe8d8;
}
.ep-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}
.ep-bar.warn { background: var(--orange); }
.ep-bar.over { background: var(--orange); }
.ep-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

.ep-alert {
  margin: 40px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.ep-alert-success { background: #e7f6c8; color: #3d6a14; }
.ep-alert-info { background: #efe8d8; color: var(--soft); }

.ep-page-card p { color: var(--muted); }
.ep-leave-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0ebe0;
}

.ep-menu { position: relative; }
.ep-menu-list {
  display: none;
  position: absolute;
  right: 0;
  top: 46px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 160px;
  padding: 8px;
  z-index: 40;
}
.ep-menu.open .ep-menu-list { display: block; }
.ep-menu-list button,
.ep-menu-list a {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.ep-menu-list button:hover,
.ep-menu-list a:hover { background: var(--cream); }

@media (max-width: 1200px) {
  .ep-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "today today"
      "hours checkin"
      "ontime checkout"
      "month month"
      "history history";
  }
  .ep-head h1 { font-size: 34px; }
}

@media (max-width: 800px) {
  .ep-body { padding: 0 16px; }
  .ep-top, .ep-head { flex-direction: column; align-items: stretch; }
  .ep-clock { text-align: left; }
  .ep-grid { grid-template-columns: 1fr; grid-template-areas: "today" "hours" "checkin" "ontime" "checkout" "month" "history"; }
}

.ep-guest-body {
  min-height: 100vh;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
.ep-guest-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
}
.ep-guest-aside {
  background-color: var(--forest-3);
  background-image:
    linear-gradient(180deg, rgba(15, 42, 36, 0.78) 0%, rgba(15, 42, 36, 0.88) 55%, rgba(15, 42, 36, 0.92) 100%),
    url("/images/auth-workspace.png");
  background-size: cover;
  background-position: center;
  color: var(--cream);
  padding: 36px 44px 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
}
.ep-guest-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  z-index: 1;
}
.ep-guest-brand .ep-logo { margin: 0; }
.ep-guest-aside-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}
.ep-guest-aside-copy .ws-kicker {
  color: rgba(244, 240, 230, 0.55);
  margin-bottom: 12px;
}
.ep-guest-aside-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--cream);
}
.ep-guest-aside-copy p {
  margin: 16px 0 0;
  color: rgba(244, 240, 230, 0.68);
  font-size: 16px;
  line-height: 1.6;
  max-width: 34ch;
}
.ep-guest-aside-foot {
  margin: 0;
  color: rgba(244, 240, 230, 0.42);
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.ep-guest-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(200, 240, 106, 0.18), transparent 55%),
    var(--cream);
}
.ep-auth-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px 28px 26px;
  position: relative;
  overflow: hidden;
}
.ep-auth-card::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--lime);
  margin: -28px -28px 22px;
}
.ep-auth-card .ws-kicker { margin-bottom: 8px; }
.ep-auth-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: var(--forest-3);
}
.ep-auth-card p.lead {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.ep-auth-card a { color: var(--forest); font-weight: 600; }
.ep-auth-card .ws-btn-block {
  margin-top: 8px;
  border-radius: 999px;
  padding: 13px 18px;
}
.ep-auth-foot { margin: 18px 0 0; }
.ep-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ep-code-input {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
@media (max-width: 860px) {
  .ep-guest-shell { grid-template-columns: 1fr; }
  .ep-guest-aside {
    min-height: auto;
    padding: 24px 24px 20px;
  }
  .ep-guest-aside-copy { padding: 20px 0 16px; }
  .ep-guest-aside-copy h1 { font-size: 36px; }
  .ep-guest-aside-foot { display: none; }
  .ep-guest-panel { padding: 12px 16px 40px; align-items: flex-start; }
  .ep-form-row { grid-template-columns: 1fr; }
}

.ep-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
}
.ep-form input,
.ep-form textarea,
.ep-form select {
  width: 100%;
  border: 1px solid #ece4d4;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  box-sizing: border-box;
}
.ep-form textarea { min-height: 110px; resize: vertical; }
.ep-form input:focus,
.ep-form textarea:focus,
.ep-form select:focus {
  outline: 2px solid rgba(200, 240, 106, .7);
  border-color: #c8f06a;
}
.ep-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin: 16px 0;
  color: var(--soft);
}
.ep-field-error { color: var(--red); font-size: 12px; margin: 6px 0 0; }
.ep-btn-outline {
  background: #fff;
  color: var(--forest-3);
  border: 1px solid #ddd4c4;
}
.ep-btn-outline:hover { background: #f6f1e8; }
.ep-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ep-btn-row .ep-btn { width: auto; min-width: 160px; }

.ep-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.ep-details { margin: 0; }
.ep-details-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0ebe0;
  font-size: 13px;
}
.ep-details-row dt { color: var(--muted); font-weight: 500; }
.ep-details-row dd { margin: 0; font-weight: 600; text-align: right; }
.ep-muted { color: var(--muted); }
.ep-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e7f6c8;
  color: #3d6a14;
  font-size: 13px;
}
.ep-checklist { list-style: none; padding: 0; margin: 0; }
.ep-checklist li {
  padding: 10px 0;
  border-bottom: 1px solid #f0ebe0;
  color: var(--soft);
}
.ep-checklist li.is-done { color: #3d6a14; font-weight: 600; }
.ep-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #efe8d8;
  color: var(--soft);
  text-transform: capitalize;
}
.ep-status-pill.interview { background: #e8f7c8; color: #3d6a14; }
.ep-status-pill.accepted { background: #e5f6ea; color: #2f9e5a; }
.ep-status-pill.active { background: #d7f5c8; color: #3b6d16; }
.ep-status-pill.rejected { background: #f8d7d6; color: #c0392b; }
.ep-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.ep-chat {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ep-chat-thread,
.portal-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  max-height: 420px;
}
.portal-chat-thread::-webkit-scrollbar { width: 8px; }
.portal-chat-thread::-webkit-scrollbar-thumb {
  background: #d9d2c4;
  border-radius: 999px;
}
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 78%;
}
.chat-msg--in { align-self: flex-start; }
.chat-msg--out {
  align-self: flex-end;
  justify-content: flex-end;
}
.chat-avatar,
.ws-conv-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #efe8d8;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-msg-col { min-width: 0; }
.chat-msg--out .chat-msg-col { text-align: right; }
.chat-msg-bubble {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(40,32,22,.04);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.chat-msg--out .chat-msg-bubble {
  background: var(--forest-3);
  color: #eef6f1;
  border-radius: 16px 16px 4px 16px;
}
.chat-msg--in .chat-msg-bubble {
  border-radius: 4px 16px 16px 16px;
}
.chat-msg-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.chat-empty { color: var(--muted); text-align: center; padding: 40px 16px; }
.portal-chat { display: flex; flex-direction: column; min-height: 0; }
.portal-chat-compose {
  padding: 16px 18px 18px;
  border-top: 1px solid #f0ebe0;
  background: rgba(255,253,248,.9);
}
.portal-chat-file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.portal-chat-file-input { display: none; }
.portal-chat-file-name { font-size: 12px; color: var(--muted); margin-left: 8px; }
.ep-instructions { white-space: pre-wrap; color: var(--soft); line-height: 1.7; }
.ep-task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.ep-task-head h2 { margin: 0; font-size: 20px; font-weight: 500; }

@media (max-width: 900px) {
  .ep-split { grid-template-columns: 1fr; }
}

.ws-page {
  flex: 1;
  padding-top: 72px;
  padding-bottom: 28px;
}
.ep-alert + .ws-page { padding-top: 40px; }
.ws-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.ws-crumb i { font-size: 16px; }
.ws-crumb a { color: var(--muted); }
.ws-crumb strong { color: var(--ink); font-weight: 600; }
.ws-account { display: flex; align-items: center; gap: 14px; }
.ws-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.ws-live i { font-size: 8px; color: #b8b2a6; }
.ws-live.is-active { color: #3d6a14; }
.ws-live.is-active i { color: #3d6a14; }
.ws-gear {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
}
.ws-gear:hover, .ws-gear.active { color: var(--ink); background: #efe8d8; }
.ws-userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.ws-userchip .ep-avatar { width: 40px; height: 40px; background: #efe8d8; }
.ws-user-meta strong { display: block; font-size: 13px; line-height: 1.2; }
.ws-user-meta small { color: var(--muted); font-size: 12px; }
.ws-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.ws-foot a { color: var(--ink); font-weight: 600; }

.ws-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin: 0 0 28px;
}
.ws-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 600;
  text-transform: uppercase;
}
.ws-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.ws-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 520px;
}
.ws-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #efe8d8;
  color: var(--soft);
  white-space: nowrap;
}
.ws-pill-blue { background: #e8f1fb; color: #3b6ea8; }
.ws-pill-green { background: #e5f3d4; color: #3d6a14; }
.ws-pill-peach { background: #f6ead6; color: #9a6b2f; }
.ws-pill-soft { background: #f3eee4; color: var(--soft); }

.ws-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 6px 0 28px;
}
.ws-progress-count {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--muted);
}
.ws-progress-count b { color: var(--ink); font-weight: 400; }
.ws-progress-copy { font-size: 14px; color: var(--ink); }
.ws-progress-copy small { display: block; color: var(--muted); margin-top: 2px; }
.ws-bar {
  height: 6px;
  border-radius: 999px;
  background: #e7e0d2;
  overflow: hidden;
  margin-top: 8px;
  max-width: 280px;
}
.ws-bar > span { display: block; height: 100%; background: #3d6a14; border-radius: inherit; }
.ws-progress-meta { text-align: right; font-size: 12px; color: var(--muted); }
.ws-progress-meta strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 300px;
  gap: 28px;
  align-items: start;
}
.ws-layout-wide { grid-template-columns: minmax(0, 1fr) 280px; }

.ws-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ws-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.ws-offer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 24px 18px;
}
.ws-team-label {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.ws-offer h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.ws-offer > p { color: var(--muted); margin: 10px 0 18px; line-height: 1.6; }
.ws-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ws-facts i { color: var(--muted); margin-right: 6px; }
.ws-facts small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ws-facts strong { font-size: 14px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.ws-offer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}
.ws-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-weight: 600;
  font-size: 14px;
}
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--forest-3);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.ws-btn i,
.ws-btn i::before {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.ws-btn:hover { background: var(--forest); color: #ffffff; }
.ws-btn-ghost {
  background: transparent;
  color: var(--soft);
  border: 1px solid var(--line);
}
.ws-btn-block { width: 100%; border-radius: 14px; }

.ws-dark {
  background: var(--forest-3);
  color: #e8efe9;
  border-radius: 22px;
  padding: 24px;
}
.ws-dark h3 {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #fff;
}
.ws-dark p { color: #c5d5ce; line-height: 1.6; margin: 0 0 18px; }
.ws-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ws-people { margin-top: 28px; }
.ws-people h3,
.ws-aside h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}
.ws-person {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ws-person span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #efe8d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.ws-person strong { display: block; font-size: 14px; }
.ws-person small { color: var(--muted); font-size: 12px; }
.ws-ask {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--soft);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ws-essentials { margin-top: 28px; }
.ws-essentials ol { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.ws-essentials li { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; }
.ws-essentials b { color: var(--muted); font-weight: 600; min-width: 22px; }

.ws-check-list { margin-top: 28px; }
.ws-check-list h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}
.ws-check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}
.ws-check-item input { margin-top: 4px; accent-color: var(--forest); }
.ws-check-item strong { display: block; color: var(--ink); font-weight: 600; }
.ws-check-item small { color: var(--muted); }
.ws-check-item.is-done { color: #3d6a14; }
.ws-check-item.is-done strong { color: #3d6a14; }
.ws-locked { opacity: .55; pointer-events: none; }

.ws-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.ws-form-grid .full { grid-column: 1 / -1; }
.ws-form-grid label,
.ws-sec h3 { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 8px; display: block; }
.ws-form-grid input,
.ws-form-grid select,
.ws-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  box-sizing: border-box;
}
.ws-form-grid input[inputmode="numeric"] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ws-sec { margin-top: 28px; }
.ws-sec p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.ws-form-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.ws-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }

.ws-details { margin-top: 22px; }
.ws-details .ep-details-row { padding: 11px 0; }
.ws-note {
  margin-top: 22px;
  color: #3d6a14;
  font-size: 13px;
}
.ws-note i { margin-right: 6px; }
.ws-payslips { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--line); }
.ws-payslip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ws-payslip i { color: var(--muted); }
.ws-payslip small { display: block; color: var(--muted); font-size: 12px; }
.ws-payslip em {
  margin-left: auto;
  font-style: normal;
  font-weight: 500;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ws-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 8px 0 26px;
}
.ws-count {
  text-align: center;
  padding: 8px 0 18px;
}
.ws-count b {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.ws-count span { color: var(--muted); font-size: 13px; }
.ws-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-block;
}
.ws-dot-todo { color: #c4bbaa; background: #efe8d8; }
.ws-dot-prog { color: #6ea8e8; }
.ws-dot-done { color: #3d6a14; background: #e5f3d4; }

.ws-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}
.ws-filters { display: flex; gap: 4px; }
.ws-filters button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.ws-filters button.active { background: var(--forest-3); color: #fff; }
.ws-tools { display: flex; align-items: center; gap: 10px; }
.ws-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  min-width: 180px;
}
.ws-search input { border: 0; outline: 0; background: transparent; width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink); }
.ws-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ws-table-wrap { overflow: auto; }
.ws-table { width: 100%; border-collapse: collapse; }
.ws-table th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}
.ws-table td {
  padding: 16px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
  font-family: var(--sans);
}
.ws-table td:nth-child(5) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ws-task-title { font-weight: 600; }
.ws-task-title small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }
.ws-pri { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ws-pri i { font-size: 8px; }
.ws-pri-high { color: #c0392b; }
.ws-pri-medium { color: #c2782a; }
.ws-pri-low { color: #3d6a14; }
.ws-assign {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #efe8d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.ws-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--forest); }
.ws-table tr.is-done .ws-task-title { text-decoration: line-through; color: var(--muted); }

.ws-msg {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  min-height: 560px;
  align-items: stretch;
}
.ws-inbox {
  padding-right: 22px;
}
.ws-inbox h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ws-inbox-search { margin-bottom: 14px; width: 100%; }
.ws-unread {
  font-family: var(--sans);
  font-size: 11px;
  background: #efe8d8;
  color: var(--soft);
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 600;
}
.ws-conv {
  display: block;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 8px;
  color: inherit;
}
.ws-conv.active { background: #efe8d8; }
.ws-conv-top { display: flex; gap: 10px; align-items: flex-start; }
.ws-conv-copy { min-width: 0; flex: 1; }
.ws-conv-name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.ws-conv-name strong { font-size: 14px; }
.ws-conv-name em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
  white-space: nowrap;
}
.ws-conv small { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; line-height: 1.4; }
.ws-conv-role { font-size: 11px !important; }
.ws-thread {
  background: transparent;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.ws-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
}
.ws-thread-head h2 {
  margin: 0;
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 600;
}
.ws-thread-head small { color: var(--muted); display: block; font-weight: 500; }
.ws-thread-range {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 600;
  text-align: right;
  margin-bottom: 8px;
}
.ws-thread .portal-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ws-thread .portal-chat-thread {
  background: transparent;
  padding: 8px 4px 16px;
}
.ws-compose {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}
.ws-compose textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  resize: vertical;
  background: #fff;
  box-sizing: border-box;
}
.ws-compose textarea::placeholder { color: #b4aea3; }
.ws-compose-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ep-grid-attend {
  grid-template-columns: 1.2fr .7fr .7fr 1.15fr;
  grid-template-areas:
    "today hours checkin month"
    "today ontime checkout month"
    "team team history history";
}
.ep-team { grid-area: team; }
.ep-history { grid-area: history; }
.ep-month-head small {
  font-size: 11px;
  background: #efe8d8;
  padding: 4px 8px;
  border-radius: 999px;
}

@media (max-width: 1100px) {
  .ws-layout, .ws-layout-wide, .ws-msg { grid-template-columns: 1fr; }
  .ws-facts, .ws-form-grid, .ws-counts { grid-template-columns: 1fr; }
  .ws-title { font-size: 32px; }
  .ep-grid-attend {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "today today"
      "hours checkin"
      "ontime checkout"
      "month month"
      "team team"
      "history history";
  }
}
@media (max-width: 800px) {
  .ep-body { padding: 0 16px; }
  .ws-hero, .ws-toolbar, .ws-account, .ws-offer-actions, .ws-progress { flex-direction: column; align-items: stretch; }
  .ws-progress { grid-template-columns: 1fr; }
  .ws-user-meta { display: none; }
}
