:root {
  color-scheme: light;
  --bg: #e7f6ef;
  --bg-strong: #f7faf6;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --panel-soft: #f8fbf7;
  --ink: #173326;
  --muted: #607466;
  --line: rgba(28, 82, 54, 0.14);
  --accent: #2bb673;
  --accent-dark: #147a4d;
  --green: #36c986;
  --amber: #f3b743;
  --red: #de6152;
  --violet: #7f6dd9;
  --blue: #437fc7;
  --shadow: 0 16px 44px rgba(25, 86, 54, 0.09);
  --radius: 18px;
}

.dark {
  color-scheme: dark;
  --bg: #101827;
  --bg-strong: #18233b;
  --panel: rgba(25, 34, 52, 0.78);
  --panel-solid: #1a2438;
  --panel-soft: rgba(255, 255, 255, 0.06);
  --ink: #eef5ff;
  --muted: #9fb0ca;
  --line: rgba(192, 211, 247, 0.16);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(43, 182, 115, 0.1), transparent 26rem),
    linear-gradient(135deg, var(--bg-strong), var(--bg) 58%, #f7faf8);
  color: var(--ink);
  font-size: 14px;
  font-family: Figtree, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 14px;
  display: flex;
  height: calc(100vh - 36px);
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px 9px;
  box-shadow: 0 16px 44px rgba(25, 86, 54, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 18px;
  color: white;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 62%, var(--accent) 0 26%, transparent 27%),
    radial-gradient(ellipse at 65% 38%, #4bc992 0 28%, transparent 29%),
    linear-gradient(135deg, #d9f5e7, #ffffff);
  color: transparent;
  animation: pulse 2.8s ease-in-out infinite;
}

.nav-list {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-item,
.icon-button,
.avatar-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: #244061;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.dark .nav-item,
.dark .icon-button,
.dark .avatar-button {
  color: #dbe8ff;
}

.nav-item {
  position: relative;
  width: 43px;
  height: 43px;
  border-radius: 14px;
}

.nav-item span,
.icon-button span {
  font-size: 16px;
  line-height: 1;
}

.nav-item:hover,
.nav-item.active,
.icon-button:hover,
.avatar-button:hover {
  transform: translateY(-2px);
  background: #163c2a;
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 60, 42, 0.18);
}

.nav-item::after {
  position: absolute;
  left: 56px;
  z-index: 8;
  width: max-content;
  max-width: 180px;
  border-radius: 10px;
  background: #163c2a;
  color: white;
  content: attr(data-label);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-item:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.bottom-action {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.workspace {
  min-width: 0;
  max-width: 1780px;
  margin: 0 auto;
  padding: 4px 0 24px;
  width: 100%;
}

.auth-mode .app-shell {
  display: block;
  min-height: 100vh;
}

.auth-mode .sidebar,
.auth-mode .topbar,
.auth-mode .hero-panel {
  display: none;
}

.auth-mode .workspace {
  display: grid;
  min-height: 100vh;
  max-width: none;
  place-items: center;
  padding: 34px 24px;
}

.auth-mode .content-grid {
  display: block;
  width: min(100%, 680px);
}

.auth-page {
  display: flex;
  min-height: min(680px, calc(100vh - 68px));
  align-items: center;
  justify-content: center;
}

.auth-brand,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  display: grid;
  position: relative;
  overflow: hidden;
  align-content: space-between;
  gap: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(240, 250, 245, 0.72)),
    linear-gradient(135deg, rgba(43, 182, 115, 0.18), rgba(67, 127, 199, 0.11));
}

.auth-brand::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(43, 182, 115, 0.14);
  border-radius: 22px;
  content: "";
  pointer-events: none;
}

.auth-brand-top {
  position: relative;
  display: grid;
  max-width: 520px;
  gap: 18px;
  z-index: 1;
}

.auth-brand .brand-mark {
  width: 74px;
  height: 74px;
  box-shadow: 0 20px 44px rgba(43, 182, 115, 0.24);
}

.auth-brand h1 {
  max-width: 520px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 0.96;
}

.auth-visual {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(28, 82, 54, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.auth-visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-visual-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.auth-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-stat-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(28, 82, 54, 0.12);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.auth-stat-grid strong {
  font-size: 24px;
  line-height: 1;
}

.auth-stat-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.auth-timeline {
  display: grid;
  gap: 9px;
}

.auth-timeline span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.auth-pill-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.auth-pill-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(28, 82, 54, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
}

.auth-card {
  display: grid;
  align-content: center;
  width: min(100%, 600px);
  min-height: 640px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  padding: 38px;
}

.auth-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-card-head h2 {
  font-size: 32px;
  line-height: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  margin-bottom: 18px;
  padding: 6px;
}

.auth-tabs button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 9px 10px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-tabs button.active {
  background: #163c2a;
  color: white;
  box-shadow: 0 12px 24px rgba(22, 60, 42, 0.16);
}

.auth-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.auth-form .field label {
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-form input,
.auth-form select {
  min-height: 52px;
  border-radius: 16px;
  background: #fff;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.auth-actions .btn {
  min-height: 46px;
  padding-inline: 18px;
}

.auth-actions .btn.accent {
  flex: 1 1 150px;
  background: #21bd76;
  color: #05291a;
  box-shadow: 0 14px 26px rgba(43, 182, 115, 0.22);
}

.auth-secondary {
  flex: 0 0 auto;
}

.auth-hint,
.captcha-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(43, 182, 115, 0.08), rgba(67, 127, 199, 0.06));
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 12px 13px;
}

.captcha-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.captcha-box p {
  margin-bottom: 0;
}

.dark .auth-brand,
.dark .auth-card,
.dark .auth-visual {
  background: rgba(25, 34, 52, 0.84);
}

.dark .auth-stat-grid span,
.dark .auth-form input,
.dark .auth-form select {
  background: rgba(255, 255, 255, 0.06);
}

.dark .auth-pill-row span {
  background: rgba(255, 255, 255, 0.08);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.35vw, 2.2rem);
  font-weight: 850;
  letter-spacing: 0;
}

h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(1.2rem, 1.9vw, 1.75rem);
  letter-spacing: 0;
  line-height: 1.13;
}

h3 {
  margin-bottom: 4px;
  font-size: 0.94rem;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.search-control {
  display: flex;
  min-width: min(360px, 36vw);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  padding: 0 14px;
  box-shadow: 0 10px 22px rgba(25, 86, 54, 0.06);
}

.search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 13px 0;
}

.pill-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 700;
  padding: 12px 16px;
}

.icon-button,
.avatar-button {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.notification b {
  position: absolute;
  right: -2px;
  top: -4px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #e22d4d;
  color: white;
  font-size: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background:
    radial-gradient(circle at 50% 36%, #ffd2ae 0 18%, transparent 19%),
    radial-gradient(circle at 50% 108%, #222a3a 0 38%, transparent 39%),
    linear-gradient(135deg, #9b7bff, #ffb37b);
}

.avatar-sarah {
  background:
    radial-gradient(circle at 50% 36%, #ffd2ae 0 18%, transparent 19%),
    radial-gradient(circle at 50% 108%, #33251b 0 38%, transparent 39%),
    linear-gradient(135deg, #ffb37b, #8bd8ff);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.92), rgba(255,255,255,0.64)),
    linear-gradient(135deg, rgba(43,182,115,0.14), rgba(67,127,199,0.07));
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  padding: 22px 24px;
  backdrop-filter: blur(14px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 124px);
  gap: 10px;
}

.hero-metrics div {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: 0 16px 36px rgba(38, 112, 75, 0.08);
  padding: 13px;
}

.hero-metrics strong {
  display: block;
  font-size: 1.35rem;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
  animation: riseIn 420ms ease both;
}

.panel.compact {
  padding: 16px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: 1 / -1; }

.panel-header,
.split-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

.metric-card {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card strong {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

.trend {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: rgba(54, 201, 134, 0.12);
  color: #168654;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.trend.warn {
  background: rgba(255, 200, 87, 0.18);
  color: #a56d00;
}

.trend.bad {
  background: rgba(255, 107, 107, 0.15);
  color: #c43d3d;
}

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

.btn,
.chip,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 800;
  padding: 9px 13px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.lucide {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item .lucide,
.icon-button .lucide {
  width: 19px;
  height: 19px;
}

.icon-badge .lucide {
  width: 19px;
  height: 19px;
}

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

.btn:hover,
.chip:hover,
.segmented button:hover,
.btn.primary {
  transform: translateY(-1px);
  background: #163c2a;
  color: white;
}

.btn.accent {
  background: var(--accent);
  color: #062a1b;
}

.btn.danger {
  background: rgba(255, 107, 107, 0.14);
  color: #c43d3d;
}

.segmented {
  display: flex;
  gap: 6px;
  border-radius: 999px;
}

.segmented button.active {
  background: #163c2a;
  color: white;
}

.table-wrap {
  overflow-x: auto;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  flex-wrap: wrap;
}

.pagination-controls,
.pager-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-select {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 800;
  padding: 9px 12px;
}

.table-meta,
.page-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pager-button[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.payroll-table table {
  min-width: 1320px;
}

.payroll-control-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 249, 239, 0.9));
}

.payroll-settings-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

td,
th {
  padding: 0 14px;
  white-space: nowrap;
}

td {
  background: var(--panel-solid);
  height: 50px;
  font-size: 13px;
  font-weight: 700;
}

td:first-child {
  border-radius: 14px 0 0 14px;
}

td:last-child {
  border-radius: 0 14px 14px 0;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.status.active,
.status.approved,
.status.closed,
.status.synced {
  background: rgba(54, 201, 134, 0.18);
  color: #168654;
}

.status.pending,
.status.warning {
  background: rgba(255, 200, 87, 0.22);
  color: #a56d00;
}

.status.rejected,
.status.blocked,
.status.offline {
  background: rgba(255, 107, 107, 0.16);
  color: #c43d3d;
}

.status.remote,
.status.review {
  background: rgba(155, 123, 255, 0.17);
  color: #7656d6;
}

.list {
  display: grid;
  gap: 9px;
}

.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 12px;
}

.list-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.avatar-mini,
.icon-badge {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(43,182,115,0.18), rgba(67,127,199,0.1));
  color: var(--accent-dark);
  font-weight: 900;
}

.avatar-mini {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #ffd2ae 0 22%, transparent 23%),
    radial-gradient(circle at 50% 106%, #293044 0 40%, transparent 41%),
    linear-gradient(135deg, #93e7d4, #9b7bff);
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(94, 112, 141, 0.16);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.loan-table .toolbar {
  flex-wrap: nowrap;
}

.loan-progress {
  max-width: 140px;
  margin-top: 8px;
}

.modal.loan-detail-modal {
  width: min(980px, calc(100vw - 28px));
}

.loan-detail-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.loan-summary-card {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 13px;
}

.loan-summary-card strong {
  display: block;
  font-size: 1.02rem;
}

.loan-summary-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.loan-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.loan-meta-grid div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 11px;
}

.loan-meta-grid strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.loan-meta-grid span:not(.status) {
  font-weight: 850;
}

.inline-header {
  margin: 16px 0 10px;
}

.loan-timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 12px;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.finance-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  padding: 18px 14px 12px;
}

.finance-month {
  display: grid;
  gap: 8px;
  align-items: end;
  min-height: 220px;
  text-align: center;
}

.finance-month strong {
  color: var(--muted);
  font-size: 11px;
}

.finance-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  height: 185px;
}

.finance-bars span {
  display: block;
  width: 11px;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
}

.revenue-bar,
.legend-revenue {
  background: linear-gradient(180deg, var(--accent), #168654);
}

.expense-bar,
.legend-expense {
  background: linear-gradient(180deg, #ffb25f, #d94747);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.chart-legend span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.budget-list .progress {
  margin-top: 8px;
  max-width: 320px;
}

.bar-chart {
  display: flex;
  height: 190px;
  align-items: end;
  gap: 9px;
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 18px 16px 32px;
}

.bar {
  position: relative;
  flex: 1;
  min-width: 18px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--accent), #96e2bd);
  animation: growBar 700ms ease both;
}

.bar::after {
  position: absolute;
  bottom: -24px;
  left: 50%;
  color: #315c43;
  content: attr(data-label);
  font-size: 11px;
  font-weight: 800;
  transform: translateX(-50%);
}

.donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.single-donut {
  grid-template-columns: 1fr;
}

.donut {
  display: grid;
  min-height: 172px;
  place-items: center;
  border-radius: 16px;
  background: var(--panel-solid);
  text-align: center;
}

.donut-ring {
  display: grid;
  width: 110px;
  height: 110px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--panel-solid) 0 54%, transparent 55%),
    conic-gradient(var(--accent) var(--value), rgba(16, 199, 200, 0.18) 0);
  font-size: 1.45rem;
  font-weight: 900;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  gap: 8px;
}

.calendar b,
.calendar span {
  display: grid;
  min-height: 36px;
  place-items: center;
  border-radius: 13px;
  font-size: 12px;
}

.calendar b {
  color: var(--muted);
}

.calendar span {
  background: var(--panel-solid);
  font-weight: 800;
}

.calendar .today {
  background: var(--accent);
  color: #062d37;
}

.calendar .dot {
  box-shadow: inset 0 -4px 0 rgba(16,199,200,0.45);
}

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

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

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  color: var(--ink);
  outline: 0;
  padding: 12px 13px;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.full-field {
  grid-column: 1 / -1;
}

.leave-type-list .chip {
  justify-content: center;
  min-height: 38px;
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.leave-filter-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  padding: 14px;
  margin-bottom: 14px;
}

.leave-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leave-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.leave-table td {
  vertical-align: top;
  white-space: normal;
}

.leave-table table {
  min-width: 1220px;
  table-layout: fixed;
}

.leave-table th:nth-child(1),
.leave-table td:nth-child(1) {
  width: 110px;
}

.leave-table th:nth-child(2),
.leave-table td:nth-child(2) {
  width: 170px;
}

.leave-table th:nth-child(3),
.leave-table td:nth-child(3) {
  width: 140px;
}

.leave-table th:nth-child(4),
.leave-table td:nth-child(4) {
  width: 150px;
}

.leave-table th:nth-child(6),
.leave-table td:nth-child(6) {
  width: 110px;
}

.leave-table th:nth-child(7),
.leave-table td:nth-child(7) {
  width: 190px;
}

.leave-table th:nth-child(8),
.leave-table td:nth-child(8) {
  width: 260px;
}

.leave-table td:nth-child(8) .toolbar {
  flex-wrap: nowrap;
}

.reason-box,
.review-box {
  display: grid;
  gap: 6px;
  max-width: 310px;
  min-width: 220px;
}

.reason-box strong,
.review-box strong {
  font-size: 12px;
}

.reason-box span,
.review-box span {
  color: var(--muted);
  line-height: 1.35;
}

.leave-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.leave-summary strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(54, 201, 134, 0.14);
  color: #217955;
  padding: 7px 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.attachment-pill .lucide {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.modal.leave-detail-modal {
  width: min(880px, calc(100vw - 32px));
}

.leave-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.leave-detail-grid > div,
.leave-detail-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 253, 249, 0.86);
  padding: 14px;
}

.leave-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.leave-detail-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.leave-detail-section {
  margin-top: 12px;
}

.leave-detail-section h4 {
  margin: 0 0 8px;
}

.leave-detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.leave-detail-section.danger {
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(255, 107, 107, 0.08);
}

.leave-detail-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-action-row {
  margin-top: 14px;
  justify-content: flex-end;
}

.review-box {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.review-box.danger {
  border-left-color: var(--danger);
}

.review-box em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(36, 185, 121, 0.12);
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  padding: 20px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-metrics div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 13px;
}

.mini-metrics strong {
  display: block;
  font-size: 1.55rem;
}

.mini-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.issue-stack {
  display: grid;
  gap: 12px;
}

.issue-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 14px;
}

.issue-card-head,
.issue-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.issue-badges {
  justify-content: flex-end;
}

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

.issue-poll {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(43, 182, 115, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(43, 182, 115, 0.1), rgba(255, 255, 255, 0.62));
  padding: 12px;
}

.issue-poll.empty-poll {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.issue-poll-head,
.poll-option-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.poll-options {
  display: grid;
  gap: 10px;
}

.poll-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  padding: 10px;
}

.poll-option-line {
  grid-column: 1 / -1;
}

.poll-progress {
  height: 8px;
  background: rgba(29, 39, 58, 0.1);
}

.poll-vote-box {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: center;
}

.comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 10px;
}

.comment-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.issue-comment-box {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  gap: 8px;
}

.issue-comment-box input,
.issue-comment-box select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 11px 13px;
}

.notification-list {
  max-height: min(520px, 70vh);
  overflow: auto;
}

.notification-row {
  width: 100%;
  text-align: left;
}

.notification-row.unread {
  background: rgba(43, 182, 115, 0.1);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kanban-column {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.28);
  padding: 12px;
}

.task-card {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  background: var(--panel-solid);
  margin-top: 10px;
  padding: 12px;
}

.task-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.issue-topline,
.issue-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.profile-grid > .people-profile {
  grid-column: span 2;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title-row h3 {
  margin: 0;
}

.section-title-row .btn {
  flex: 0 0 auto;
}

.profile-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.2rem;
}

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

.modal.employee-profile-modal {
  width: min(1080px, calc(100vw - 44px));
  max-height: min(860px, calc(100vh - 28px));
}

.modal.employee-document-modal {
  width: min(760px, calc(100vw - 36px));
}

.employee-profile-modal .profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-profile-modal .profile-section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.role-grid {
  display: grid;
  grid-template-columns: 210px repeat(6, minmax(90px, 1fr));
  overflow-x: auto;
}

.role-cell {
  display: grid;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 800;
}

.role-cell.header {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(54, 201, 134, 0.18);
  color: #168654;
}

.empty-check {
  width: 24px;
  height: 24px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}

.policy-note {
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: var(--panel-solid);
  color: var(--muted);
  padding: 13px 14px;
}

.suite-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.suite-card {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.suite-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(25, 86, 54, 0.1);
}

.suite-card .icon-badge {
  margin-bottom: 12px;
}

.suite-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.profile-photo {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 34%, #ffd2ae 0 18%, transparent 19%),
    radial-gradient(circle at 50% 110%, #314334 0 40%, transparent 41%),
    linear-gradient(135deg, #b8ebd0, #f4d38e);
}

.company-logo-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #163c2a;
  font-size: 1.4rem;
  font-weight: 900;
}

.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 20px;
  background: var(--panel-solid);
  padding: 14px;
}

.device-pulse {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background:
    radial-gradient(circle, var(--accent) 0 22%, transparent 23%),
    radial-gradient(circle, rgba(16, 199, 200, 0.25) 0 58%, transparent 59%);
  animation: pulse 1.8s ease-in-out infinite;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 44px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #202736;
  color: white;
  font-weight: 800;
  opacity: 0;
  padding: 13px 16px;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 32, 23, 0.38);
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
  box-shadow: 0 28px 90px rgba(8, 32, 22, 0.24);
  padding: 22px;
}

.modal.payroll-modal,
.modal.payroll-detail-modal {
  width: min(980px, 100%);
}

.payroll-preview-card,
.payroll-total-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.payroll-preview-card > div,
.payroll-total-row > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(236, 250, 242, 0.84);
  padding: 13px;
}

.payroll-preview-card span,
.payroll-total-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-preview-card strong,
.payroll-total-row strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.payslip-preview {
  display: grid;
  gap: 14px;
}

.payslip-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
  gap: 12px;
  align-items: stretch;
}

.payslip-head > div {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 14px;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #062a1b;
  font-weight: 950;
  margin-right: 10px;
}

.payroll-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payroll-breakdown section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  padding: 15px;
}

.payroll-breakdown h4 {
  margin: 0 0 8px;
}

.payroll-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(20, 60, 40, 0.08);
  padding: 9px 0;
  color: var(--muted);
  font-weight: 800;
}

.payroll-line:last-child {
  border-bottom: 0;
}

.payroll-line strong {
  color: var(--ink);
  white-space: nowrap;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
}

.hidden-by-search {
  display: none !important;
}

.chat-room {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}

.active-room {
  outline: 2px solid rgba(43, 182, 115, 0.35);
}

.chat-window {
  display: grid;
  max-height: 430px;
  min-height: 320px;
  overflow: auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 251, 247, 0.72);
  padding: 14px;
}

.chat-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border-radius: 14px;
  background: var(--panel-solid);
  padding: 10px;
}

.chat-message p {
  margin: 4px 0 0;
  color: var(--ink);
}

.chat-message-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.chat-message-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 210px auto;
  gap: 8px;
  margin-top: 12px;
}

.chat-compose input,
.chat-compose select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 10px 12px;
}

.meeting-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  padding: 14px;
}

.chat-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 210px);
  overflow: hidden;
  padding: 0;
}

.slack-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 252, 247, 0.92), rgba(232, 247, 238, 0.72));
  padding: 16px;
}

.slack-workspace-head,
.chat-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slack-workspace-head p,
.slack-section p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slack-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  padding: 8px 10px;
}

.slack-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.more-unreads {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  border: 1px solid rgba(43, 182, 115, 0.28);
  border-radius: 999px;
  background: rgba(43, 182, 115, 0.12);
  color: #146a44;
  padding: 8px 14px;
  font-weight: 900;
}

.slack-section {
  display: grid;
  gap: 6px;
}

.slack-room {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #234334;
  padding: 7px 8px;
  text-align: left;
}

.slack-room span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slack-room b {
  color: var(--muted);
  font-size: 11px;
}

.slack-room.active-room {
  background: #1f7f4a;
  color: white;
  outline: 0;
}

.slack-room.active-room b {
  color: rgba(255, 255, 255, 0.72);
}

.slack-main {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-width: 0;
  background: var(--panel-solid);
}

.chat-channel-header {
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.compact-profile h3 {
  margin: 0;
  font-size: 1.1rem;
}

.chat-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.chat-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 11px 4px 9px;
  font-weight: 900;
}

.chat-tabs button.active {
  border-color: var(--accent);
}

.presence-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: #9aa6b2;
  box-shadow: 0 0 0 1px var(--line);
}

.presence-dot.online {
  background: #2bb673;
}

.presence-dot.away {
  background: #f2b84b;
}

.presence-dot.offline {
  background: #9aa6b2;
}

.date-divider {
  display: flex;
  justify-content: center;
  padding: 10px 18px;
}

.date-divider span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--muted);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 900;
}

.slack-message-stream {
  min-height: 520px;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #f8fbf7);
  padding: 18px;
}

.chat-resource-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.resource-head h3 {
  margin: 0;
}

.resource-grid,
.chat-add-grid,
.member-picker {
  display: grid;
  gap: 10px;
}

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

.chat-add-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chat-add-grid .suite-card {
  cursor: pointer;
  text-align: left;
}

.member-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 260px;
  overflow-y: auto;
}

.member-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  padding: 10px;
}

.member-option small {
  color: var(--muted);
  font-weight: 800;
}

.empty-chat-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 320px;
  text-align: center;
}

.slack-message-stream .chat-message {
  border-radius: 10px;
  box-shadow: none;
}

.file-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 360px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(240, 248, 244, 0.82);
  padding: 10px;
}

.file-preview-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.active-meeting-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(43, 182, 115, 0.12), rgba(57, 137, 210, 0.1));
  padding: 12px 18px;
}

.meet-stage {
  display: grid;
  align-content: start;
  gap: 12px;
}

.screen-share-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(27, 121, 75, 0.1), rgba(57, 137, 210, 0.12)),
    var(--panel-solid);
  padding: 16px;
}

.screen-sharing .screen-share-tile {
  border-color: rgba(43, 182, 115, 0.58);
  box-shadow: inset 0 0 0 2px rgba(43, 182, 115, 0.12);
}

.participant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.participant-tile {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #1f2937;
  color: white;
  padding: 12px;
  text-align: center;
}

.participant-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.meet-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  padding: 10px;
}

.compact-meet-controls {
  border-radius: 18px;
}

.slack-compose {
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 12px 18px;
}

.chat-mode {
  background: #f3f6fb;
}

.chat-mode .app-shell {
  display: block;
  min-height: 100vh;
  padding: 12px;
}

.chat-mode .sidebar,
.chat-mode .topbar,
.chat-mode .hero-panel {
  display: none;
}

.chat-mode .workspace {
  max-width: none;
  padding: 0;
}

.chat-mode .content-grid {
  display: block;
}

.hr-chat-shell {
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 282px) clamp(280px, 21vw, 342px) minmax(380px, 1fr) clamp(280px, 22vw, 352px);
  height: calc(100vh - 24px);
  min-height: min(760px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #e6e9f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(28, 37, 68, 0.08);
  color: #10172f;
  font-size: 14px;
}

.hr-chat-left,
.hr-chat-list,
.hr-chat-main,
.hr-chat-details {
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.hr-chat-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eceef6;
  padding: 20px 20px 18px;
}

.hr-chat-brand,
.hr-list-head,
.hr-main-head,
.hr-details-head,
.hr-section-row,
.hr-chat-user,
.hr-room-title,
.hr-main-actions,
.hr-detail-actions {
  display: flex;
  align-items: center;
}

.hr-chat-brand {
  gap: 12px;
  margin-bottom: 24px;
}

.hr-chat-brand strong,
.hr-list-head h2,
.hr-main-head h2,
.hr-details-head h2,
.hr-detail-profile h2 {
  margin: 0;
  color: #10172f;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

.hr-chat-brand-icon,
.hr-team-avatar {
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #8e73ff, #604ce9);
  color: #fff;
  box-shadow: 0 10px 20px rgba(99, 76, 233, 0.24);
}

.hr-chat-brand-icon {
  width: 36px;
  height: 36px;
}

.hr-chat-brand .hr-chat-icon {
  margin-left: auto;
}

.hr-chat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #27304b;
}

.hr-chat-icon:hover {
  background: #f3f4fb;
  color: #604ce9;
}

.hr-chat-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 46px;
  margin-bottom: 26px;
  border: 1px solid #e4e7f0;
  border-radius: 12px;
  background: #fff;
  color: #8a91a6;
  padding: 0 13px;
}

.hr-chat-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #10172f;
}

.hr-chat-menu-title,
.hr-chat-label-head,
.hr-chat-labels span,
.hr-chat-user p,
.hr-conversation small,
.hr-room-title p,
.hr-detail-profile p,
.hr-detail-section p,
.hr-member-row p,
.hr-shared-file p,
.hr-message-meta span,
.hr-reactions,
.hr-attachment small {
  color: #767d94;
}

.hr-chat-menu-title {
  margin: 0 0 12px 8px;
  font-size: 13px;
  font-weight: 650;
}

.hr-chat-menu {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.hr-chat-menu button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #27304b;
  padding: 0 12px;
  text-align: left;
}

.hr-chat-menu button.active {
  background: linear-gradient(90deg, rgba(104, 84, 239, 0.14), rgba(104, 84, 239, 0.06));
  color: #604ce9;
}

.hr-chat-menu b,
.hr-chat-tabs span,
.hr-conversation b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #6f5cf6;
  color: white;
  font-size: 12px;
  font-style: normal;
}

.hr-chat-label-head {
  justify-content: space-between;
  margin: 0 8px 14px;
  color: #5c6379;
}

.hr-chat-label-head button,
.hr-section-row button,
.hr-view-all {
  border: 0;
  background: transparent;
  color: #604ce9;
  font-weight: 750;
}

.hr-chat-labels {
  display: grid;
  gap: 15px;
}

.hr-chat-labels span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
}

.hr-chat-labels i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.hr-chat-user {
  gap: 12px;
  margin-top: auto;
  border: 1px solid #eceef6;
  border-radius: 14px;
  padding: 12px;
}

.hr-chat-user div {
  min-width: 0;
  flex: 1;
}

.hr-chat-user strong,
.hr-member-row strong,
.hr-conversation strong,
.hr-message-meta strong,
.hr-attachment strong,
.hr-shared-file strong {
  color: #10172f;
}

.hr-chat-user p,
.hr-member-row p,
.hr-shared-file p {
  margin: 4px 0 0;
  font-size: 13px;
}

.hr-chat-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eceef6;
  padding: 22px 8px 14px;
}

.hr-list-head {
  gap: 12px;
  padding: 0 18px 18px;
}

.hr-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  border-radius: 999px;
  background: #f2f3f8;
  color: #252d46;
  padding: 8px 14px;
  font-size: 13px;
}

.hr-chat-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 18px 18px;
}

.hr-chat-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4f5670;
  padding: 9px 12px;
}

.hr-chat-tabs button.active {
  background: rgba(104, 84, 239, 0.1);
  color: #604ce9;
}

.hr-conversation-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.hr-conversation {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 78px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #10172f;
  padding: 12px;
  text-align: left;
}

.hr-conversation.active-room {
  border-color: rgba(104, 84, 239, 0.54);
  background: linear-gradient(90deg, rgba(104, 84, 239, 0.11), rgba(104, 84, 239, 0.04));
  outline: 0;
}

.hr-conversation span:nth-child(2) {
  min-width: 0;
}

.hr-conversation strong,
.hr-conversation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-conversation em {
  color: #7d8498;
  font-size: 12px;
  font-style: normal;
}

.hr-conversation b {
  position: absolute;
  right: 13px;
  bottom: 14px;
}

.hr-chat-main {
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr) 90px;
  border-right: 1px solid #eceef6;
  overflow: hidden;
}

.hr-main-head {
  justify-content: space-between;
  border-bottom: 1px solid #eceef6;
  padding: 18px 24px;
}

.hr-room-title {
  gap: 12px;
}

.hr-room-title p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 0;
}

.hr-main-actions {
  gap: 14px;
}

.hr-message-canvas {
  min-height: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 28%, rgba(240, 242, 249, 0.72), transparent 340px),
    #fff;
  padding: 90px 24px 28px;
}

.hr-date-divider {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 auto 28px;
  max-width: 420px;
  color: #8a91a6;
}

.hr-date-divider span {
  height: 1px;
  background: #eceef6;
}

.hr-date-divider b {
  font-weight: 600;
}

.hr-message {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  max-width: 520px;
  margin-bottom: 26px;
}

.hr-message.mine {
  grid-template-columns: minmax(0, 1fr);
  margin-left: auto;
}

.hr-message.mine .hr-message-body {
  align-items: flex-end;
}

.hr-message-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.hr-message-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
}

.hr-bubble {
  border-radius: 11px;
  background: #f5f6fa;
  color: #10172f;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(28, 37, 68, 0.04);
}

.hr-message.mine .hr-bubble {
  background: linear-gradient(135deg, #7761f6, #875df7);
  color: #fff;
}

.hr-bubble p {
  margin: 0;
  line-height: 1.65;
}

.hr-reactions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  font-size: 12px;
}

.hr-reactions span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(28, 37, 68, 0.08);
  padding: 5px 9px;
}

.hr-reactions em {
  margin-left: 16px;
  color: #767d94;
  font-style: normal;
}

.hr-attachment {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 270px;
  margin-top: 14px;
  border: 1px solid #e7e9f2;
  border-radius: 12px;
  background: #fff;
  color: #10172f;
  padding: 12px;
}

.hr-attachment > span,
.hr-shared-file > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: #f23838;
  color: #fff;
}

.hr-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px repeat(6, 28px) 42px;
  align-items: center;
  gap: 12px;
  margin: 14px 20px 20px;
  border: 1px solid #e1e4ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 37, 68, 0.05);
  padding: 12px;
}

.hr-composer input[data-field="chat-message"],
.hr-composer select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #10172f;
}

.hr-composer select {
  width: 1px;
  opacity: 0;
  pointer-events: none;
}

.hr-compose-tool,
.hr-compose-more,
.hr-send {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #566079;
}

.hr-compose-tool input {
  display: none;
}

.hr-send {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(145deg, #8065ff, #604ce9);
  color: #fff;
  box-shadow: 0 8px 20px rgba(96, 76, 233, 0.24);
}

.hr-chat-details {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.hr-details-head {
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid #eceef6;
  padding: 20px 24px;
}

.hr-detail-profile {
  display: grid;
  justify-items: center;
  border-bottom: 1px solid #eceef6;
  padding: 28px 24px 24px;
  text-align: center;
}

.hr-detail-profile h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.hr-detail-profile h2 button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #27304b;
}

.hr-detail-actions {
  justify-content: space-between;
  border-bottom: 1px solid #eceef6;
  padding: 20px 18px;
}

.hr-detail-actions button {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #4c556d;
  font-size: 12px;
}

.hr-detail-actions button svg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f2f4f8;
  padding: 12px;
}

.hr-detail-section {
  border-bottom: 1px solid #eceef6;
  padding: 22px 20px;
}

.hr-section-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hr-detail-section p {
  margin: 0;
  line-height: 1.6;
}

.hr-member-list,
.hr-file-list {
  display: grid;
  gap: 14px;
}

.hr-member-row,
.hr-shared-file {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.hr-view-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
  color: #27304b;
  text-align: left;
}

.hr-shared-file {
  grid-template-columns: 44px minmax(0, 1fr);
  border-radius: 12px;
  background: #f9f9fc;
  padding: 12px;
}

.hr-shared-file .ppt {
  background: #ff7a1a;
}

.hr-person-avatar,
.hr-team-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 850;
}

.hr-person-avatar {
  background:
    radial-gradient(circle at 50% 36%, #ffd3ad 0 18%, transparent 19%),
    radial-gradient(circle at 50% 105%, #243248 0 36%, transparent 37%),
    linear-gradient(135deg, #c9d6ff, #fbc2eb);
}

.hr-avatar-photo {
  background:
    radial-gradient(circle at 50% 36%, #ffd3ad 0 18%, transparent 19%),
    radial-gradient(circle at 50% 105%, #3b291d 0 36%, transparent 37%),
    linear-gradient(135deg, #ffbc7d, #f6d365);
}

.hr-person-avatar i {
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #a0a7b7;
}

.hr-person-avatar i.online {
  background: #26b86a;
}

.hr-person-avatar i.away {
  background: #f3ae36;
}

.hr-avatar-lg,
.hr-team-avatar.hr-avatar-lg {
  width: 44px;
  height: 44px;
}

.hr-avatar-xl,
.hr-team-avatar.hr-avatar-xl {
  width: 70px;
  height: 70px;
  font-size: 22px;
}

.hr-empty-chat {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  color: #767d94;
  text-align: center;
}

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

@keyframes growBar {
  from { height: 4%; }
}

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

@keyframes pulse {
  50% { transform: scale(1.08); }
}

@media (max-width: 1180px) {
  .span-3,
  .span-4 {
    grid-column: span 6;
  }

  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: 1 / -1;
  }

  .span-9 {
    grid-column: 1 / -1;
  }

  .suite-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .employee-profile-modal .profile-grid,
  .employee-profile-modal .profile-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .auth-mode .workspace {
    padding: 12px;
  }

  .auth-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand,
  .auth-card {
    border-radius: 18px;
    padding: 18px;
    min-height: auto;
    width: 100%;
  }

  .auth-brand {
    gap: 18px;
  }

  .auth-brand::before {
    inset: 10px;
    border-radius: 16px;
  }

  .auth-brand h1 {
    font-size: 34px;
  }

  .auth-stat-grid {
    grid-template-columns: 1fr;
  }

  .auth-card-head {
    grid-template-columns: 1fr;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-actions .btn,
  .auth-secondary {
    width: 100%;
    flex: 1 1 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 20;
    height: 66px;
    flex-direction: row;
    border-radius: 20px;
    padding: 9px;
  }

  .brand,
  .bottom-action {
    display: none;
  }

  .nav-list {
    flex: 1;
    flex-direction: row;
    justify-content: space-between;
    overflow-x: auto;
  }

  .nav-item {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
  }

  .nav-item::after {
    display: none;
  }

  .workspace {
    padding-bottom: 92px;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .finance-chart {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow-x: auto;
  }

  .search-control {
    min-width: 260px;
  }

  .hero-metrics,
  .donut-grid,
  .kanban,
  .form-grid,
  .leave-filter-grid,
  .payroll-settings-grid,
  .payroll-preview-card,
  .payroll-total-row,
  .payroll-breakdown,
  .payslip-head,
  .mini-metrics,
  .suite-grid,
  .profile-grid,
  .profile-section-grid,
  .loan-detail-grid,
  .loan-meta-grid,
  .chat-compose,
  .slack-compose,
  .issue-comment-box,
  .issue-poll.empty-poll,
  .poll-option {
    grid-template-columns: 1fr;
  }

  .employee-profile-modal .profile-grid,
  .employee-profile-modal .profile-section-grid {
    grid-template-columns: 1fr;
  }

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

  .chat-workspace {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .slack-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-channel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-tabs {
    overflow-x: auto;
  }

  .slack-message-stream {
    min-height: 420px;
  }

  .participant-grid,
  .resource-grid,
  .chat-add-grid,
  .member-picker,
  .active-meeting-banner {
    grid-template-columns: 1fr;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-9 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .hero-panel,
  .panel {
    border-radius: 16px;
    padding: 16px;
  }

  .chat-workspace {
    padding: 0;
  }

  .modal.employee-profile-modal {
    width: calc(100vw - 20px);
    padding: 16px;
  }

  .hero-metrics {
    gap: 8px;
  }

  .hero-metrics div {
    min-height: auto;
  }

  .content-grid {
    gap: 10px;
  }
}
