:root {
  color-scheme: light;
  --blue: #1B4FD8;
  --blue-dark: #1340B0;
  --yellow: #F5C518;
  --yellow-dark: #C49A00;
  --red: #D92B2B;
  --green: #1A9E5A;
  --ink: #0F1B3D;
  --text: #4A5578;
  --muted: #8E97B0;
  --bg: #F4F6FB;
  --info: #E8EEFB;
  --warn-bg: #FEF9E7;
  --red-bg: #FEF0F0;
  --green-bg: #E8F8EF;
  --line: #D4DCF5;
  --panel: #FFFFFF;
  --shadow: 0 4px 20px rgba(15, 27, 61, .08);
  --shadow-hover: 0 8px 32px rgba(15, 27, 61, .14);
  --sidebar-w: 210px;
}

:root[data-font-scale="100"] { --font-zoom: 1; --font-zoom-inverse: 1; }
:root[data-font-scale="110"] { --font-zoom: 1.1; --font-zoom-inverse: .9091; }
:root[data-font-scale="120"] { --font-zoom: 1.2; --font-zoom-inverse: .8333; }
:root[data-font-scale="130"] { --font-zoom: 1.3; --font-zoom-inverse: .7692; }
:root[data-font-scale="140"] { --font-zoom: 1.4; --font-zoom-inverse: .7143; }
:root[data-font-scale="150"] { --font-zoom: 1.5; --font-zoom-inverse: .6667; }

*, *::before, *::after { box-sizing: border-box; }

body {
  zoom: var(--font-zoom, 1);
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Poppins, Arial, sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

.date-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--info);
  font-weight: 600;
}

.date-chip button {
  min-width: 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 27, 61, .42);
}

.modal-card {
  width: min(520px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-hover);
}

.update-modal-backdrop {
  z-index: 10000;
}

.update-modal-card {
  border-radius: 8px;
}

.schedule-review-modal {
  width: min(980px, 100%);
  border-radius: 8px;
}

.schedule-review-candidate {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.schedule-review-candidate:last-child {
  border-bottom: 0;
}

.schedule-review-candidate span {
  display: grid;
  gap: 2px;
}

.schedule-review-candidate small {
  color: var(--muted);
  font-size: 10px;
}

.date-row-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.date-edit-row,
.employee-inline,
.chat-thread-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-edit-row {
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.avatar-photo {
  object-fit: cover;
}

.birthday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.birthday-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.birthday-card-today {
  grid-column: 1 / -1;
  border-color: rgba(26, 158, 90, .35);
  background: linear-gradient(135deg, #EAF8F0 0%, #FFFFFF 72%);
  box-shadow: 0 14px 28px rgba(26, 158, 90, .12);
}

.birthday-card h3 {
  margin: 0 0 4px;
}

.birthday-card-icon {
  margin-right: 7px;
}

.birthday-today-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 158, 90, .12);
  color: #157A47;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.birthday-congrats-button,
.birthday-sent-button {
  margin-top: 10px;
  min-height: 32px;
  font-size: 11px;
}

.birthday-sent-button {
  color: #157A47;
  border-color: rgba(26, 158, 90, .28);
  background: rgba(26, 158, 90, .08);
}

.birthday-welcome-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: -8px 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(26, 158, 90, .26);
  border-radius: 8px;
  background: linear-gradient(135deg, #EAF8F0 0%, #FFFFFF 68%);
  box-shadow: 0 16px 34px rgba(26, 158, 90, .12);
}

.birthday-welcome-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #157A47;
  color: #fff;
  font-size: 34px;
}

.birthday-welcome-kicker {
  margin: 0 0 3px;
  color: #157A47;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.birthday-welcome-card h2 {
  margin-bottom: 4px;
  color: #0F5D35;
  font-size: 20px;
}

.birthday-welcome-card p {
  max-width: 760px;
}

.birthday-welcome-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(26, 158, 90, .2);
  background: #fff;
  color: #157A47;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}

.birthday-congrats-modal textarea {
  resize: vertical;
  min-height: 120px;
}

.birthday-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.employee-inline .avatar,
.chat-thread-title .avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 9px;
}

.chat-header-avatar {
  float: left;
  width: 34px;
  height: 34px;
  margin-right: 10px;
}

.profile-avatar-upload {
  position: relative;
  display: inline-grid;
  cursor: pointer;
}

.profile-avatar-upload::after {
  content: '+';
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.profile-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

button, input, select, textarea { font: inherit; }

/* ── Buttons ── */
button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: filter .15s, transform .1s, box-shadow .15s;
}

button:hover:not(:disabled) {
  filter: brightness(.95);
  box-shadow: 0 2px 10px rgba(245, 197, 24, .4);
}

button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .5; }
button.secondary { background: var(--blue); color: #fff; }
button.secondary:hover:not(:disabled) { filter: brightness(.92); box-shadow: 0 2px 10px rgba(27, 79, 216, .3); }
button.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--line); }
button.ghost:hover:not(:disabled) { background: var(--info); filter: none; box-shadow: none; }
button.danger { background: var(--red); color: #fff; }
button.danger:hover:not(:disabled) { filter: brightness(.9); box-shadow: 0 2px 10px rgba(217, 43, 43, .3); }

/* ── Inputs ── */
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 216, .1);
}

input:disabled {
  background: var(--info);
  color: var(--text);
  cursor: not-allowed;
}

textarea { min-height: 96px; resize: vertical; }

label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── Auth ── */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(320px, 24vw, 420px) minmax(0, 1fr);
  background:
    radial-gradient(circle at 85% 18%, rgba(27, 79, 216, .08), transparent 28%),
    var(--bg);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 36px;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, .08), transparent 26%),
    radial-gradient(circle at 28% 18%, rgba(245, 197, 24, .10), transparent 20%),
    linear-gradient(160deg, #1B4FD8 0%, #1340B0 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .045);
}

.auth-brand::after {
  content: '';
  position: absolute;
  top: -80px;
  left: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(245, 197, 24, .06);
}

.logo {
  width: 170px;
  max-width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

.auth-logo-mark {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .10);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    0 12px 32px rgba(15, 27, 61, .20);
  flex-shrink: 0;
}

.auth-logo-mark::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 14px;
  background: rgba(15, 27, 61, .12);
}

.auth-logo {
  position: relative;
  z-index: 1;
  width: 76%;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 27, 61, .16);
}

.auth-brand-footer { display: none; }

.auth-brand h1 {
  margin: 28px 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.3px;
  position: relative;
  z-index: 1;
}

.auth-brand p {
  color: rgba(255, 255, 255, .78);
  max-width: 280px;
  line-height: 1.6;
  font-size: 11px;
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .82);
  font-weight: 600;
}

.auth-feature-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}

.auth-card {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--bg);
}

.auth-panel {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.wide-auth-panel {
  width: min(760px, 100%);
}

/* ── Auth welcome header ── */
.auth-welcome {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.auth-welcome-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--info);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-welcome-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.auth-welcome-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

/* ── Password eye toggle ── */
.input-eye {
  position: relative;
}

.input-eye input {
  padding-right: 42px;
}

.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  display: grid;
  place-items: center;
}

.eye-btn:hover { background: var(--info); color: var(--blue); filter: none; box-shadow: none; transform: translateY(-50%); }

/* ── Auth submit button ── */
.auth-submit {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  font-size: 13px;
}


/* ── Tabs ── */
.tabs, .segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tabs { margin-bottom: 20px; }

.tab, .segmented button {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
  transition: background .15s, color .15s;
}

.tab:hover:not(:disabled), .segmented button:hover:not(:disabled) {
  background: var(--info);
  color: var(--blue);
  filter: none;
  box-shadow: none;
  transform: none;
}

.tab.active, .segmented button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27, 79, 216, .22);
}

.tab.active:hover:not(:disabled), .segmented button.active:hover:not(:disabled) {
  filter: brightness(.92);
  box-shadow: 0 2px 8px rgba(27, 79, 216, .22);
  transform: none;
}

/* ── Forms ── */
.form { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row > label { min-width: 180px; flex: 1; }

/* ── Feedback messages ── */
.message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.5;
}

.message.error {
  border-left-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}

/* ── Toast notifications ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(15, 27, 61, .22);
  max-width: 340px;
  pointer-events: all;
  animation: toast-in .22s ease;
}

.toast.ok { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warn { background: #E07B00; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading ── */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}

.loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  color: var(--muted);
  font-size: 11px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Shell layout ── */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh * var(--font-zoom-inverse, 1));
  height: calc(100dvh * var(--font-zoom-inverse, 1));
  max-height: calc(100vh * var(--font-zoom-inverse, 1));
  max-height: calc(100dvh * var(--font-zoom-inverse, 1));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}

.sidebar-header {
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
}

.sidebar .logo { width: 118px; margin: 0 auto 8px; display: block; }

.sidebar-title {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overscroll-behavior: contain;
  padding: 10px 8px 4px;
}

.nav { display: grid; gap: 2px; }
.nav { padding-bottom: 14px; }

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .28);
  border-radius: 999px;
  border: 2px solid var(--blue);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .42);
}

.nav button {
  width: 100%;
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  border: none;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}

.nav button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  filter: none;
  box-shadow: none;
  transform: none;
}

.nav button.active {
  background: var(--yellow);
  color: var(--blue-dark);
}

.nav button.active:hover:not(:disabled) {
  background: var(--yellow);
  color: var(--blue-dark);
  filter: brightness(.96);
  box-shadow: none;
  transform: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  opacity: .9;
}

.nav button.active .nav-icon { opacity: 1; }

/* ── Content area ── */
.content {
  min-width: 0;
  padding: 22px 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -24px 20px;
  padding: 12px 24px 14px;
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(212, 220, 245, .9);
}

.topbar-left { display: flex; align-items: center; gap: 10px; }

.push-permission-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 12px 14px;
  border: 1px solid #bfd3ff;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eef4ff;
  color: var(--text);
}

.push-permission-notice div {
  display: grid;
  gap: 2px;
}

.push-permission-notice strong {
  color: var(--blue);
  font-size: 13px;
}

.push-permission-notice span {
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

h1, h2, h3, h4, p { letter-spacing: 0; }
h1 { margin: 0; color: var(--blue); font-size: 20px; line-height: 1.2; font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
h4 { margin: 0 0 6px; font-size: 12px; }
p { line-height: 1.55; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.topbar-status {
  min-height: 36px;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topbar-status-content {
  display: grid;
  gap: 3px;
}

.topbar-status-detail {
  max-width: 260px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.topbar-status > span:first-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.birthday-today-chip {
  min-height: 36px;
  background: #EAF8F0;
  color: var(--ink);
  border: 1px solid rgba(26, 158, 90, .35);
  box-shadow: none;
}

.birthday-today-chip:hover:not(:disabled) {
  background: #DDF3E7;
  filter: none;
  box-shadow: none;
}

.birthday-today-chip span {
  color: #157A47;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.birthday-today-chip .birthday-chip-icons {
  color: inherit;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.birthday-today-chip strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-message-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(26, 158, 90, .35);
  background: #157A47;
  color: #fff;
  box-shadow: 0 8px 18px rgba(26, 158, 90, .18);
  font-size: 11px;
  font-weight: 800;
}

.birthday-message-chip:hover:not(:disabled) {
  background: #10683B;
  color: #fff;
  filter: none;
  box-shadow: 0 10px 22px rgba(26, 158, 90, .22);
  transform: none;
}

.birthday-message-chip svg {
  width: 15px;
  height: 15px;
}

.birthday-message-band {
  background: #EAF8F0;
  border-bottom-color: rgba(26, 158, 90, .2);
}

.birthday-message-list {
  display: grid;
  gap: 12px;
}

.birthday-message-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border-color: rgba(26, 158, 90, .18);
}

.birthday-message-card .avatar {
  width: 42px;
  height: 42px;
  font-size: 11px;
}

.birthday-message-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.birthday-message-head span {
  color: var(--muted);
  font-size: 10px;
}

.birthday-message-card p {
  margin: 0;
  color: var(--text);
}

.support-toggle {
  position: relative;
  gap: 8px;
}

.topbar-logout {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(217, 43, 43, .25);
  background: #fff;
  color: var(--danger);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

.topbar-logout:hover:not(:disabled) {
  background: rgba(217, 43, 43, .08);
  color: var(--danger);
  filter: none;
  box-shadow: none;
  transform: none;
}

.topbar-switch-profile {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(27, 79, 216, .22);
  background: #fff;
  color: var(--blue);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

.topbar-switch-profile:hover:not(:disabled) {
  background: rgba(27, 79, 216, .08);
  color: var(--blue);
  filter: none;
  box-shadow: none;
  transform: none;
}

.topbar-profile {
  position: relative;
  z-index: 10050;
  margin-left: 2px;
}

.topbar-profile-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
}

.topbar-profile-button:hover:not(:disabled),
.topbar-profile-button[aria-expanded="true"] {
  background: var(--info);
  filter: none;
  box-shadow: none;
  transform: none;
}

.topbar-profile-button .avatar {
  width: 32px;
  height: 32px;
  font-size: 10px;
}

.topbar-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10060;
  width: min(280px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-hover);
}

.topbar-profile-info {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 8px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.topbar-profile-info .avatar {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.topbar-profile-info strong,
.topbar-profile-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile-info strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.topbar-profile-info span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-menu-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.profile-menu-item:hover:not(:disabled) {
  background: var(--info);
  color: var(--blue);
  filter: none;
  box-shadow: none;
  transform: none;
}

.profile-menu-item.danger {
  margin-top: 4px;
  background: var(--red);
  color: #fff;
}

.profile-menu-item.danger:hover:not(:disabled) {
  background: #B91F1F;
  color: #fff;
}

.topbar-user {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 260px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topbar-user .avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 10px;
}

.topbar-user-name {
  max-width: 190px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-role {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d92b2b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.section { margin-bottom: 20px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h2 { margin: 0; }

.band {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 -24px 20px;
  padding: 18px 24px;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}

.chart-bar {
  height: 10px;
  background: #eef2ff;
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chat-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.chat-shell.employee-chat-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}

.chat-list-panel,
.chat-window {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.chat-list-panel {
  display: flex;
  flex-direction: column;
}

.chat-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 2px;
}

.chat-list-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.chat-list-item span,
.chat-list-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.chat-list-item.active {
  border-color: var(--blue);
  background: #f5f8ff;
}

.chat-window {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  overflow: hidden;
}

.employee-chat-shell .chat-window {
  width: 100%;
  min-height: 640px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 16px 0;
  display: grid;
  gap: 10px;
}

.chat-message {
  display: flex;
}

.chat-message.mine {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(680px, 92%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}

.chat-message.mine .chat-bubble {
  background: #edf4ff;
  border-color: #cfe0ff;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-attachment {
  margin-top: 8px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.chat-composer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.chat-composer textarea {
  min-height: 90px;
  resize: vertical;
}

.composer-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.composer-file {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  color: var(--muted);
}

.composer-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-empty,
.chat-closed {
  min-height: 320px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--muted);
}

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow .2s, transform .15s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.card-actions button {
  flex: 1 1 140px;
  justify-content: center;
}

.admin-section-card,
.profile-choice-card {
  width: 100%;
  text-align: left;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
}

.admin-section-card:hover,
.profile-choice-card:hover {
  border-color: var(--brand);
}

/* ── KPI card ── */
.kpi {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.employee-dashboard-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--info);
  color: var(--blue);
  flex-shrink: 0;
  transition: transform .15s;
}

.card:hover .kpi-icon { transform: scale(1.08); }

.metric {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.muted { color: var(--muted); }
.small { font-size: 10px; }
.code { font-family: "Courier New", monospace; color: var(--blue-dark); font-weight: 700; font-size: 11px; }

/* ── Status pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ok { background: var(--green-bg); color: var(--green); }
.pending { background: #FEF5E7; color: #E07B00; }
.bad { background: var(--red-bg); color: var(--red); }
.info { background: var(--info); color: var(--blue); }

/* ── Alerts ── */
.alert-list { display: grid; gap: 8px; }

.alert {
  border-left: 3px solid var(--blue);
  background: var(--info);
  border-radius: 0 8px 8px 0;
  padding: 11px 13px;
  font-size: 11px;
  line-height: 1.55;
}

.alert strong { display: block; margin-bottom: 2px; font-size: 12px; }
.alert.warn { border-left-color: var(--yellow-dark); background: var(--warn-bg); }
.alert.bad  { border-left-color: var(--red);         background: var(--red-bg); }
.alert.ok   { border-left-color: var(--green);        background: var(--green-bg); }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--info);
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

td { color: var(--text); font-size: 11px; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(232, 238, 251, .55); }
tr:last-child td { border-bottom: 0; }

/* ── Module / roadmap cards ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.module-card {
  display: grid;
  gap: 10px;
  min-height: 130px;
}

.module-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  min-height: 0;
  cursor: pointer;
  text-decoration: none;
  transition: gap .12s;
}

.card-link:hover { gap: 7px; filter: none; box-shadow: none; transform: none; }

/* ── Progress bar ── */
.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--bg);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .6s ease;
}

.upload-status {
  display: grid;
  gap: 7px;
}

.upload-status-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.upload-status-head strong {
  color: var(--ink);
}

/* ── Portal layout ── */
.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: 14px;
}

/* ── Calendar ── */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  transition: box-shadow .15s;
}

.day:hover { box-shadow: var(--shadow); }
.day strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; }
.day.off { background: var(--warn-bg); border-color: #F2D787; }
.day.blocked { background: var(--red-bg); border-color: #F3B6B6; }
.day.special-day,
.day.special-day strong,
.day.special-day .muted {
  color: var(--red);
}

.day.special-day {
  background: #fff0f0;
  border-color: #ef9a9a;
}

.deadline-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.mini-stat {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.mini-stat strong {
  font-size: 22px;
  line-height: 1;
}

.mini-stat span {
  color: var(--muted);
  font-size: 11px;
}

.mini-stat.warn { border-color: #F2D787; background: var(--warn-bg); }
.mini-stat.bad { border-color: #F3B6B6; background: var(--red-bg); }

tr.row-warn td { background: rgba(255, 247, 219, .7); }
tr.row-danger td { background: rgba(255, 235, 235, .75); }

.schedule-matrix-section {
  padding-inline: 0;
}

.schedule-matrix-section .section-header {
  padding-inline: 16px;
}

.schedule-matrix-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-matrix-actions button:disabled {
  opacity: .38;
  filter: grayscale(.35);
}

.schedule-filter-row > label {
  min-width: 190px;
}

.schedule-report-download {
  justify-content: flex-end;
  align-items: flex-end;
  margin-top: 12px;
}

.schedule-report-download label {
  width: 140px;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}

.schedule-legend strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.schedule-legend .special-day,
.schedule-legend .special-day strong {
  color: var(--red);
}

.schedule-matrix-wrap {
  width: 100%;
  max-height: calc(100vh - 230px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.schedule-matrix {
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0;
  font-family: Arial, sans-serif;
}

.schedule-matrix th,
.schedule-matrix td {
  width: 32px;
  min-width: 32px;
  height: 28px;
  padding: 0;
  border-right: 1px solid #1d2742;
  border-bottom: 1px solid #1d2742;
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

.schedule-matrix th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.schedule-matrix-weekdays th:not(.schedule-matrix-employee-head) {
  height: 82px;
}

.schedule-matrix thead tr:nth-child(2) th {
  top: 82px;
}

.schedule-matrix-weekdays th span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1;
}

.schedule-matrix-employee-head,
.schedule-matrix-employee {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px;
  border-left: 1px solid #1d2742;
  text-align: left !important;
}

.schedule-matrix-employee-head {
  padding: 0 10px !important;
  background: #f8fafc !important;
  color: #111827 !important;
}

.schedule-matrix-employee {
  padding: 5px 8px !important;
  background: #fff !important;
}

.schedule-matrix tbody tr:hover td {
  background: #f8fbff;
}

.schedule-matrix tbody tr:hover .schedule-matrix-employee {
  background: #eef4ff !important;
}

.schedule-matrix-employee strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-matrix-employee span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-matrix td.off {
  background: #fff7d6;
}

.schedule-matrix td.absence {
  background: #ffe9e9;
}

.schedule-matrix td.locked {
  background: #fff0f0;
}

.schedule-matrix th.special-day,
.schedule-matrix td.special-day,
.schedule-matrix .special-day .schedule-matrix-cell,
.schedule-matrix .special-day .schedule-matrix-code {
  color: var(--red);
}

.schedule-matrix th.special-day,
.schedule-matrix td.special-day {
  background: #fff0f0 !important;
}

.schedule-matrix-cell {
  width: 100%;
  height: 100%;
  min-height: 28px;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.schedule-matrix-cell:hover:not(:disabled) {
  background: rgba(27, 79, 216, .09);
  box-shadow: inset 0 0 0 2px var(--blue);
  filter: none;
  transform: none;
}

.schedule-matrix-cell:disabled {
  cursor: default;
  opacity: 1;
}

.schedule-matrix-cell-dirty {
  background: rgba(245, 197, 24, .24);
  box-shadow: inset 0 0 0 2px var(--yellow-dark);
}

.schedule-matrix-code,
.schedule-matrix-empty {
  display: grid;
  min-height: 28px;
  place-items: center;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.schedule-matrix-empty {
  color: var(--muted);
  font-weight: 600;
}

.standalone-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  background: var(--bg);
}

.standalone-closebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 10px;
}

.standalone-closebar button {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-height: 140px;
  width: 48px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.standalone-page {
  padding: 22px;
}

.standalone-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.standalone-hero h1 {
  margin: 2px 0;
  font-size: 24px;
}

.standalone-calendar .calendar {
  gap: 8px;
}

.standalone-calendar .day {
  min-height: 88px;
  padding: 10px;
}

.standalone-calendar .day strong {
  font-size: 14px;
}

.pdf-viewer-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #10182F;
}

.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 15, 31, .72);
  backdrop-filter: blur(2px);
}

.pdf-viewer-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.pdf-viewer-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(15, 27, 61, .16);
}

.pdf-viewer-toolbar h1 {
  margin: 2px 0 0;
  font-size: 18px;
}

.pdf-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pdf-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.pdf-link-button:hover {
  background: var(--info);
  box-shadow: none;
  transform: none;
}

.pdf-viewer-stage {
  min-height: 0;
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
  overflow: auto;
  background: #E8ECF7;
}

.pdf-page {
  display: grid;
  gap: 8px;
  margin: 0 auto;
}

.pdf-page-label {
  color: rgba(15, 27, 61, .72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pdf-page-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(15, 27, 61, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .26);
}

.pdf-viewer-loading {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}

.pdf-viewer-loading svg {
  width: 34px;
  height: 34px;
}

@media print {
  body {
    background: #fff;
  }
  .pdf-viewer-overlay {
    position: static;
    inset: auto;
    background: #fff;
    backdrop-filter: none;
  }
  .pdf-viewer-toolbar {
    display: none !important;
  }
  .pdf-viewer-shell {
    background: #fff;
  }
  .pdf-viewer-stage {
    background: #fff;
    padding: 0;
    overflow: visible;
  }
  .pdf-page {
    page-break-after: always;
    break-after: page;
  }
  .pdf-page-canvas {
    box-shadow: none;
    border: 0;
  }
  body > *:not(.pdf-viewer-overlay) {
    display: none !important;
  }
}

.field-block {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.check-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.check-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 760px) {
  .deadline-summary {
    grid-template-columns: 1fr;
  }

  .standalone-shell {
    grid-template-columns: 1fr;
  }

  .standalone-closebar {
    position: static;
    height: auto;
    padding: 10px;
    justify-content: flex-start;
  }

  .standalone-closebar button {
    writing-mode: horizontal-tb;
    transform: none;
    min-height: 42px;
    width: auto;
  }

  .standalone-page {
    padding: 14px;
  }

  .standalone-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ── Empty state ── */
.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 36px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  text-align: center;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty svg { opacity: .3; }

/* ── File drop ── */
.file-drop {
  display: grid;
  gap: 10px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, .7);
  transition: border-color .15s, background .15s;
}

.file-drop:focus-within {
  border-color: var(--blue);
  background: var(--info);
}

/* ── Checkline ── */
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-size: 11px;
  font-weight: 400;
}

.checkline input { width: auto; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.payroll-addition-selection-actions {
  margin-bottom: 10px;
}

.payroll-addition-records {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.payroll-addition-record {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.payroll-addition-record:first-child {
  border-top: 0;
  padding-top: 0;
}

.payroll-addition-select {
  display: none;
  align-items: center;
}

.payroll-additions-selecting .payroll-addition-select {
  display: inline-flex;
}

.payroll-addition-block {
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.payroll-addition-block-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.payroll-addition-block-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.payroll-addition-block:not(.payroll-addition-block-main):first-child {
  border-top: 0;
}

.payroll-addition-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.payroll-addition-block summary::-webkit-details-marker {
  display: none;
}

.payroll-addition-block summary > span:first-child {
  display: grid;
  gap: 2px;
}

.payroll-addition-block summary strong {
  color: var(--text);
}

.payroll-addition-block summary small {
  color: var(--muted);
}

.payroll-addition-block-items {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.payroll-addition-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

@media (max-width: 620px) {
  .payroll-addition-record {
    grid-template-columns: auto 1fr;
  }

  .payroll-addition-record .inline-actions {
    grid-column: 1 / -1;
  }

  .payroll-addition-item {
    grid-template-columns: 1fr;
  }
}

.readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.day {
  border-top: 3px solid var(--employee-accent, transparent);
}

.employee-day-name {
  color: var(--employee-accent, var(--muted));
  font-weight: 700;
}

.readonly-grid span {
  display: grid;
  gap: 2px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.readonly-grid strong {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── Employee line ── */
.employee-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.profile-summary-card {
  position: sticky;
  top: 12px;
  z-index: 5;
}

.profile-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(170px, auto);
  gap: 12px;
  align-items: center;
}

.profile-summary-main {
  min-width: 0;
}

.profile-status-box {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 170px;
}

.profile-status-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.profile-status-detail {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 620px) {
  .push-permission-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .push-permission-notice button {
    width: 100%;
  }

  .profile-summary-card {
    position: static;
  }

  .profile-summary {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .profile-status-box {
    grid-column: 1 / -1;
    justify-items: start;
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .profile-status-detail {
    text-align: left;
  }
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--info);
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ── Search wrap ── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}

.search-wrap input {
  padding-left: 32px;
  min-width: 200px;
  font-size: 11px;
  min-height: 34px;
}

/* ── Hamburger (mobile toggle) ── */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px;
  min-height: 0;
  border-radius: 7px;
}

.hamburger:hover { background: var(--info); color: var(--ink); filter: none; box-shadow: none; transform: none; }

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 61, .36);
  z-index: 199;
}

.sidebar-overlay.open { display: block; }

/* ── Divider ── */
.divider { height: 1px; background: var(--line); margin: 8px 0; }

/* ── Preview badge ── */
.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 197, 24, .15);
  color: var(--yellow-dark);
  border: 1px solid rgba(245, 197, 24, .3);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

/* ── Responsive: tablet ── */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 28px rgba(15, 27, 61, .18);
  }

  .sidebar.open { transform: translateX(0); }
  .hamburger { display: inline-flex; }

  .portal-layout { grid-template-columns: 1fr; }
  .content { padding: 16px 18px; }
  .band { margin-inline: -18px; padding-inline: 18px; }
}

/* ── Responsive: mobile ── */
@media (max-width: 720px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand {
    min-height: auto;
    padding: 24px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .auth-brand h1 { display: none; }
  .auth-brand p { display: none; }
  .auth-brand-features { display: none; }
  .logo { width: 132px; }
  .auth-logo-mark { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; }
  .auth-logo-mark::before { inset: 8px; border-radius: 8px; }
  .auth-logo { width: 80%; border-radius: 7px; }
  .auth-brand::before, .auth-brand::after { display: none; }
  .auth-card { padding: 16px; }
  .auth-panel { padding: 20px; border-radius: 12px; }
  .auth-welcome { gap: 10px; margin-bottom: 18px; }
  .auth-welcome-icon { width: 42px; height: 42px; border-radius: 10px; }
  .tabs { gap: 5px; }
  .tab { flex: 1 1 calc(50% - 5px); justify-content: center; padding-inline: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 -14px 16px;
    padding: 10px 14px 12px;
  }
  .topbar-profile-menu {
    position: fixed;
    top: var(--profile-menu-top, 72px);
    left: 14px;
    right: 14px;
    width: auto;
    max-height: calc(100vh - var(--profile-menu-top, 72px) - 14px);
    overflow: auto;
  }
  .toolbar { justify-content: flex-start; }
  .calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-window { min-height: 460px; }
  .chat-header { flex-direction: column; }
  .chart-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .content { padding: 14px; }
  .band { margin-inline: -14px; padding-inline: 14px; }
  .pdf-viewer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .pdf-viewer-actions {
    justify-content: flex-start;
  }
  .pdf-viewer-actions button {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    padding-inline: 8px;
  }
  .pdf-link-button {
    flex: 1 1 calc(50% - 8px);
  }
  .pdf-viewer-stage {
    padding: 8px;
  }
}
