/* FMS Leave — friendly modern product layer */
:root {
  --brand: #2f6fed;
  --brand-strong: #2459c5;
  --brand-soft: #edf3ff;
  --accent-teal: #14b8a6;
  --accent-amber: #f4b740;
  --accent-coral: #f97366;
  --ink: #172033;
  --muted-ink: #667085;
  --subtle-ink: #98a2b3;
  --canvas: #f6f8fc;
  --surface: #fff;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --sidebar: #172033;
  --sidebar-deep: #111827;
  --focus-ring: 0 0 0 4px rgba(47, 111, 237, .18);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-raised: 0 12px 36px rgba(16, 24, 40, .12), 0 2px 8px rgba(16, 24, 40, .06);
  --motion-fast: 120ms;
  --motion-standard: 220ms;
  --motion-emphasis: 360ms;
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --navy: var(--canvas);
  --navy2: var(--surface);
  --navy3: #f8fafc;
  --navy4: var(--canvas);
  --navy5: #eef2f7;
  --border: rgba(23, 32, 51, .08);
  --border2: rgba(23, 32, 51, .14);
  --text: var(--ink);
  --text2: var(--muted-ink);
  --text3: var(--subtle-ink);
  --teal: var(--brand);
  --teal2: var(--brand-strong);
  --teal-dim: var(--brand-soft);
  --teal-glow: rgba(47, 111, 237, .2);
  --orange: var(--accent-coral);
  --amber: #b77900;
  --red: #d92d20;
  --green: #078a65;
  --blue: var(--brand);
  --purple: #7a5af8;
  --gradient-primary: linear-gradient(135deg, #2f6fed 0%, #4b87f7 55%, #14b8a6 135%);
  --font: "Manrope", "Segoe UI", sans-serif;
  --serif: var(--font);
  --mono: var(--font);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
}

html,
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.008em;
}

body {
  isolation: isolate;
}

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

button,
[role="button"],
.nav-btn,
.cal-cell {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(47, 111, 237, .45);
  outline-offset: 3px;
}

.ui-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon-sm {
  width: 16px;
  height: 16px;
}

.ui-icon-lg {
  width: 24px;
  height: 24px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.fixture-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 11000;
  min-height: 38px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  border: 1px solid #fedf89;
  border-radius: 10px;
  background: #fffaeb;
  box-shadow: var(--shadow-card);
  font-size: 12px;
  font-weight: 800;
}

.fixture-banner span {
  color: var(--muted-ink);
  font-weight: 600;
}

/* Loading and authentication */
#loadingScreen {
  background:
    radial-gradient(circle at 20% 15%, rgba(47, 111, 237, .35), transparent 28%),
    radial-gradient(circle at 82% 80%, rgba(20, 184, 166, .22), transparent 30%),
    #10182a;
}

.load-logo {
  color: rgba(255, 255, 255, .72);
}

.load-logo span {
  color: #7aa5ff;
}

.load-bar {
  height: 4px;
  background: rgba(255, 255, 255, .1);
}

.load-bar-fill {
  background: linear-gradient(90deg, #75a0ff, #57d3c5);
}

.login-left {
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 111, 237, .34), transparent 32%),
    radial-gradient(circle at 80% 78%, rgba(20, 184, 166, .22), transparent 32%),
    linear-gradient(145deg, #172033 0%, #111827 100%);
}

.login-left::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .12) .7px, transparent .7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom right, #000, transparent 72%);
}

.login-left-logo {
  width: 88px;
  height: 88px;
  border: 5px solid rgba(255, 255, 255, .92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.login-left-brand {
  color: #fff;
  font-size: 20px;
  letter-spacing: -.01em;
}

.login-left-brand span {
  color: #8bb0ff;
}

.login-left-tagline {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.login-left-tagline span {
  background: linear-gradient(120deg, #8bb0ff, #65ddcf);
  -webkit-background-clip: text;
}

.login-left-desc {
  color: rgba(255, 255, 255, .62);
  font-size: 15px;
}

.login-left-pill {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .72);
}

.login-right {
  width: min(520px, 42vw);
  background: #fff;
  background-image: none;
  padding: 64px clamp(36px, 4vw, 64px);
}

.login-right::before {
  content: "SECURE EMPLOYEE PORTAL";
  position: absolute;
  top: 26px;
  right: 32px;
  color: var(--subtle-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.login-right-hd h2 {
  font-size: 32px;
  letter-spacing: -.035em;
}

.login-right-hd p {
  font-size: 14px;
}

.login-right-feature {
  border-color: var(--line);
  background: var(--canvas);
  border-radius: 14px;
}

.login-right-feature-icon {
  display: none;
}

.password-field {
  position: relative;
}

.password-field .inp {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted-ink);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* Application shell */
.topbar {
  height: 72px;
  padding: 0 28px;
  gap: 18px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
  backdrop-filter: blur(18px);
}

.topbar::after {
  display: none;
}

.topbar-brand {
  color: var(--ink);
}

.brand-primary {
  color: var(--brand);
  text-shadow: none;
}

.brand-secondary {
  color: var(--ink);
  text-shadow: none;
}

.topbar-subtitle {
  color: var(--muted-ink) !important;
}

#fmsLogo {
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line), 0 6px 16px rgba(23, 32, 51, .12);
}

.topbar-right {
  gap: 12px;
}

.user-chip {
  background: var(--canvas);
  border-color: var(--line);
  border-radius: 14px;
  padding: 6px 12px 6px 6px;
}

.user-chip:hover {
  background: var(--brand-soft);
  border-color: rgba(47, 111, 237, .18);
}

.user-name {
  color: var(--ink);
  font-weight: 750;
}

.user-role {
  color: var(--muted-ink);
}

.sidebar-collapse {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted-ink);
  cursor: pointer;
  transition: color var(--motion-fast), background var(--motion-fast), transform var(--motion-standard) var(--motion-ease);
}

.sidebar-collapse:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.layout {
  background: var(--canvas);
}

.sidebar {
  width: 252px;
  padding: 20px 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 111, 237, .16), transparent 28%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
  border-right: 0;
  transition: width var(--motion-emphasis) var(--motion-ease), padding var(--motion-emphasis) var(--motion-ease);
}

.nav-section {
  padding: 17px 12px 8px;
  margin: 0;
  color: rgba(255, 255, 255, .4);
  font-size: 10px;
  letter-spacing: .13em;
}

.nav-btn {
  min-height: 44px;
  margin: 2px 0;
  padding: 10px 12px;
  gap: 12px;
  border-radius: 11px;
  color: rgba(235, 240, 250, .68);
  font-weight: 600;
  transition:
    color var(--motion-fast),
    background var(--motion-fast),
    transform var(--motion-standard) var(--motion-ease);
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  transform: translateX(2px);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(105deg, rgba(47, 111, 237, .42), rgba(20, 184, 166, .15));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.nav-btn.active::before {
  width: 4px;
  height: 22px;
  left: -2px;
  border-radius: 4px;
  background: #75a0ff;
  box-shadow: 0 0 16px rgba(117, 160, 255, .6);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0;
}

.sidebar-footer {
  color: rgba(255, 255, 255, .38);
  border-color: rgba(255, 255, 255, .08);
}

.nav-disclosure {
  margin: 2px 0;
}

.nav-disclosure summary {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(235, 240, 250, .68);
  font-size: 13px;
  font-weight: 600;
  border-radius: 11px;
  cursor: pointer;
  list-style: none;
}

.nav-disclosure summary::-webkit-details-marker {
  display: none;
}

.nav-disclosure summary:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.nav-disclosure .disclosure-chevron {
  margin-left: auto;
  transition: transform var(--motion-standard) var(--motion-ease);
}

.nav-disclosure[open] .disclosure-chevron {
  transform: rotate(180deg);
}

.nav-disclosure .nav-btn {
  margin-left: 15px;
  padding-left: 17px;
}

.sidebar-shell-collapsed .sidebar {
  width: 78px;
  padding-inline: 10px;
}

.sidebar-shell-collapsed .sidebar .nav-section,
.sidebar-shell-collapsed .sidebar .sidebar-footer,
.sidebar-shell-collapsed .sidebar .nav-btn > :not(.nav-icon):not(.badge-dot),
.sidebar-shell-collapsed .nav-disclosure summary > :not(.nav-icon),
.sidebar-shell-collapsed .nav-disclosure .nav-btn {
  display: none;
}

.sidebar-shell-collapsed .sidebar .nav-btn {
  justify-content: center;
  padding-inline: 0;
  font-size: 0;
}

.sidebar-shell-collapsed .sidebar .nav-btn .badge-dot {
  width: 8px;
  height: 8px;
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 0;
  overflow: hidden;
  font-size: 0;
}

.sidebar-shell-collapsed .sidebar-collapse {
  transform: rotate(180deg);
}

.content {
  padding: 38px clamp(24px, 3vw, 48px) 56px;
  background:
    radial-gradient(800px 340px at 95% -8%, rgba(47, 111, 237, .08), transparent 65%),
    var(--canvas);
  scroll-behavior: smooth;
}

.page {
  max-width: 1520px;
  margin: 0 auto;
  animation: none;
}

.page.active {
  display: block;
}

.page.page-entering {
  animation: premiumPageIn var(--motion-emphasis) var(--motion-ease) both;
}

@keyframes premiumPageIn {
  from {
    opacity: 0;
    transform: translate3d(var(--page-direction, 10px), 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.page-hd {
  margin-bottom: 28px;
}

.page-title {
  color: var(--ink);
  font-size: clamp(27px, 2.4vw, 36px);
  font-weight: 800;
  letter-spacing: -.045em;
}

.page-sub {
  max-width: 64ch;
  color: var(--muted-ink);
  font-size: 14px;
}

/* Components */
.card,
.stat-card,
.quick-action-card,
.approval-card {
  background: rgba(255, 255, 255, .96);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.card {
  padding: 24px;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-raised);
}

.card-label {
  color: var(--muted-ink);
  font-size: 11px;
  letter-spacing: .1em;
}

.card-label::after {
  background: linear-gradient(90deg, var(--line), transparent);
}

.btn {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 750;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    color var(--motion-fast),
    background var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-standard);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(.985);
}

.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 8px 20px rgba(47, 111, 237, .22), inset 0 1px rgba(255, 255, 255, .2);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(47, 111, 237, .3), inset 0 1px rgba(255, 255, 255, .2);
}

.btn-ghost {
  color: var(--muted-ink);
  background: #fff;
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(47, 111, 237, .2);
}

.inp,
.search-inp {
  min-height: 44px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.inp:hover,
.search-inp:hover {
  border-color: #98a2b3;
}

.inp:focus,
.search-inp:focus {
  color: var(--ink);
  border-color: var(--brand);
  background: #fff;
  box-shadow: var(--focus-ring);
}

.inp:disabled {
  color: var(--muted-ink);
  background: #f2f4f7;
  opacity: 1;
}

.fg label {
  color: #475467;
  letter-spacing: .06em;
}

.field-help {
  margin-top: 7px;
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.55;
}

.badge,
.stage-chip {
  border-radius: 999px;
  font-weight: 750;
}

.stat-card {
  padding: 22px;
  border-radius: 16px;
}

.stat-card::before {
  top: auto;
  right: 18px;
  bottom: 0;
  left: 18px;
  width: auto;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-val,
.bal-days,
.ent-summary-value {
  color: var(--ink);
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -.045em;
}

.balance-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bal-card {
  position: relative;
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--brand));
  border-left-width: 1px;
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease);
}

.bal-card:hover {
  border-color: var(--c, var(--brand));
}

.bal-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--c, var(--brand)) 28%, transparent);
  outline-offset: 3px;
}

.bal-card.leave-balance-selected {
  border-color: var(--c, var(--brand));
  border-width: 2px;
  border-top-width: 4px;
  padding: 15px 17px 14px;
  background: color-mix(in srgb, var(--c, var(--brand)) 9%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--brand)) 16%, transparent),
    0 10px 24px color-mix(in srgb, var(--c, var(--brand)) 15%, transparent);
  transform: translateY(-2px);
}

.bal-card.leave-balance-selected::after {
  content: '\2713  Selected';
  position: absolute;
  top: 9px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--c, var(--brand));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .025em;
}

.bal-card.leave-balance-selected .bal-type,
.bal-card.leave-balance-selected .bal-days {
  color: var(--c, var(--brand));
}

.quick-action-card {
  min-height: 92px;
  border-radius: 16px;
}

.quick-action-card:hover {
  transform: translateY(-4px);
}

.quick-action-icon {
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 14px;
}

.quick-action-card:hover .quick-action-icon {
  color: #fff;
  background: var(--brand);
  transform: rotate(-4deg) scale(1.08);
}

.flow-row {
  display: none;
}

.dashboard-actions {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-actions .quick-action-card:first-child {
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, .24), transparent 30%),
    var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(47, 111, 237, .26);
}

.dashboard-actions .quick-action-card:first-child .quick-action-title,
.dashboard-actions .quick-action-card:first-child .quick-action-sub {
  color: #fff;
}

.dashboard-actions .quick-action-card:first-child .quick-action-sub {
  opacity: .78;
}

.dashboard-actions .quick-action-card:first-child .quick-action-icon {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.person-row:hover {
  padding-left: 8px;
  background: var(--brand-soft);
  border-radius: 10px;
}

.empty {
  min-height: 190px;
}

.empty-ico {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(47, 111, 237, .12);
  box-shadow: none;
}

.info-box {
  color: var(--muted-ink);
  background: #f8fafc;
  border-color: var(--line);
}

.inline-err,
.err-msg {
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #fecdca;
  border-radius: 10px;
  padding: 10px 12px;
}

.inline-ok {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

/* Guided leave request */
.leave-layout {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
}

.leave-side-col {
  top: 20px;
}

.leave-form-card {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.leave-form-card:hover {
  box-shadow: none;
}

.leave-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  margin-bottom: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.leave-step-indicator {
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-ink);
  border-radius: 10px;
}

.leave-step-indicator span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.leave-step-indicator strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leave-step-indicator.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.leave-step-indicator.is-complete span {
  color: #fff;
  background: var(--accent-teal);
}

.leave-step {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.leave-step-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.leave-step-heading span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--gradient-primary);
  border-radius: 10px;
  font-weight: 800;
}

.leave-step-heading h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -.02em;
}

.leave-step-heading p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 12px;
}

.leave-planner {
  border-color: var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.leave-plan-cell,
.cal-cell {
  transition:
    transform var(--motion-fast) var(--motion-ease),
    color var(--motion-fast),
    background var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast);
}

.leave-plan-cell:hover,
.cal-cell:hover {
  transform: translateY(-2px);
}

.request-preview {
  border-color: rgba(47, 111, 237, .2);
  background: var(--brand-soft);
}

.leave-submit-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.leave-submit-row .btn {
  min-width: 210px;
}

/* Data views */
.search-bar,
.hist-filters,
.calendar-toolbar {
  position: sticky;
  top: -1px;
  z-index: 8;
  padding: 12px;
  margin-inline: -12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
}

.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

thead tr {
  background: #f8fafc;
}

th {
  color: #667085;
}

tbody tr:hover td {
  background: var(--brand-soft);
}

.approval-workspace {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr);
  gap: 18px;
  align-items: start;
}

#approvalsList {
  grid-template-columns: 1fr;
}

.approval-card {
  cursor: pointer;
  border-radius: 14px;
}

/* The queue is a compact index. The selected request is the only full card and
   the only place where approval controls are exposed. */
#approvalsList .approval-card {
  min-height: 92px;
  padding: 16px 74px 16px 18px;
}

#approvalsList .approval-card .appr-header {
  margin-bottom: 0;
}

#approvalsList .approval-card .appr-body,
#approvalsList .approval-card .approval-actions,
#approvalsList .approval-card .approval-action-slot {
  display: none;
}

#approvalsList .approval-card::after {
  content: 'Review';
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  transform: translateY(-50%);
}

.approval-card.is-selected {
  border-color: rgba(47, 111, 237, .45);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .1), var(--shadow-card);
}

.approval-detail {
  position: sticky;
  top: 16px;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.approval-detail-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-detail-head h2 {
  font-size: 17px;
  letter-spacing: -.02em;
}

.approval-detail-empty {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: var(--muted-ink);
  text-align: center;
}

.approval-detail .approval-card {
  cursor: default;
  border: 0;
  box-shadow: none;
}

.approval-detail .approval-card::after {
  display: none;
}

.approval-detail .appr-body {
  display: block;
}

.approval-detail .approval-actions {
  display: flex;
}

.approval-detail-close {
  display: none;
}

/* Calendar */
.calendar-main-card {
  overflow: hidden;
}

.cal-nav-btn {
  min-width: 42px;
  min-height: 42px;
  color: var(--muted-ink);
  background: #fff;
  border-color: var(--line);
}

.cal-nav-btn:hover {
  color: var(--brand);
  border-color: rgba(47, 111, 237, .28);
  background: var(--brand-soft);
}

.cal-grid.is-switching[data-direction="next"] {
  animation: calendarNext var(--motion-standard) var(--motion-ease);
}

.cal-grid.is-switching[data-direction="prev"] {
  animation: calendarPrev var(--motion-standard) var(--motion-ease);
}

@keyframes calendarNext {
  from { opacity: .3; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes calendarPrev {
  from { opacity: .3; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Dialogs, notifications, and success moment */
.overlay,
.confirm-overlay {
  background: rgba(23, 32, 51, .48);
  backdrop-filter: blur(10px);
}

.modal,
.confirm-modal {
  border-color: rgba(255, 255, 255, .7);
  border-radius: 20px;
  box-shadow: 0 32px 90px rgba(16, 24, 40, .25);
  animation: premiumModalIn var(--motion-emphasis) var(--motion-ease);
}

@keyframes premiumModalIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast {
  border-radius: 12px;
  box-shadow: var(--shadow-raised);
  transition:
    transform var(--motion-emphasis) var(--motion-ease),
    opacity var(--motion-standard);
}

.success-celebration {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.success-celebration-card {
  width: min(360px, calc(100vw - 32px));
  padding: 28px;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 32px 90px rgba(16, 24, 40, .22);
  animation: successCardIn 600ms var(--motion-ease) both;
}

.success-celebration-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: successPop 650ms var(--motion-ease) both;
}

.success-celebration h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.success-celebration p {
  color: var(--muted-ink);
  font-size: 13px;
}

.success-particle {
  --x: 0px;
  --y: 0px;
  width: 8px;
  height: 8px;
  position: absolute;
  top: 46%;
  left: 50%;
  border-radius: 3px;
  background: var(--particle-color, var(--brand));
  animation: particleBurst 760ms var(--motion-ease) both;
}

@keyframes successCardIn {
  0% { opacity: 0; transform: translateY(24px) scale(.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes successPop {
  0% { transform: scale(.2) rotate(-18deg); }
  70% { transform: scale(1.14) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes particleBurst {
  from { opacity: 1; transform: translate(-50%, -50%) scale(.4); }
  to { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(180deg) scale(1); }
}

.reveal-item {
  animation: revealItem var(--motion-emphasis) var(--motion-ease) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes revealItem {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Settings navigation */
.settings-section-nav {
  position: sticky;
  top: -1px;
  z-index: 10;
  margin-bottom: 14px;
  padding: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.settings-section-nav button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted-ink);
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.settings-section-nav button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.webhook-field-wrap {
  position: relative;
}

.webhook-field-wrap .inp {
  padding-right: 48px;
}

.danger-zone {
  border-color: #fecdca;
  background: #fff4f2;
}

/* Mobile */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .sidebar-collapse {
    display: none;
  }

  .content {
    padding: 24px 18px 92px;
  }

  .leave-layout,
  .approval-workspace {
    grid-template-columns: 1fr;
  }

  .leave-side-col {
    position: static;
  }

  .approval-detail {
    position: fixed;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 220;
    max-height: min(76vh, 720px);
    min-height: 0;
    overflow: auto;
    display: none;
    box-shadow: 0 28px 80px rgba(16, 24, 40, .28);
    animation: detailSheetIn var(--motion-emphasis) var(--motion-ease);
  }

  .approval-detail.is-open {
    display: block;
  }

  .approval-detail-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted-ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  @keyframes detailSheetIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 768px) {
  .fixture-banner {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 66px;
    padding: 10px 14px;
    flex-wrap: nowrap;
  }

  .topbar-right {
    width: auto;
    margin-left: auto;
  }

  .topbar-right > .btn {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .topbar-right > .btn .ui-icon {
    margin: 0;
  }

  .user-chip {
    max-width: 148px;
  }

  .content {
    padding-inline: 14px;
  }

  .page-title {
    font-size: 27px;
  }

  .card,
  .stat-card,
  .approval-card,
  .leave-step {
    padding: 18px;
  }

  .leave-stepper {
    grid-template-columns: 1fr;
  }

  .leave-step-indicator {
    display: none;
  }

  .leave-step-indicator.is-active {
    display: flex;
  }

  .leave-submit-row .btn {
    width: 100%;
  }

  .bottom-nav {
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    border-color: var(--line);
    backdrop-filter: blur(18px);
  }

  .bottom-nav-btn {
    min-height: 52px;
    border-radius: 12px;
    color: var(--muted-ink);
  }

  .bottom-nav-btn.active {
    color: var(--brand);
    background: var(--brand-soft);
  }

  .bottom-nav-ico {
    height: 21px;
    display: grid;
    place-items: center;
    font-size: 0;
  }

  .bottom-nav-btn.active .bottom-nav-ico {
    transform: translateY(-2px) scale(1.06);
  }

  .mobile-drawer-panel {
    color: var(--ink);
    background: #fff;
    animation: detailSheetIn var(--motion-emphasis) var(--motion-ease);
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-val {
    font-size: 31px;
  }
}

@media (max-width: 520px) {
  .topbar-brand img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }

  .topbar-company {
    max-width: 148px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-chip {
    padding-right: 7px;
  }

  .user-chip > div:last-child {
    display: none;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .stats-row > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .dashboard-actions {
    grid-template-columns: 1fr;
  }

  .g2,
  .g3,
  .sdiv,
  .request-preview {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .success-particle,
  .reveal-item {
    animation: none !important;
  }
}

/* Scoped approver picker */
.employee-webhook-manager {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}

.employee-webhook-meta {
  align-self: center;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.5;
}

.employee-webhook-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#mEditProfile .modal {
  width: min(680px, 95vw);
  max-height: min(900px, 92vh);
  overflow-y: auto;
}

.approval-scope-card {
  margin-top: 4px;
  padding: 18px;
  border: 1px solid rgba(0, 153, 204, .2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 153, 204, .055), rgba(255, 255, 255, .8));
}

.approval-scope-head,
.approval-picker-toolbar,
.approval-picker-row {
  display: flex;
  align-items: center;
}

.approval-scope-head {
  justify-content: space-between;
  gap: 16px;
}

.approval-scope-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.approval-scope-sub,
.approval-scope-note {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.55;
}

.approval-scope-sub { margin-top: 3px; }

.approval-scope-count {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid rgba(0, 153, 204, .2);
  border-radius: 999px;
  background: rgba(0, 153, 204, .1);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.approval-scope-note {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
}

.approval-scope-note.warning {
  border-left-color: var(--amber);
  background: rgba(245, 158, 11, .08);
  color: #92400e;
}

.approval-picker-toolbar {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.approval-picker-search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text3);
}

.approval-picker-search:focus-within {
  border-color: var(--teal);
  box-shadow: var(--ring);
}

.approval-picker-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.approval-picker-actions { display: flex; gap: 6px; }

.approval-picker-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.approval-picker-row {
  gap: 11px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}

.approval-picker-row:last-child { border-bottom: 0; }
.approval-picker-row:hover { background: rgba(0, 153, 204, .045); }
.approval-picker-row.selected { background: rgba(0, 153, 204, .08); }

.approval-picker-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.approval-picker-person { min-width: 0; flex: 1; }
.approval-picker-name,
.approval-picker-meta { display: block; }
.approval-picker-name { color: var(--text); font-size: 13px; font-weight: 750; }
.approval-picker-meta { margin-top: 2px; color: var(--text3); font-size: 11px; }

.approval-picker-empty {
  padding: 24px 14px;
  color: var(--text3);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .employee-webhook-manager { grid-template-columns: 1fr; }
  .employee-webhook-actions { justify-content: stretch; }
  .employee-webhook-actions .btn { flex: 1; }
  .approval-scope-card { padding: 14px; }
  .approval-picker-toolbar { align-items: stretch; flex-direction: column; }
  .approval-picker-actions .btn { flex: 1; }
  .approval-picker-list { max-height: 220px; }
}

/* People directory */
.people-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}

.people-page-head .page-sub { max-width: 62ch; }
.people-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.people-stats .stat-card { min-height: 132px; }

.people-directory-card { padding: 0; overflow: hidden; }
.people-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(145px, .55fr));
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .78));
}

.people-search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text3);
}

.people-search-wrap:focus-within { border-color: var(--teal); box-shadow: var(--ring); }
.people-search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 13px; }
.people-toolbar .inp { min-width: 0; height: 44px; padding-top: 0; padding-bottom: 0; }
.people-results-summary { padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text3); font-size: 11px; font-weight: 650; }
.people-table-wrap { border: 0; border-radius: 0; }
.people-table-wrap th:first-child,
.people-table-wrap td:first-child { padding-left: 20px; }
.people-table-wrap th:last-child,
.people-table-wrap td:last-child { padding-right: 20px; }
.people-row.is-inactive { opacity: .7; }
.people-row.is-inactive:hover { opacity: 1; }

.people-person-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.people-avatar { width: 38px; height: 38px; flex: 0 0 38px; font-size: 12px; }
.people-person-copy { min-width: 0; }
.people-person-copy strong,
.people-person-copy span { display: block; }
.people-person-copy strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.people-person-copy span { margin-top: 3px; color: var(--text3); font-size: 10.5px; }
.people-department { color: var(--text2); font-size: 12px; }
.people-access-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.people-access-label { color: var(--teal); font-size: 12px; font-weight: 800; }
.people-access-label.global { color: var(--blue); }
.people-cell-note,
.people-access-empty { color: var(--text3); font-size: 10.5px; }
.people-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; }
.people-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.people-status.active { color: var(--green); }
.people-status.inactive { color: var(--text3); }
.people-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 190px; }
.btn-soft { border: 1px solid rgba(0, 153, 204, .18); background: rgba(0, 153, 204, .07); color: var(--teal); }
.btn-soft:hover { border-color: rgba(0, 153, 204, .32); background: rgba(0, 153, 204, .12); }
.people-empty { gap: 10px; }

/* Profile editor */
#mEditProfile { padding: 14px; }
#mEditProfile .profile-modal {
  display: flex;
  flex-direction: column;
  width: min(760px, 96vw);
  max-height: min(920px, 94vh);
  padding: 0;
  overflow: hidden;
}

.profile-modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 153, 204, .08), rgba(255, 255, 255, .96) 55%);
}

.profile-modal-person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.profile-modal-avatar { width: 44px; height: 44px; flex: 0 0 44px; font-size: 14px; }
.profile-modal-header .modal-title { margin: 0 0 3px; font-size: 20px; }
.profile-modal-meta { overflow: hidden; color: var(--text3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-modal-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text2); font-size: 25px; line-height: 1; cursor: pointer; }
.profile-modal-close:hover { border-color: var(--border); background: #fff; color: var(--text); }
.profile-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 22px 6px; }

.profile-section { margin-bottom: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255, 255, 255, .76); }
.profile-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.profile-section-head h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 850; letter-spacing: -.01em; }
.profile-section-head p { margin: 4px 0 0; color: var(--text3); font-size: 11.5px; line-height: 1.5; }
.profile-section .fg:last-child { margin-bottom: 0; }
.profile-date-field { width: calc(50% - 6px); }
.profile-access-grid { display: grid; grid-template-columns: minmax(200px, .8fr) minmax(280px, 1.2fr); gap: 12px; align-items: stretch; }
.profile-status-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 12px 14px; border: 1px solid rgba(5, 150, 105, .2); border-radius: 12px; background: rgba(5, 150, 105, .055); }
.profile-status-control.is-inactive { border-color: var(--border); background: rgba(100, 116, 139, .06); }
.profile-control-label { color: var(--text); font-size: 12px; font-weight: 800; }
.profile-control-help { max-width: 250px; margin-top: 3px; color: var(--text3); font-size: 10.5px; line-height: 1.45; }
.switch-control { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--text2); font-size: 11px; font-weight: 800; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background var(--motion-fast); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15, 23, 42, .22); transition: transform var(--motion-fast); }
.switch-control input:checked + .switch-track { background: var(--green); }
.switch-control input:checked + .switch-track .switch-knob { transform: translateX(18px); }
.switch-control input:focus-visible + .switch-track { outline: 3px solid rgba(0, 153, 204, .2); outline-offset: 2px; }
.switch-control input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }
.profile-reset-action { margin-top: 2px; padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.profile-reset-action:hover { text-decoration: underline; }

#pApprovalScopeWrap.profile-section { padding: 0; border: 0; background: transparent; }
#pApprovalScopeWrap .approval-scope-card { margin: 0; }
.approval-selected-filter { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--text2); font-size: 11px; font-weight: 700; cursor: pointer; }
.approval-selected-filter input { width: 15px; height: 15px; accent-color: var(--teal); }
.approval-picker-state { flex: 0 0 auto; color: var(--text3); font-size: 10px; font-weight: 750; }
.approval-picker-row.selected .approval-picker-state { color: var(--teal); }

.profile-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 18px; padding: 14px 16px; border: 1px solid rgba(217, 45, 32, .16); border-radius: 13px; background: rgba(217, 45, 32, .035); }
.profile-danger-zone strong,
.profile-danger-zone span { display: block; }
.profile-danger-zone strong { color: var(--red); font-size: 12px; }
.profile-danger-zone span { max-width: 480px; margin-top: 3px; color: var(--text3); font-size: 10.5px; line-height: 1.45; }
.profile-modal-foot { flex: 0 0 auto; align-items: center; margin: 0; padding: 15px 22px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 24px rgba(15, 23, 42, .035); }
.profile-save-hint { margin-right: auto; color: var(--text3); font-size: 10.5px; }

@media (max-width: 1000px) {
  .people-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-toolbar { grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, .5fr)); }
}

@media (max-width: 768px) {
  .people-page-head { align-items: stretch; flex-direction: column; }
  .people-page-head .btn { align-self: flex-start; }
  .people-toolbar { grid-template-columns: 1fr 1fr; }
  .people-search-wrap { grid-column: 1 / -1; }
  .people-toolbar > :last-child { grid-column: 1 / -1; }
  .people-directory-card { padding: 14px; overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .people-toolbar { margin-bottom: 12px; padding: 0; border: 0; background: transparent; }
  .people-results-summary { margin-bottom: 8px; padding: 4px 0; border: 0; }
  .people-table-wrap { overflow: visible; }
  #page-employees .rwd-cards tr { padding: 14px; }
  #page-employees .rwd-cards td:first-child { display: block; padding: 2px 0 12px; text-align: left; }
  #page-employees .rwd-cards td:first-child::before { display: none; }
  #page-employees .rwd-cards td { align-items: center; }
  #page-employees .people-person-cell { min-width: 0; }
  #page-employees .people-actions { min-width: 0; justify-content: flex-end; }
  #page-employees .people-actions .btn { flex: 1 1 auto; }
  .profile-access-grid { grid-template-columns: 1fr; }
  .profile-date-field { width: 100%; }
}

@media (max-width: 560px) {
  #mEditProfile { align-items: flex-end; padding: 0; }
  #mEditProfile .profile-modal { width: 100vw; max-width: none; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .profile-modal-header { padding: 16px; }
  .profile-modal-body { padding: 14px 14px 4px; }
  .profile-section { padding: 14px; }
  .profile-status-control { align-items: flex-start; flex-direction: column; }
  .profile-modal-foot { flex-wrap: wrap; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .profile-save-hint { width: 100%; margin: 0 0 2px; }
  .profile-modal-foot .btn { flex: 1; }
  .profile-danger-zone { align-items: stretch; flex-direction: column; }
  .approval-picker-state { display: none; }
}
