:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #edf0f6;
  --surface-strong: #f1f5fb;
  --text: #111827;
  --text-muted: #6b7280;
  --border: rgba(145, 158, 171, 0.24);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #161e35;
  --surface-strong: #1f2937;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --border: rgba(148, 163, 184, 0.28);
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #f87171;
  --info: #38bdf8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.mobile-menu-toggle,
.mobile-sidebar-backdrop {
  display: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #38bdf8);
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.08);
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.brand-logo-full {
  width: min(130px, 100%);
  height: 34px;
  border-radius: 0;
  background: transparent;
  border: 0;
  object-position: left center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  background: var(--surface-soft);
  color: var(--text);
}

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

.nav-item span {
  font-size: 0.9rem;
  text-align: left;
}

.content-area {
  padding: 18px 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title {
  display: grid;
  gap: 4px;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.7vw, 1.8rem);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title p {
  margin: 0;
  color: var(--text-muted);
}

.page-title-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  flex: 0 0 auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions > .icon-button,
.top-actions > .profile-chip,
.top-actions .ghost-button {
  min-height: 38px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.top-action-form {
  margin: 0;
  display: inline-flex;
}

.notification-menu {
  position: relative;
}

.notification-button {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid var(--surface);
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  width: min(340px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 10px;
  color: var(--text-muted);
}

.notification-dropdown-header strong {
  color: var(--text);
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  color: var(--text);
}

.notification-item:hover {
  background: var(--surface-soft);
}

.notification-type {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-item small,
.notification-empty {
  color: var(--text-muted);
}

.notification-empty {
  padding: 12px 10px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-chip-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inline-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  flex: 0 0 auto;
}

.inline-avatar-fallback {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.person-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  vertical-align: middle;
}

.person-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.person-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.readonly-person {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  min-width: 220px;
  flex: 1 1 220px;
}

.search-field input {
  border: none;
  outline: none;
  width: 180px;
  background: transparent;
  color: inherit;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.filter-toggle-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  border-radius: 14px;
}

.filter-toggle-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.filter-toggle-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

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

.people-search-filter {
  display: inline-grid;
  gap: 4px;
  min-width: min(360px, 45vw);
}

.people-search-filter span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.people-search-filter input {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 14px;
}

.compact-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.collapsible-filters {
  margin-top: 16px;
}

.collapsible-filters[hidden] {
  display: none;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 8px 16px;
  border: 1px solid transparent;
  color: var(--text);
}

.profile-chip-button {
  min-height: 46px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.profile-chip-button:hover,
.profile-chip-button.active {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.32);
  background: var(--surface-strong);
}

.profile-chip-button:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.24);
  outline-offset: 3px;
}

.profile-chip strong {
  display: block;
}

.profile-chip span {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.profile-chip .inline-avatar-fallback {
  display: inline-grid;
  color: var(--accent);
}

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

.section {
  display: none;
}

.section.active {
  display: block;
}

.grid-1,
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
}

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

.card,
.panel,
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow-x: auto;
}

.card .card-title,
.panel .panel-title,
.table-card .table-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card h2,
.panel h2,
.table-card h2 {
  margin: 0;
  font-size: 1rem;
}

.small-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric strong {
  font-size: 1.65rem;
}

.metric span {
  color: var(--text-muted);
}

.metric .person-inline span:last-child {
  color: var(--text);
}

.metric .inline-avatar-fallback {
  color: var(--accent);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-avatar-button {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 0;
  padding: 0;
  flex: 0 0 auto;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  max-width: 84px;
  max-height: 84px;
  min-width: 84px;
  min-height: 84px;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  flex: 0 0 auto;
}

.profile-avatar-edit-icon {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-avatar-button:hover .profile-avatar-edit-icon,
.profile-avatar-button:focus-visible .profile-avatar-edit-icon {
  opacity: 1;
  transform: translateY(0);
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
}

.profile-console {
  padding: 18px;
}

.profile-console-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.profile-console-header h2,
.profile-console-header p {
  margin: 0;
}

.profile-console-header p {
  color: var(--text-muted);
}

.profile-console-header .profile-avatar-button,
.profile-console-header .profile-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  max-height: 64px;
}

.profile-console-header .profile-avatar-fallback {
  font-size: 1.45rem;
}

.profile-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.profile-tab {
  padding: 9px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.profile-tab.active,
.profile-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

.onboarding-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.onboarding-tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.onboarding-tab.active,
.onboarding-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.onboarding-tab-panel {
  display: none;
}

.onboarding-tab-panel.active {
  display: block;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.settings-tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.settings-tab.active,
.settings-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.active {
  display: block;
}

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

.metric-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  display: grid;
  gap: 4px;
}

.metric-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.metric-card strong {
  font-size: 1.2rem;
}

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

.compact-info-grid > div,
.document-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 4px;
}

.compact-info-grid strong {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.compact-info-grid span {
  color: var(--text);
  overflow-wrap: anywhere;
}

.compact-info-wide {
  grid-column: span 3;
}

.compact-info-grid > .skills-info-block {
  border-radius: 0 !important;
}

.compact-timeline {
  margin-top: 12px;
}

.compact-upload-form,
.compact-security-form {
  margin-bottom: 14px;
}

.document-list {
  display: grid;
  gap: 10px;
}

.compact-document-list {
  margin-top: 12px;
}

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

.document-item span {
  color: var(--text-muted);
}

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

.document-actions form {
  margin: 0;
}

.skill-chip-list {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 160px;
}

.skill-chip-list .skill-token {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.skill-chip-list-collapsible {
  max-height: 58px;
  overflow: hidden;
}

.skill-chip-list-collapsible[data-expanded="true"] {
  max-height: none;
}

.skill-expand-button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.skill-expand-button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.skill-expand-button[aria-expanded="true"]::before {
  transform: translateY(2px) rotate(225deg);
}

.skill-expand-button:hover {
  background: var(--surface-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  color: var(--accent);
}

.skill-picker {
  display: grid;
  gap: 10px;
}

.skill-picker-selected {
  display: flex;
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.skill-picker-selected .skill-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.skill-picker-empty {
  align-self: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.skill-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.skill-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.skill-choice input {
  accent-color: var(--accent);
}

.skill-picker-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.skill-picker-add input {
  min-width: 0;
}

.people-table-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.document-chip-list {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  white-space: nowrap;
}

.table-sort-button::after {
  content: "";
  display: inline-block;
  width: 0;
}

.table-sort-button.active::after {
  content: "↑";
}

.table-sort-button.active[data-direction="desc"]::after {
  content: "↓";
}

.developer-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.developer-card-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.developer-card-block h3 {
  margin: 0;
  font-size: 1rem;
}

.developer-readonly-card {
  margin-top: 4px;
}

.employee-profile-panel {
  margin: 12px 0 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.employee-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.employee-profile-header .readonly-person {
  min-width: 0;
}

.employee-profile-header .readonly-person > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.employee-profile-header .readonly-person span {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.employee-profile-access-note {
  margin-bottom: 12px;
}

.employee-profile-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.employee-profile-tab {
  padding: 9px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.employee-profile-tab.active,
.employee-profile-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.employee-profile-panel-section {
  display: none;
}

.employee-profile-panel-section.active {
  display: block;
}

.employee-profile-form {
  margin-top: 0;
}

.danger-zone {
  border-color: rgba(239, 68, 68, 0.35);
}

.compact-filter-row {
  margin: 12px 0;
}

.onboarding-template-item {
  gap: 12px;
}

.compact-template-form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
}

.template-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.template-actions form {
  margin: 0;
}

.template-task-list {
  display: grid;
  gap: 8px;
}

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

.template-task-row.dragging {
  opacity: 0.62;
  outline: 2px dashed var(--accent);
}

.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
}

.template-task-row span {
  display: block;
  color: var(--text-muted);
  margin-top: 2px;
}

.rich-editor {
  display: grid;
  gap: 8px;
}

.rich-editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rich-editor-toolbar button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.rich-editor-input {
  min-height: 130px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}

.rich-editor-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.rich-text-output {
  display: block;
  color: var(--text);
}

.rich-text-output p {
  margin: 0 0 8px;
}

.rich-text-output ul,
.rich-text-output ol {
  margin: 6px 0;
  padding-left: 20px;
}

.rich-text-output table,
.rich-editor-input table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.rich-text-output td,
.rich-text-output th,
.rich-editor-input td,
.rich-editor-input th {
  border: 1px solid var(--border);
  padding: 6px;
}

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

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
}

.attachment-chip a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.attachment-chip small {
  color: var(--text-muted);
}

.attachment-chip form {
  margin: 0;
}

.attachment-chip button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-weight: 900;
}

.activity-details {
  margin-top: 8px;
}

.activity-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.activity-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.activity-list div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-strong);
}

.activity-list span {
  color: var(--text-muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.status-chip.warning { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.status-chip.danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.status-chip.info { background: rgba(14, 165, 233, 0.12); color: var(--info); }

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

.widget {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: left;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dashboard-widget:hover,
.dashboard-action-card:hover,
.legend-button:hover,
.dashboard-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.35);
}

.dashboard-widget:focus-visible,
.dashboard-action-card:focus-visible,
.legend-button:focus-visible,
.dashboard-chip:focus-visible,
.event-pill:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.24);
  outline-offset: 3px;
}

.widget span {
  display: block;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.widget strong {
  display: block;
  font-size: 1.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.85rem;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.segment-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.segment-button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

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

.dashboard-schedule-card {
  grid-column: 1 / -1;
}

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

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.resource-card {
  display: grid;
  grid-template-rows: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
}

.resource-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.resource-card img,
.resource-card-placeholder {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-soft);
}

.resource-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
}

.resource-card strong,
.resource-card small {
  display: block;
}

.resource-card small {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.45;
}

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

.request-insight-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
}

.request-insight-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-insight-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
}

.request-insight-list {
  margin-top: 14px;
}

.request-insight-item {
  border-left: 4px solid var(--border);
}

.request-insight-warning {
  border-left-color: #f59e0b;
}

.request-insight-info {
  border-left-color: #0ea5e9;
}

.request-insight-neutral {
  border-left-color: var(--accent);
}

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

.schedule-nav-button {
  min-height: 34px;
  padding: 0 10px;
}

.dashboard-schedule {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.schedule-grid {
  display: grid;
  grid-template-columns: 230px repeat(var(--days), minmax(34px, 1fr));
  grid-auto-rows: 52px;
  min-width: calc(230px + (var(--days) * 34px));
  position: relative;
}

.schedule-corner,
.schedule-day-head,
.schedule-user-cell,
.schedule-day-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.schedule-corner {
  grid-column: 1;
  grid-row: 1;
  background: var(--surface-strong);
  position: sticky;
  left: 0;
  z-index: 4;
}

.schedule-day-head {
  grid-row: 1;
  min-height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.schedule-day-head.today {
  background: var(--accent);
  color: white;
  border-radius: 8px 8px 0 0;
}

.schedule-user-cell {
  grid-column: 1;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 10px;
  background: var(--surface);
  position: sticky;
  left: 0;
  z-index: 3;
}

.schedule-user-cell > span:last-child {
  color: var(--text-muted);
  font-size: 0.74rem;
  padding-left: 32px;
}

.schedule-day-cell {
  background: var(--surface);
}

.schedule-day-cell.today {
  background: rgba(79, 70, 229, 0.05);
}

.schedule-event {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: center;
  min-height: 28px;
  margin: 0 3px;
  padding: 0 8px;
  border-radius: 7px;
  text-align: left;
  font-weight: 700;
  position: relative;
  z-index: 2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.schedule-event-icon,
.legend-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1;
}

.schedule-event > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-event-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: max-content;
  max-width: min(320px, 70vw);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  white-space: normal;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.schedule-event:hover {
  overflow: visible;
}

.schedule-event:hover .schedule-event-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dashboard-calendar-month {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-calendar-month {
  display: grid;
  gap: 8px;
}

.mobile-calendar-weekdays,
.mobile-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mobile-calendar-weekdays {
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.mobile-calendar-grid {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--border);
  gap: 1px;
}

.mobile-calendar-day {
  min-height: 96px;
  min-width: 0;
  padding: 6px;
  background: var(--surface);
}

.mobile-calendar-day.is-muted {
  background: var(--surface-strong);
  color: var(--text-muted);
}

.mobile-calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.mobile-calendar-day-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
  border-radius: 999px;
  font-weight: 800;
}

.mobile-calendar-day.today .mobile-calendar-day-number {
  background: var(--accent);
  color: #fff;
}

.mobile-calendar-events {
  display: grid;
  gap: 4px;
}

.mobile-calendar-event,
.mobile-calendar-more {
  min-width: 0;
  width: 100%;
  padding: 4px 5px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
}

.mobile-calendar-event strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-calendar-more {
  justify-content: center;
  background: var(--surface-soft);
  color: var(--text-muted);
}

.mobile-calendar-detail-list {
  display: grid;
  gap: 10px;
}

.mobile-calendar-detail-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
}

.mobile-calendar-detail-row strong,
.mobile-calendar-detail-row span {
  display: block;
}

.mobile-calendar-detail-row span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.mobile-calendar-detail-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.calendar-cell {
  min-height: 132px;
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.calendar-cell.today {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.16);
}

.calendar-cell-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-cell-head span,
.calendar-empty,
.calendar-more {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.calendar-events {
  display: grid;
  gap: 7px;
}

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

.heatmap-day {
  min-height: 90px;
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.heatmap-day strong {
  display: block;
  margin-bottom: 10px;
}

.heatmap-row {
  display: grid;
  gap: 8px;
}

.event-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--text);
  text-align: left;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.event-pill .inline-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
}

.event-pill:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.event-paid { background: rgba(79, 70, 229, 0.14); color: #4338ca; }
.event-sick { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.event-unpaid { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.event-overtime { background: rgba(168, 85, 247, 0.12); color: #7c3aed; }
.event-remote { background: rgba(34, 197, 94, 0.12); color: #047857; }
.event-absence { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.event-holiday { background: rgba(245, 158, 11, 0.16); color: #92400e; }
.event-vacation { background: rgba(34, 197, 94, 0.14); color: #166534; }
.event-birthday { background: rgba(236, 72, 153, 0.14); color: #be185d; }
.event-anniversary { background: rgba(20, 184, 166, 0.14); color: #0f766e; }
.event-probation { background: rgba(99, 102, 241, 0.14); color: #4338ca; }

[data-theme="dark"] .event-paid { background: rgba(129, 140, 248, 0.24); color: #ddd6fe; border-color: rgba(165, 180, 252, 0.22); }
[data-theme="dark"] .event-sick { background: rgba(56, 189, 248, 0.2); color: #bae6fd; border-color: rgba(125, 211, 252, 0.2); }
[data-theme="dark"] .event-unpaid,
[data-theme="dark"] .event-absence { background: rgba(248, 113, 113, 0.2); color: #fecaca; border-color: rgba(252, 165, 165, 0.2); }
[data-theme="dark"] .event-overtime { background: rgba(192, 132, 252, 0.22); color: #e9d5ff; border-color: rgba(216, 180, 254, 0.2); }
[data-theme="dark"] .event-remote { background: rgba(52, 211, 153, 0.2); color: #bbf7d0; border-color: rgba(134, 239, 172, 0.18); }
[data-theme="dark"] .event-holiday { background: rgba(251, 191, 36, 0.22); color: #fde68a; border-color: rgba(252, 211, 77, 0.2); }
[data-theme="dark"] .event-vacation { background: rgba(74, 222, 128, 0.2); color: #bbf7d0; border-color: rgba(134, 239, 172, 0.18); }
[data-theme="dark"] .event-birthday { background: rgba(244, 114, 182, 0.22); color: #fbcfe8; border-color: rgba(249, 168, 212, 0.18); }
[data-theme="dark"] .event-anniversary { background: rgba(45, 212, 191, 0.2); color: #ccfbf1; border-color: rgba(94, 234, 212, 0.18); }
[data-theme="dark"] .event-probation { background: rgba(129, 140, 248, 0.22); color: #ddd6fe; border-color: rgba(165, 180, 252, 0.2); }

.table-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.table-card th,
.table-card td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

.table-card td:nth-child(3),
.table-card th:nth-child(3) {
  white-space: nowrap;
}

.table-card td:nth-child(8),
.table-card th:nth-child(8) {
  white-space: nowrap;
}

.table-card td:last-child {
  min-width: 180px;
}

.users-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  white-space: nowrap;
}

.table-card thead th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.table-card tbody tr {
  border-bottom: 1px solid var(--border);
}

.table-card tbody tr:last-child {
  border-bottom: none;
}

.data-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.data-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.report-metric-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.report-metric-card strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
}

.org-chart-card {
  overflow: hidden;
}

.section-note {
  margin: 10px 0 20px;
  color: var(--text-muted);
  font-weight: 600;
}

.org-department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.org-department-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  overflow: hidden;
}

.org-department-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.org-department-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.org-department-card header span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.org-tree {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  overscroll-behavior: contain;
}

.org-node {
  display: grid;
  gap: 8px;
  margin-left: calc(var(--org-level, 0) * 18px);
}

.org-person-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.org-node[style*="--org-level: 1"] .org-person-card,
.org-node[style*="--org-level: 2"] .org-person-card,
.org-node[style*="--org-level: 3"] .org-person-card,
.org-node[style*="--org-level: 4"] .org-person-card {
  border-left: 3px solid var(--accent);
}

.org-person-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.org-person-card span {
  display: grid;
  min-width: 0;
}

.org-person-card strong,
.org-person-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-person-card strong {
  font-size: 0.92rem;
}

.org-person-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.legend-button {
  padding: 0;
  text-align: left;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-paid { background: #4338ca; }
.legend-sick { background: #0369a1; }
.legend-unpaid { background: #b91c1c; }
.legend-overtime { background: #7c3aed; }
.legend-holiday { background: #f59e0b; }
.legend-vacation { background: #22c55e; }

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-item strong {
  font-size: 0.95rem;
}

.timeline-item span {
  color: var(--text-muted);
}

.dashboard-show-more {
  justify-self: stretch;
}

.onboarding-task-pagination {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.onboarding-task-pagination span {
  color: var(--text-muted);
  font-weight: 800;
}

.avatar-group {
  display: flex;
  gap: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #fff;
}

.avatar-blue { background: #4338ca; }
.avatar-teal { background: #047857; }
.avatar-orange { background: #ea580c; }
.avatar-violet { background: #8b5cf6; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.78rem;
}

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

.permissions-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  width: 100%;
}

.permissions-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
}

.permissions-table th,
.permissions-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.permissions-table th {
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.permissions-table th:first-child,
.permissions-table td:first-child {
  width: auto;
}

.permissions-table th:nth-child(2),
.permissions-table th:nth-child(3),
.permissions-table td:nth-child(2),
.permissions-table td:nth-child(3) {
  width: 132px;
  text-align: center;
}

.permissions-table tbody tr {
  transition: background 0.18s ease;
}

.permissions-table tbody tr:hover {
  background: var(--surface-strong);
}

.permissions-table tr:last-child td {
  border-bottom: 0;
}

.permissions-table td:first-child {
  color: var(--text);
  font-weight: 700;
}

.permission-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.permission-capabilities label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
}

.permission-capabilities input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.permissions-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

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

.compact-role-form .field-group:nth-of-type(3),
.compact-role-form .field-group:nth-of-type(4) {
  grid-column: 1 / -1;
}

.compact-role-form input,
.compact-role-form textarea {
  min-height: 42px;
}

.compact-role-form textarea {
  max-height: 76px;
  resize: vertical;
}

.modal-content-compact {
  overflow-y: auto !important;
}

.modal-content-compact .permissions-table-wrap {
  border-radius: 12px;
}

.modal-content-compact .permissions-table {
  min-width: 0;
}

.modal-content-compact .permissions-table th,
.modal-content-compact .permissions-table td {
  padding: 8px 14px;
}

.modal-content-compact .permissions-table th:nth-child(2),
.modal-content-compact .permissions-table th:nth-child(3),
.modal-content-compact .permissions-table td:nth-child(2),
.modal-content-compact .permissions-table td:nth-child(3) {
  width: 104px;
}

.modal-content-compact .permissions-table td:first-child {
  font-size: 0.95rem;
}

.modal-content-compact .permission-capabilities {
  gap: 6px;
  margin-top: 6px;
}

.modal-content-compact .permission-capabilities label {
  padding: 4px 7px;
  font-size: 0.72rem;
}

.modal-content-compact .permissions-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.filter-row,
.table-actions,
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

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

.people-filter-row {
  grid-template-columns: minmax(360px, 1.5fr) repeat(2, minmax(220px, 1fr));
  align-items: end;
}

.people-filter-row .filter-field:first-child input {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 1rem;
}

.multi-select-filter {
  position: relative;
}

.multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.multi-select-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.multi-select-trigger[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.multi-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}

.multi-select-option:hover {
  background: var(--surface-soft);
}

.multi-select-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.people-table-card {
  overflow: visible;
}

.people-table {
  min-width: 1120px;
  table-layout: fixed;
  font-size: 0.9rem;
}

.people-table th,
.people-table td {
  padding: 10px 12px;
  overflow-wrap: normal;
}

.people-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.people-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface-soft) 46%, transparent);
}

.people-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.people-table tbody tr:last-child {
  border-bottom: 0;
}

.people-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.people-table tbody td {
  line-height: 1.35;
}

.people-table .person-inline {
  gap: 8px;
  max-width: 100%;
}

.people-table .person-link span:last-child,
.people-table td:nth-child(2),
.people-table td:nth-child(4),
.people-table td:nth-child(6),
.people-table td:nth-child(8) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-table th:nth-child(1),
.people-table td:nth-child(1) { width: 180px; }
.people-table th:nth-child(2),
.people-table td:nth-child(2) { width: 210px; }
.people-table th:nth-child(3),
.people-table td:nth-child(3) { width: 120px; }
.people-table th:nth-child(4),
.people-table td:nth-child(4) { width: 170px; }
.people-table th:nth-child(5),
.people-table td:nth-child(5) { width: 130px; }
.people-table th:nth-child(6),
.people-table td:nth-child(6) { width: 170px; }
.people-table th:nth-child(7),
.people-table td:nth-child(7) { width: 180px; }
.people-table th:nth-child(8),
.people-table td:nth-child(8) { width: 145px; }
.people-table th:nth-child(9),
.people-table td:nth-child(9) { width: 120px; }
.people-table th:nth-child(10),
.people-table td:nth-child(10) { width: 115px; }

.people-table td:last-child {
  min-width: 0;
}

.people-table .badge-pill {
  padding: 5px 9px;
  font-size: 0.78rem;
}

.people-table .document-chip-list {
  gap: 6px;
}

.field-span-1 {
  grid-column: span 1;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
  margin-top: 4px;
}

.filter-field,
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-create-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.inline-create-panel[hidden],
.inline-edit-panel[hidden],
.inline-edit-row[hidden] {
  display: none;
}

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

.dictionary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.dictionary-card textarea {
  min-height: 240px;
}

.dictionary-card .primary-button,
.dictionary-card .secondary-button {
  width: 100%;
}

.dictionary-card-muted {
  justify-content: flex-start;
}

.dictionary-card-wide {
  grid-column: 1 / -1;
}

.resource-builder-header {
  margin-bottom: 2px;
}

.resource-builder-list {
  display: grid;
  gap: 12px;
}

.resource-builder-row {
  display: grid;
  grid-template-columns: 92px minmax(160px, 1fr) minmax(220px, 1.35fr) minmax(220px, 1.2fr) minmax(190px, 0.85fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.resource-builder-row:not(.is-editing) input[readonly] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.resource-builder-row .field-group {
  gap: 6px;
}

.resource-builder-preview img,
.resource-builder-preview .resource-card-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
}

.resource-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-row-actions .compact-button {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
}

.resource-image-field input[type="file"][hidden] {
  display: none;
}

.resource-builder-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.resource-builder-actions .secondary-button {
  width: auto;
}

.holiday-policy-widget {
  display: grid;
  gap: 16px;
}

.holiday-policy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.holiday-policy-header label {
  display: block;
}

.holiday-policy-builder {
  display: grid;
  grid-template-columns: 180px 180px minmax(220px, 1fr) 160px auto;
  align-items: end;
  gap: 12px;
}

.holiday-add-button {
  min-width: 96px;
}

.holiday-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-height: 96px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.holiday-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
}

.holiday-tile-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.holiday-tile-date {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.holiday-tile-label {
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.holiday-tile .badge-pill {
  justify-self: start;
}

.holiday-tile button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--text-muted);
}

.holiday-tile button:hover {
  background: var(--surface-soft);
  color: var(--danger);
}

.holiday-empty-state {
  display: grid;
  place-items: center;
  min-height: 70px;
  color: var(--text-muted);
}

.inline-edit-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.inline-edit-row > td {
  padding: 0 !important;
  background: transparent;
}

.inline-edit-row .inline-edit-panel {
  margin: 0;
  border-radius: 0 0 18px 18px;
  border-left: 0;
  border-right: 0;
}

.inline-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination-controls[hidden] {
  display: none;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

select,
input[type="email"],
input[type="number"],
input[type="text"],
input[type="date"],
input[type="tel"],
input[type="file"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  line-height: 1.2;
}

select {
  height: 48px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input[type="file"] {
  padding: 9px 12px;
}

.custom-date-input {
  cursor: pointer;
}

.custom-date-picker {
  position: absolute;
  z-index: 12000;
  box-sizing: border-box;
  width: 330px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.custom-date-picker[hidden] {
  display: none;
}

.custom-date-picker-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 92px 38px;
  gap: 8px;
  align-items: center;
}

.custom-date-picker select {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.custom-date-nav {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.custom-date-weekdays,
.custom-date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.custom-date-weekdays {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.custom-date-days {
  margin-top: 8px;
}

.custom-date-weekdays span {
  min-width: 0;
}

.custom-date-day {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.custom-date-day:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.custom-date-day.is-today {
  border-color: var(--accent);
}

.custom-date-day.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.custom-date-day.is-empty {
  pointer-events: none;
}

.custom-date-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.custom-date-actions button {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

textarea {
  min-height: 120px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

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

  .field-span-1,
  .field-span-2 {
    grid-column: 1 / -1;
  }

}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  padding: 0 14px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost-button {
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.action-group {
  display: inline-flex;
  gap: 10px;
}

.action-chip {
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-menu-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    font-weight: 800;
    backdrop-filter: blur(12px);
  }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
  }
  .mobile-sidebar-backdrop[hidden] {
    display: none;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(320px, calc(100vw - 44px));
    height: 100dvh;
    padding: 78px 18px 18px;
    border-right: 1px solid var(--border);
    border-bottom: none;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .mobile-menu-toggle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .content-area {
    padding: 78px 20px 20px;
  }
  .sidebar nav {
    display: grid;
    gap: 8px;
  }
  .nav-item {
    width: 100%;
  }
  .dictionary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .holiday-policy-builder { grid-template-columns: 1fr; }
  .resource-builder-row { grid-template-columns: 1fr; }
  .resource-row-actions { align-items: stretch; }
  .resource-row-actions .compact-button { width: 100%; }
  .developer-card-grid { grid-template-columns: 1fr; }
  .widget-grid,
  .filter-row,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .search-field { width: 100%; }
  .top-actions { justify-content: stretch; }
  .card, .panel, .table-card { padding: 18px; }
  .heatmap { grid-template-columns: 1fr; }
  .heatmap-day { min-height: 100px; }
  .table-card table {
    display: block;
    overflow-x: auto;
  }
  .table-card th,
  .table-card td {
    white-space: nowrap;
  }

  #reports .table-card,
  #users .table-card {
    overflow-x: visible;
  }

  #reports .table-card table,
  #users .people-table-card table {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    overflow: visible;
  }

  #reports .table-card thead,
  #users .people-table-card thead {
    display: none;
  }

  #reports .table-card tbody,
  #users .people-table-card tbody {
    display: grid;
    gap: 12px;
  }

  #reports .table-card tbody tr,
  #users .people-table-card tbody tr:not(.inline-edit-row) {
    display: grid;
    gap: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-strong);
  }

  #reports .table-card tbody td,
  #users .people-table-card tbody tr:not(.inline-edit-row) td {
    display: grid;
    grid-template-columns: minmax(98px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #reports .table-card tbody td:last-child,
  #users .people-table-card tbody tr:not(.inline-edit-row) td:last-child {
    min-width: 0;
    border-bottom: 0;
  }

  #reports .table-card tbody td::before,
  #users .people-table-card tbody tr:not(.inline-edit-row) td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  #reports .table-card tbody td[colspan] {
    display: block;
    text-align: center;
  }

  #reports .table-card tbody td[colspan]::before {
    content: none;
  }

  #users .users-actions-cell button {
    grid-column: 2;
    width: 100%;
  }

  #users .inline-edit-row {
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
  }

  #users .inline-edit-row[hidden] {
    display: none;
  }

  #users .inline-edit-row > td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .app-shell { grid-template-columns: 1fr; }
  .content-area { padding: 72px 12px 16px; }
  .mobile-menu-toggle {
    top: 10px;
    left: 10px;
  }
  .topbar { padding: 0; gap: 12px; }
  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
  }
  .top-actions > .profile-chip {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    justify-content: flex-start;
  }
  .top-actions > #themeToggle {
    grid-column: 2;
    grid-row: 1;
    min-width: 44px;
    white-space: nowrap;
  }
  .top-actions > .notification-menu {
    grid-column: 3;
    grid-row: 1;
  }
  .notification-dropdown {
    right: -2px;
  }
  .profile-console-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .profile-console-edit {
    grid-column: 1 / -1;
    width: 100%;
  }
  .profile-metric-grid,
  .compact-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-info-wide {
    grid-column: span 2;
  }
  .document-item {
    grid-template-columns: 1fr;
  }
  .template-task-row {
    grid-template-columns: 1fr;
  }
  .template-actions {
    justify-content: flex-start;
  }
  .document-actions {
    justify-content: flex-start;
  }
  .top-action-form,
  .top-action-form .ghost-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .card .card-title,
  .panel .panel-title,
  .table-card .table-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .schedule-toolbar,
  .approval-history-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .dashboard-schedule {
    overflow-x: visible;
  }
  .dashboard-schedule-card {
    border-radius: 22px;
  }
  .search-field { min-width: auto; }
  .page-title h1 { font-size: 1.4rem; }
  .status-chip, .badge-pill, .action-chip { width: fit-content; }
  .label, .badge, .small-label { font-size: 0.78rem; }
  .table-card table { font-size: 0.92rem; }
  .permissions-table {
    min-width: 360px;
  }
  .permissions-table th,
  .permissions-table td {
    padding: 10px;
  }
  .permissions-table th:nth-child(2),
  .permissions-table th:nth-child(3),
  .permissions-table td:nth-child(2),
  .permissions-table td:nth-child(3) {
    width: 82px;
  }
  .request-insight-grid {
    grid-template-columns: 1fr;
  }
  .org-department-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .org-node {
    margin-left: calc(var(--org-level, 0) * 10px);
  }
  .dictionary-grid { grid-template-columns: 1fr; }
  .dictionary-card textarea { min-height: 180px; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.modal-overlay {
  animation: fadeIn 0.2s ease !important;
}

.modal-content {
  animation: slideUp 0.3s ease !important;
}

.toast {
  animation: slideIn 0.3s ease !important;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.icon-button:active {
  transform: translateY(1px) !important;
}

@media (max-width: 680px) {
  .search-field { width: 100%; }
  .profile-chip { width: 100%; justify-content: space-between; }
  .top-actions > .profile-chip { justify-content: flex-start; }
  .dashboard-list-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-calendar,
  .dashboard-calendar-month {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .profile-metric-grid,
  .compact-info-grid {
    grid-template-columns: 1fr;
  }
  .compact-info-wide {
    grid-column: span 1;
  }
  .mobile-calendar-day {
    min-height: 86px;
    padding: 5px;
  }
  .mobile-calendar-event,
  .mobile-calendar-more {
    font-size: 0.62rem;
  }
}
