:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-alt: #ecf0f7;
  --surface: #ffffff;
  --surface-soft: #f3f6fb;
  --border: #e2e8f0;
  --divider: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-dim: #475569;
  --accent: #0b8d7e;
  --accent-strong: #066f63;
  --accent-soft: rgba(11, 141, 126, 0.12);
  --warning: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 72px auto;
  min-height: 100vh;
}

.top-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--divider);
}

.brand-context {
  color: var(--text-dim);
  font-weight: 500;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field input {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 40px 10px 16px;
  width: 260px;
  background: var(--surface-soft);
  color: var(--text);
}

.search-field input::placeholder {
  color: var(--text-dim);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: none;
  color: var(--text-dim);
}

.icon::before {
  font-family: "Material Symbols Outlined", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.icon-search::before {
  content: "search";
}

.icon-bell::before {
  content: "notifications";
}

.icon-help::before {
  content: "help";
}

.icon-chevron::before {
  content: "expand_more";
}

.icon-grid::before {
  content: "dashboard";
}

.icon-people::before {
  content: "group";
}

.icon-calendar::before {
  content: "event";
}

.icon-coin::before {
  content: "paid";
}

.icon-heart::before {
  content: "favorite";
}

.icon-chart::before {
  content: "insights";
}

.icon-flag::before {
  content: "flag";
}

.icon-target::before {
  content: "track_changes";
}

.icon-settings::before {
  content: "settings";
}

.search-field .icon {
  position: absolute;
  right: 14px;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-soft);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border 0.2s ease;
}

.profile-chip:hover {
  border-color: var(--accent);
}

.profile-chip p {
  font-weight: 600;
  line-height: 1.1;
}

.profile-chip small {
  color: var(--text-dim);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 600;
}

.rail-nav {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.nav-link {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.main-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-panel {
  background: linear-gradient(135deg, #0b8d7e, #0da38e);
  color: white;
  padding: 32px;
  border-radius: 32px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 55%);
  pointer-events: none;
}

.hero-panel h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 8px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 12px;
}

.subtitle {
  max-width: 560px;
  line-height: 1.5;
  opacity: 0.9;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.secondary-btn {
  border-radius: 999px;
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  background: white;
  color: var(--accent-strong);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-meter {
  min-width: 220px;
  background: rgba(255, 255, 255, 0.1);
  padding: 24px;
  border-radius: 24px;
  position: relative;
  z-index: 1;
}

.pulse-value {
  display: block;
  font-size: 3rem;
  font-weight: 700;
}

.pulse-value span {
  font-size: 1.25rem;
  opacity: 0.8;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card h2 {
  font-size: 2rem;
}

.stat-card .label {
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.stat-card small {
  color: var(--text-dim);
}

.snapshot-card header,
.quick-actions header,
.announcements header,
.employee-directory header,
.time-off header,
.payroll header,
.benefits header,
.analytics header,
.onboarding header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.snapshot-card p,
.quick-actions p,
.announcements p,
.employee-directory p,
.time-off p,
.payroll p,
.benefits p,
.analytics p,
.onboarding p {
  color: var(--text-dim);
}

.snapshot-body {
  display: flex;
  gap: 24px;
  align-items: center;
}

.donut {
  width: 150px;
  height: 150px;
  position: relative;
  display: grid;
  place-items: center;
}

.donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut circle {
  fill: none;
  stroke-width: 14;
  stroke: var(--border);
  stroke-linecap: round;
}

.donut .meter {
  stroke: var(--accent);
  stroke-dasharray: 327;
  stroke-dashoffset: calc(327 * 0.09);
}

.donut-label {
  position: absolute;
  text-align: center;
}

.donut-label strong {
  font-size: 1.8rem;
}

.snapshot-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snapshot-stats p {
  font-size: 0.9rem;
}

.snapshot-stats strong {
  font-size: 1.2rem;
}

.quick-actions .action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions button {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border 0.2s ease, transform 0.2s ease;
}

.quick-actions button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.announcements ul,
#timeOffList,
#benefitsList,
#onboardingList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-item,
.timeoff-item,
.benefit-item,
.onboarding-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.announcement-item strong {
  display: block;
}

.announcement-item span {
  color: var(--text-dim);
}

.timeoff-item {
  align-items: flex-start;
}

.timeoff-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
}

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

.timeoff-actions button {
  border-radius: 12px;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.timeoff-actions .approve {
  background: var(--accent);
  color: white;
}

.timeoff-actions .decline {
  background: var(--surface);
  border: 1px solid var(--border);
}

.employee-directory {
  grid-column: 1 / -1;
}

.employee-directory header .controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.employee-directory label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.employee-directory select,
.employee-directory input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--surface-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge.active {
  background: rgba(11, 141, 126, 0.12);
  color: var(--accent-strong);
}

.badge.leave {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge.terminated {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

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

.table-actions button {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.85rem;
}

.payroll-chart {
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(11, 141, 126, 0.15), transparent 55%),
    linear-gradient(135deg, rgba(11, 141, 126, 0.16), rgba(11, 141, 126, 0.05));
  border-radius: 20px;
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.payroll-meta {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.payroll-meta span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.analytics-chart {
  background: var(--surface-soft);
  border-radius: 20px;
  padding: 12px;
  border: 1px dashed var(--border);
}

.analytics-chart svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(200%);
  background: var(--text);
  color: white;
  padding: 16px 28px;
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  transition: transform 0.4s ease;
  font-weight: 500;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

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

  .rail-nav {
    display: none;
  }

  .top-nav {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .top-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .search-field input {
    width: 100%;
  }

  .hero-panel {
    flex-direction: column;
  }
}
