/*
 * WorkMate responsive UI layer
 * Keeps the existing feature logic intact while giving every workspace screen
 * the same light, fluid and mobile-friendly visual system.
 */

:root {
  --wm-page: #f4f6f8;
  --wm-surface: #ffffff;
  --wm-surface-soft: #f8fafc;
  --wm-surface-green: #f0fdf7;
  --wm-line: #e5e9ef;
  --wm-line-strong: #d7dee8;
  --wm-ink: #172033;
  --wm-muted: #64748b;
  --wm-faint: #94a3b8;
  --wm-green: #0b7a5d;
  --wm-green-strong: #075f49;
  --wm-green-soft: #dff8ed;
  --wm-danger: #e11d48;
  --wm-radius: 14px;
  --wm-radius-lg: 18px;
  --wm-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --wm-shadow-float: 0 18px 48px rgba(15, 23, 42, 0.16);
  --wm-gutter: clamp(16px, 2.25vw, 52px);
  --wm-gap: clamp(16px, 1.55vw, 30px);
  --wm-sidebar: clamp(220px, 13vw, 272px);
}

/* ---------- 업무 기간 및 이어지는 일정 ---------- */
.task-date-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.task-date-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.task-date-field > span {
  color: var(--wm-muted, #64748b);
  font-size: 0.7rem;
  font-weight: 750;
}

.task-date-field .form-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  color: var(--wm-ink, #0f172a);
  background: #fff;
  color-scheme: light;
}

.task-date-range-separator {
  padding-bottom: 13px;
  color: var(--wm-muted, #64748b);
  font-weight: 800;
}

.task-date-range-preview {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #c9eadc;
  border-radius: 9px;
  color: var(--wm-green, #087a5d);
  background: #effaf5;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.modal-task-schedule {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 5px 9px;
  border: 1px solid #c9eadc;
  border-radius: 999px;
  color: var(--wm-green, #087a5d);
  background: #effaf5;
  font-size: 0.74rem;
  font-weight: 800;
}

#calendar-view-content .task-pill.task-date-range {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding-top: 4px;
  padding-bottom: 5px;
  overflow: hidden;
  border-style: solid !important;
  border-color: color-mix(in srgb, var(--range-color) 48%, #fff) !important;
  background: color-mix(in srgb, var(--range-color) 15%, #fff) !important;
  font-weight: 750 !important;
}

#calendar-view-content .task-pill.task-date-range::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--range-color);
  opacity: 0.82;
}

#calendar-view-content .task-pill.task-date-range.range-start {
  border-left: 5px solid var(--range-color) !important;
  border-radius: 9px 3px 3px 9px;
}

#calendar-view-content .task-pill.task-date-range.range-middle {
  border-right-style: dashed !important;
  border-left-style: dashed !important;
  border-radius: 3px;
  background: color-mix(in srgb, var(--range-color) 11%, #fff) !important;
}

#calendar-view-content .task-pill.task-date-range.range-end {
  border-right: 5px solid var(--range-color) !important;
  border-radius: 3px 9px 9px 3px;
}

#calendar-view-content .pill-range-phase {
  flex: 0 0 auto;
  min-width: 29px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--range-color) 82%, #0f172a);
  font-size: 0.57rem;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  letter-spacing: -0.03em;
}

#calendar-view-content .range-middle .pill-range-phase {
  color: color-mix(in srgb, var(--range-color) 78%, #0f172a);
  background: color-mix(in srgb, var(--range-color) 17%, #fff);
}

#calendar-view-content .range-middle .pill-range-phase::after {
  content: ' →';
}

/* ---------- 쪽지 동기화 오류 ---------- */
#message-modal .message-sync-error {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 28px 18px;
  color: #475569;
  text-align: center;
}

#message-modal .message-sync-error strong {
  color: #be123c;
  font-size: 0.95rem;
}

#message-modal .message-sync-error span {
  font-size: 0.78rem;
  line-height: 1.5;
}

#message-modal .message-sync-error button {
  margin-top: 4px;
  padding: 8px 13px;
  border: 1px solid #b8decf;
  border-radius: 8px;
  color: var(--wm-green-strong);
  background: #fff;
  cursor: pointer;
  font-weight: 850;
}

/* ---------- 프로젝트 기간 범례와 연속 막대 ---------- */
#project-view-content .schedule-list-copy {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  padding-left: 13px;
  overflow: hidden;
  white-space: normal;
}

#project-view-content .vacation-my-list {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

#project-view-content .vacation-my-item {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#project-view-content .schedule-list-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#project-view-content .schedule-list-copy small {
  display: block;
  color: #7b8799;
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
  word-break: keep-all;
}

#project-view-content .schedule-list-copy::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--project-color, #6d28d9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--project-color, #6d28d9) 14%, transparent);
  transform: translateY(-50%);
}

#project-view-content .project-calendar-legend {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--wm-line);
  background: #fbfcff;
  scrollbar-width: thin;
}

#project-view-content .project-calendar-legend[hidden] {
  display: none;
}

#project-view-content .project-legend-chip {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--project-color) 24%, #dbe2ea);
  border-radius: 9px;
  color: #334155;
  background: color-mix(in srgb, var(--project-color) 6%, #fff);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#project-view-content .project-legend-chip:hover,
#project-view-content .project-legend-chip:focus-visible {
  border-color: color-mix(in srgb, var(--project-color) 58%, #fff);
  background: color-mix(in srgb, var(--project-color) 11%, #fff);
  outline: none;
  transform: translateY(-1px);
}

#project-view-content .project-legend-dot {
  width: 9px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 5px;
  background: var(--project-color);
}

#project-view-content .project-legend-copy {
  display: grid;
  gap: 1px;
}

#project-view-content .project-legend-copy strong {
  max-width: 190px;
  overflow: hidden;
  color: #172033;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.69rem;
}

#project-view-content .project-legend-copy small {
  color: #7b8799;
  font-size: 0.59rem;
  font-weight: 750;
  white-space: nowrap;
}

#project-view-content .project-span {
  height: 25px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-top-color: color-mix(in srgb, var(--vacation-color) 34%, #fff);
  border-bottom-color: color-mix(in srgb, var(--vacation-color) 34%, #fff);
  color: color-mix(in srgb, var(--vacation-color) 78%, #111827);
  background: var(--vacation-bg);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--vacation-color) 72%, transparent);
  line-height: 23px;
}

#project-view-content .project-span-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#project-view-content .project-span-continuation {
  background-image: repeating-linear-gradient(
    120deg,
    transparent 0,
    transparent 9px,
    color-mix(in srgb, var(--vacation-color) 8%, transparent) 9px,
    color-mix(in srgb, var(--vacation-color) 8%, transparent) 14px
  );
}

#project-view-content .project-span-continuation::before {
  content: '';
  width: 16px;
  height: 3px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--vacation-color);
  opacity: 0.38;
}

/* 알림 센터 종류별 수신 설정 */
.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-notif-settings,
.notif-header .btn-mark-all {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--wm-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.btn-notif-settings {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-notif-settings:hover,
.btn-notif-settings.active {
  border-color: #cce8df;
  background: #edf8f4;
  color: var(--wm-green, #0f8b68);
}

.btn-notif-settings:focus-visible,
.notif-header .btn-mark-all:focus-visible {
  outline: 3px solid rgba(15, 139, 104, 0.2);
  outline-offset: 1px;
}

.notif-list[hidden],
.notif-settings-panel[hidden],
.notif-header .btn-mark-all[hidden] {
  display: none !important;
}

.notif-settings-panel {
  max-height: 398px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--wm-surface, #fff);
  color: var(--wm-ink, #1e293b);
}

.notif-settings-intro {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px 13px;
  background: #f7faf9;
  border-bottom: 1px solid var(--wm-line, #e2e8f0);
}

.notif-settings-intro strong {
  color: var(--wm-ink, #1e293b);
  font-size: 0.88rem;
}

.notif-settings-intro span {
  color: var(--wm-muted, #64748b);
  font-size: 0.75rem;
  line-height: 1.45;
}

.notif-setting-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 63px;
  padding: 9px 18px;
  cursor: pointer;
  background: var(--wm-surface, #fff);
  border-bottom: 1px solid var(--wm-line, #e2e8f0);
  transition: background 0.18s ease;
}

.notif-setting-row:hover {
  background: #f8fbfa;
}

.notif-setting-master {
  min-height: 66px;
  background: #f1f9f6;
}

.notif-setting-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e7f5f0;
  color: var(--wm-green, #0f8b68);
  font-size: 0.95rem;
  font-weight: 800;
}

.notif-setting-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notif-setting-copy strong {
  color: var(--wm-ink, #1e293b);
  font-size: 0.84rem;
  line-height: 1.25;
}

.notif-setting-copy small {
  overflow: hidden;
  color: var(--wm-muted, #64748b);
  font-size: 0.71rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-setting-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.notif-setting-switch {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease;
}

.notif-setting-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.notif-setting-input:checked + .notif-setting-switch {
  background: var(--wm-green, #0f8b68);
}

.notif-setting-input:checked + .notif-setting-switch::after {
  transform: translateX(18px);
}

.notif-setting-input:indeterminate + .notif-setting-switch {
  background: #80b9a8;
}

.notif-setting-input:indeterminate + .notif-setting-switch::after {
  transform: translateX(9px);
}

.notif-setting-input:focus-visible + .notif-setting-switch {
  outline: 3px solid rgba(15, 139, 104, 0.24);
  outline-offset: 2px;
}

.notif-setting-divider {
  height: 7px;
  background: #f1f5f4;
  border-bottom: 1px solid var(--wm-line, #e2e8f0);
}

@media (max-width: 768px) {
  .notif-dropdown.mobile-notif-portal .notif-settings-panel {
    max-height: calc(min(72dvh, 560px) - 62px);
  }

  .notif-setting-row {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* ---------- 문서/업무 템플릿 관리 버튼 ---------- */
#dashboard-view .doc-table-btn.btn-rename,
#routine-view-content .btn-edit-routine {
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

#dashboard-view .doc-table-btn.btn-delete,
#routine-view-content .btn-delete-routine {
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}

#dashboard-view .doc-table-btn:disabled,
#routine-view-content .btn-edit-routine:disabled,
#routine-view-content .btn-delete-routine:disabled {
  cursor: wait !important;
  opacity: 0.55 !important;
}

/* ---------- 상세 팀 업무: 상위/하위 메뉴 계층 ---------- */
.admin-sidebar-group {
  display: grid;
  gap: 3px;
  border-radius: 10px;
}

.admin-sidebar-group-toggle > span {
  min-width: 0;
  flex: 1;
}

.admin-sidebar-group-chevron {
  margin-left: auto;
  transition: transform 0.18s ease;
}

.admin-sidebar-group.open .admin-sidebar-group-chevron {
  transform: rotate(180deg);
}

.admin-sidebar-subnav {
  display: none;
  gap: 3px;
  padding: 2px 0 5px 24px;
}

.admin-sidebar-group.open .admin-sidebar-subnav {
  display: grid;
}

.admin-sidebar-nav .admin-sidebar-subitem {
  min-height: 35px;
  gap: 8px;
  padding: 0 10px;
  color: rgba(236, 253, 245, 0.76);
  font-size: 0.73rem;
}

.admin-sidebar-subdot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.admin-sidebar-group.active-group > .admin-sidebar-group-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav .admin-sidebar-subitem.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 3px 0 #6ee7b7;
}

@media (max-width: 768px) {
  .admin-sidebar-group {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .admin-sidebar-group .admin-sidebar-group-toggle,
  .admin-sidebar-group .admin-sidebar-subitem {
    width: auto;
    min-width: max-content;
  }

  .admin-sidebar-subnav,
  .admin-sidebar-group.open .admin-sidebar-subnav {
    display: flex;
    gap: 4px;
    padding: 0;
  }

  .admin-sidebar-nav .admin-sidebar-subitem {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .admin-sidebar-nav .admin-sidebar-subitem.active {
    box-shadow: none;
  }
}

/* ---------- Shared workspace shell ---------- */

#dashboard-view {
  --bg-main: var(--wm-page);
  --bg-card: var(--wm-surface);
  --bg-card-hover: var(--wm-surface-soft);
  --bg-modal: var(--wm-surface);
  --border-color: var(--wm-line);
  --border-color-glow: rgba(11, 122, 93, 0.28);
  --primary: var(--wm-green);
  --primary-glow: rgba(11, 122, 93, 0.12);
  --secondary: #0f9f77;
  --text-main: var(--wm-ink);
  --text-muted: var(--wm-muted);
  --text-dark: #ffffff;
  --card-shadow: var(--wm-shadow);
  --blur-amount: none;
  color: var(--wm-ink);
  background: var(--wm-page);
}

#dashboard-view .dashboard-wrapper {
  min-width: 0;
  background: var(--wm-page);
}

.admin-dashboard-sidebar[hidden] {
  display: none !important;
}

[data-admin-only="true"][hidden] {
  display: none !important;
}

[data-dashboard-admin="true"][hidden] {
  display: none !important;
}

body.admin-workspace-active #dashboard-view.active {
  display: block;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.admin-workspace-active #dashboard-view.active .dashboard-wrapper {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--wm-sidebar) minmax(0, 1fr);
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
}

body.admin-workspace-active .admin-dashboard-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  width: var(--wm-sidebar);
  min-width: var(--wm-sidebar);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
  color: #fff;
  background: linear-gradient(180deg, #0d624d 0%, #0a5946 100%);
  box-shadow: 3px 0 12px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  box-sizing: border-box;
}

body.admin-workspace-active .dash-header {
  grid-column: 2;
  grid-row: 1;
  display: block !important;
  height: 70px;
  min-width: 0;
  border-bottom: 1px solid var(--wm-line);
  background: rgba(255, 255, 255, 0.98);
}

.admin-workspace-heading {
  display: none;
}

body.admin-workspace-active .dash-header .header-container {
  height: 70px !important;
  max-width: none !important;
  padding: 0 var(--wm-gutter) !important;
}

body.admin-workspace-active .dash-header .header-logo,
body.admin-workspace-active .dash-header .main-tab-nav {
  display: none !important;
}

body.admin-workspace-active .admin-workspace-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

body.admin-workspace-active .admin-workspace-heading span {
  color: var(--wm-green);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

body.admin-workspace-active .admin-workspace-heading strong {
  overflow: hidden;
  color: var(--wm-ink);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-workspace-active .dash-content,
body.admin-workspace-active .menu-view,
body.admin-workspace-active .admin-dashboard-view {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 100% !important;
  min-height: 0;
}

body.admin-workspace-active .menu-view {
  overflow: hidden !important;
}

body.admin-workspace-active .admin-dashboard-main {
  width: 100%;
}

#dashboard-view .dash-header {
  position: relative;
  z-index: 80;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--wm-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#dashboard-view .header-container {
  width: 100% !important;
  max-width: none !important;
  height: 68px !important;
  padding: 0 var(--wm-gutter) !important;
}

#dashboard-view .header-logo span {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

#dashboard-view .header-right {
  gap: 8px;
}

#dashboard-view #btn-msg,
#dashboard-view .btn-notif,
#dashboard-view #btn-profile {
  border-color: var(--wm-line) !important;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
  box-shadow: none !important;
}

#dashboard-view #btn-msg:hover,
#dashboard-view .btn-notif:hover,
#dashboard-view #btn-profile:hover {
  border-color: #badfce !important;
  background: var(--wm-surface-green) !important;
}

#dashboard-view .user-avatar {
  color: #fff;
  background: linear-gradient(135deg, #0f9f77, #075f49);
  box-shadow: none;
}

#dashboard-view .profile-dropdown,
#dashboard-view .notif-dropdown {
  color: var(--wm-ink);
  border-color: var(--wm-line) !important;
  background: var(--wm-surface) !important;
  box-shadow: var(--wm-shadow-float) !important;
  backdrop-filter: none !important;
}

#dashboard-view #profile-dropdown #btn-mypage,
#dashboard-view #profile-dropdown #btn-logout,
#dashboard-view #profile-dropdown #btn-withdraw {
  min-height: 42px;
  opacity: 1 !important;
  border: 1px solid var(--wm-line) !important;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
  font-weight: 750 !important;
  cursor: pointer;
}

#dashboard-view #profile-dropdown #btn-mypage:hover {
  border-color: #a9ddc7 !important;
  color: var(--wm-green) !important;
  background: var(--wm-green-soft) !important;
}

#dashboard-view #profile-dropdown #btn-logout,
#dashboard-view #profile-dropdown #btn-withdraw {
  border-color: #fecaca !important;
  color: #b91c1c !important;
  background: #fff1f2 !important;
}

#dashboard-view #profile-dropdown #btn-logout:hover,
#dashboard-view #profile-dropdown #btn-withdraw:hover {
  border-color: #fca5a5 !important;
  color: #991b1b !important;
  background: #ffe4e6 !important;
}

#dashboard-view .main-tab-nav {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px var(--wm-gutter);
  border-top: 1px solid #f1f4f7;
  background: #fff;
}

#dashboard-view .main-tab-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--wm-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

#dashboard-view .main-tab-btn:hover {
  color: var(--wm-green);
  background: var(--wm-surface-green);
}

#dashboard-view .main-tab-btn.active {
  color: #fff;
  border-color: var(--wm-green);
  background: var(--wm-green);
  box-shadow: 0 4px 12px rgba(11, 122, 93, 0.16);
}

#dashboard-view .btn-primary {
  min-height: 42px;
  border: 1px solid var(--wm-green);
  border-radius: 10px;
  color: #fff;
  background: var(--wm-green);
  box-shadow: none;
}

#dashboard-view .btn-primary:hover {
  border-color: var(--wm-green-strong);
  background: var(--wm-green-strong);
  box-shadow: 0 7px 18px rgba(11, 122, 93, 0.18);
  transform: translateY(-1px);
}

#dashboard-view .form-label {
  color: #526075;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

#dashboard-view .form-input,
#dashboard-view .form-select,
#dashboard-view .form-textarea,
#dashboard-view textarea {
  border: 1px solid var(--wm-line-strong) !important;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
  box-shadow: none !important;
}

#dashboard-view .form-input:focus,
#dashboard-view .form-select:focus,
#dashboard-view .form-textarea:focus,
#dashboard-view textarea:focus {
  border-color: #58b99a !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(11, 122, 93, 0.1) !important;
}

#dashboard-view select option {
  color: var(--wm-ink);
  background: #fff;
}

/* ---------- Calendar and task composer ---------- */

#dashboard-view .dash-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--wm-gutter);
  overflow: auto;
  background: var(--wm-page);
}

#calendar-view-content.calendar-workspace {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: clamp(290px, 20vw, 372px) minmax(0, 1fr);
  align-items: start;
  gap: var(--wm-gap);
}

.mobile-task-panel-toggle {
  display: none;
}

#calendar-view-content .task-compose-rail {
  min-width: 0;
  gap: 16px;
}

@media (min-width: 1181px) {
  #calendar-view-content .task-compose-rail {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100dvh - 70px - var(--wm-gutter) - var(--wm-gutter));
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  #calendar-view-content .task-compose-rail::-webkit-scrollbar {
    width: 5px;
  }

  #calendar-view-content .task-compose-rail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
  }
}

#calendar-view-content .card-panel {
  padding: clamp(18px, 1.4vw, 24px);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius-lg);
  color: var(--wm-ink);
  background: #fff !important;
  box-shadow: var(--wm-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#calendar-view-content .panel-title {
  margin-bottom: 18px;
  color: var(--wm-ink);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: 1rem;
  font-weight: 800;
}

#calendar-view-content .panel-title svg {
  color: var(--wm-green);
}

#calendar-view-content .form-group {
  margin-bottom: 16px;
}

#calendar-view-content .calendar-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  container: wm-calendar / inline-size;
}

#calendar-view-content .calendar-mode-banner {
  min-height: 58px;
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 11px 16px;
  border: 1px solid #bce8d5;
  border-radius: 13px;
  color: var(--wm-ink);
  background: linear-gradient(135deg, #effcf6 0%, #fff 78%);
  box-shadow: var(--wm-shadow);
  box-sizing: border-box;
}

#calendar-view-content .calendar-mode-banner > span {
  color: var(--wm-green);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

#calendar-view-content .calendar-mode-banner > strong {
  font-size: 0.9rem;
  font-weight: 850;
}

#calendar-view-content .calendar-mode-banner > small {
  overflow: hidden;
  color: var(--wm-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#calendar-view-content.calendar-mode-team .calendar-mode-banner {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #f8faff 55%, #fff 100%);
}

#calendar-view-content.calendar-mode-team .calendar-mode-banner > span {
  color: #4f46e5;
}

#calendar-view-content.calendar-mode-team .calendar-tabs {
  border-color: #c7d2fe;
  background: #eef2ff;
}

#calendar-view-content.calendar-mode-team .calendar-tab.active {
  color: #fff;
  background: #4f46e5;
}

#calendar-view-content.calendar-mode-team .calendar-goals-banner {
  border-color: #d8dafe;
  background: linear-gradient(135deg, #f3f4ff 0%, #fff 78%);
}

#calendar-view-content.calendar-mode-team .calendar-header {
  box-shadow: inset 4px 0 #6366f1, var(--wm-shadow);
}

#calendar-view-content.calendar-mode-team .calendar-grid-card {
  border-color: #c7d2fe !important;
  background: #f8faff !important;
}

#calendar-view-content.calendar-mode-team .calendar-day-cell {
  border-color: #e4e7ff !important;
  background: #fcfcff !important;
}

#calendar-view-content.calendar-mode-team .calendar-day-cell.today {
  border-color: #818cf8 !important;
  background: #eef2ff !important;
}

#calendar-view-content.calendar-mode-team .calendar-day-cell.today .calendar-day-number {
  background: #4f46e5 !important;
}

#calendar-view-content.calendar-mode-team .task-compose-rail > .card-panel:first-child {
  border-top: 4px solid #6366f1;
}

#calendar-view-content.calendar-mode-team .task-compose-rail > .card-panel:first-child .panel-title svg {
  color: #4f46e5;
}

#calendar-view-content.calendar-mode-team #btn-task-submit {
  border-color: #4f46e5 !important;
  background: #4f46e5 !important;
}

#calendar-view-content.calendar-mode-team .btn-quick-write {
  color: #4f46e5;
  background: #eef2ff;
}

#calendar-view-content #team-manage-box {
  padding: 13px !important;
  border: 1px solid #d8dafe !important;
  border-radius: 12px !important;
  color: var(--wm-ink) !important;
  background: #f8faff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#calendar-view-content #team-manage-box .team-manage-title {
  margin-bottom: 11px;
  color: #3730a3 !important;
  font-size: 0.82rem;
  font-weight: 850;
}

#calendar-view-content #team-manage-box .team-manage-title svg {
  color: #4f46e5;
}

#calendar-view-content #team-manage-box .team-member-list {
  gap: 7px;
  margin-bottom: 10px;
}

#calendar-view-content #team-manage-box .team-member-item {
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  color: var(--wm-ink);
  background: #fff;
  box-sizing: border-box;
}

#calendar-view-content #team-manage-box .team-member-item:hover {
  border-color: #c7d2fe;
  background: #f5f7ff;
}

#calendar-view-content #team-manage-box .team-member-item[style*="opacity"] {
  opacity: 0.78 !important;
}

#calendar-view-content #team-manage-box .team-member-info {
  min-width: 0;
}

#calendar-view-content #team-manage-box .team-member-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14) !important;
}

#calendar-view-content #team-manage-box .team-member-name {
  overflow: hidden;
  max-width: 145px;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#calendar-view-content #team-manage-box .team-member-badge {
  min-width: 34px;
  padding: 3px 6px;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  color: #64748b !important;
  background: #f8fafc;
  text-align: center;
}

#calendar-view-content #team-manage-box .team-member-badge.leader {
  color: #047857 !important;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

#calendar-view-content #team-manage-box .team-member-badge.pending {
  color: #a16207 !important;
  border-color: #fde68a;
  background: #fffbeb;
}

#calendar-view-content #team-manage-box .btn-team-action.danger {
  min-height: 36px;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  background: #fff7f7 !important;
}

#calendar-view-content #team-manage-box .btn-team-action.danger:hover {
  color: #991b1b !important;
  border-color: #fca5a5 !important;
  background: #fee2e2 !important;
}

#calendar-view-content .calendar-tabs {
  min-height: 45px;
  display: inline-flex;
  align-self: flex-start;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--wm-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--wm-shadow);
}

#calendar-view-content .calendar-tab {
  min-height: 35px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--wm-muted);
  font-size: 0.79rem;
  font-weight: 750;
}

#calendar-view-content .calendar-tab.active {
  color: #fff;
  background: var(--wm-green);
  box-shadow: none;
}

#calendar-view-content .calendar-goals-banner {
  gap: 12px;
  padding: clamp(16px, 1.4vw, 22px);
  border: 1px solid #bce8d5;
  border-radius: var(--wm-radius);
  color: var(--wm-ink);
  background: linear-gradient(135deg, #effcf6 0%, #ffffff 78%);
  box-shadow: var(--wm-shadow);
}

#calendar-view-content .calendar-goals-heading h2,
#calendar-view-content .calendar-goal-chip strong {
  color: var(--wm-ink);
}

#calendar-view-content .calendar-goals-add-btn {
  min-height: 36px;
  color: var(--wm-green);
  border-color: #a9ddc7;
  background: #fff;
}

#calendar-view-content .calendar-goals-add-btn:hover {
  color: #fff;
  border-color: var(--wm-green);
  background: var(--wm-green);
}

#calendar-view-content .calendar-header {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  background: #fff;
  box-shadow: var(--wm-shadow);
}

#calendar-view-content .calendar-nav {
  min-width: max-content;
}

#calendar-view-content .current-month {
  color: var(--wm-ink);
  font-size: clamp(1rem, 1.2vw, 1.25rem);
}

#calendar-view-content .btn-nav {
  width: 36px;
  height: 36px;
  border: 1px solid var(--wm-line);
  border-radius: 9px;
  color: #334155;
  background: var(--wm-surface-soft);
}

#calendar-view-content .btn-nav:hover {
  color: var(--wm-green);
  border-color: #a9ddc7;
  background: var(--wm-surface-green);
}

#calendar-view-content .calendar-filter {
  color: var(--wm-muted);
}

#calendar-view-content .calendar-filter .form-select {
  min-height: 36px;
  width: auto !important;
  padding: 6px 30px 6px 10px !important;
  border-radius: 8px;
  font-size: 0.78rem !important;
}

#calendar-view-content .calendar-grid-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius-lg);
  background: #fff;
  box-shadow: var(--wm-shadow);
}

#calendar-view-content .calendar-weekdays {
  min-height: 38px;
  color: var(--wm-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

#calendar-view-content .calendar-days {
  grid-auto-rows: clamp(108px, 10cqi, 182px);
  gap: 7px;
  min-height: 0 !important;
}

#calendar-view-content .calendar-day-cell {
  height: auto !important;
  min-height: 0 !important;
  padding: 8px !important;
  border: 1px solid #e8edf2 !important;
  border-radius: 10px !important;
  color: var(--wm-ink);
  background: #fbfcfd !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#calendar-view-content .calendar-day-cell:hover {
  border-color: #a9ddc7 !important;
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
  transform: none;
}

#calendar-view-content .calendar-day-cell.today {
  border-color: #58b99a !important;
  background: #f1fcf7 !important;
  box-shadow: inset 0 0 0 1px rgba(11, 122, 93, 0.08);
}

#calendar-view-content .calendar-day-cell.other-month {
  opacity: 0.48;
}

#calendar-view-content .calendar-day-number {
  color: #475569;
  font-weight: 750;
}

#calendar-view-content .calendar-day-cell.today .calendar-day-number {
  color: #fff !important;
  background: var(--wm-green) !important;
}

#calendar-view-content .day-tasks-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
  overflow: hidden;
}

#calendar-view-content .task-pill {
  min-width: 0;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

#calendar-view-content .task-pill[hidden],
#calendar-view-content .more-tasks-count[hidden] {
  display: none !important;
}

#calendar-view-content .more-tasks-count {
  flex: 0 0 auto;
  align-self: flex-end;
  min-width: 30px;
  min-height: 18px;
  margin: 0;
  padding: 1px 7px;
  border: 0;
  border-radius: 6px;
  color: var(--wm-green);
  background: var(--wm-green-soft);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

#calendar-view-content .more-tasks-count:hover,
#calendar-view-content .more-tasks-count:focus-visible {
  color: #fff;
  background: var(--wm-green);
  outline: none;
}

#calendar-view-content .task-pill.instruction-task {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 5px;
  color: color-mix(in srgb, var(--instruction-color) 76%, #0f172a) !important;
  background: color-mix(in srgb, var(--instruction-color) 22%, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--instruction-color) 62%, #fff) !important;
  border-left: 4px solid color-mix(in srgb, var(--instruction-color) 76%, #0f172a) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--instruction-color) 24%, transparent) !important;
}

#calendar-view-content .task-pill.instruction-task.confirmed-instruction {
  background: color-mix(in srgb, var(--instruction-color) 16%, #fff) !important;
}

#calendar-view-content .pill-instruction-badge {
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  background: color-mix(in srgb, var(--instruction-color) 76%, #0f172a);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

#calendar-view-content .instruction-task .pill-progress-badge {
  flex: 0 0 auto;
  margin-right: 0 !important;
  color: color-mix(in srgb, var(--instruction-color) 76%, #0f172a);
  background: color-mix(in srgb, var(--instruction-color) 15%, transparent);
  font-size: 0.64rem !important;
  opacity: 1 !important;
}

#calendar-view-content .pill-task-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#calendar-view-content .btn-quick-write {
  color: var(--wm-green);
  background: var(--wm-green-soft);
}

/* ---------- Menu, documents, routines and goals ---------- */

#dashboard-view .menu-view {
  min-width: 0;
  justify-content: stretch;
  background: var(--wm-page);
}

#dashboard-view .menu-inner-wrap {
  width: 100%;
  max-width: none;
  gap: var(--wm-gap);
  padding: var(--wm-gutter);
  overflow: hidden;
}

body.admin-workspace-active #dashboard-view .menu-inner-wrap {
  gap: 0;
}

body.admin-workspace-active #dashboard-view .doc-sidebar {
  display: none !important;
}

#dashboard-view .doc-sidebar {
  width: clamp(210px, 15vw, 260px);
  min-width: clamp(210px, 15vw, 260px);
  height: 100%;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius-lg);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: var(--wm-shadow);
}

#dashboard-view .doc-sidebar-header {
  min-height: 42px;
  padding: 0 11px;
  border-radius: 9px;
  color: #334155;
  font-size: 0.84rem;
}

#dashboard-view .doc-sidebar-header:hover,
#dashboard-view .doc-sidebar-header.active {
  color: var(--wm-green) !important;
  border-color: #c8eadb !important;
  background: var(--wm-surface-green) !important;
}

#dashboard-view .doc-nav {
  gap: 3px;
  padding-left: 5px;
}

#dashboard-view .doc-nav-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--wm-muted);
  font-size: 0.8rem;
}

#dashboard-view .doc-nav-btn:hover {
  color: var(--wm-ink);
  border-color: var(--wm-line);
  background: var(--wm-surface-soft);
}

#dashboard-view .doc-nav-btn.active {
  color: var(--wm-green);
  border-color: #bce8d5;
  background: var(--wm-green-soft);
}

#dashboard-view .doc-main {
  container: wm-doc-main / inline-size;
  min-width: 0;
  height: 100%;
  padding: clamp(20px, 2vw, 34px);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius-lg);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: var(--wm-shadow);
}

#dashboard-view .member-management-view {
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  gap: 22px;
}

#dashboard-view .member-management-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--wm-line);
}

#dashboard-view .member-management-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--wm-green);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

#dashboard-view .member-management-security {
  align-self: flex-start;
  padding: 6px 10px;
  border: 1px solid #bce8d5;
  border-radius: 999px;
  color: var(--wm-green);
  background: var(--wm-green-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

#dashboard-view .member-management-card-slot {
  width: 100%;
}

#dashboard-view .member-management-card-slot #admin-employee-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  background: var(--wm-surface-soft);
  box-shadow: none;
}

#dashboard-view .member-management-card-slot .employee-list-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  max-height: none;
  overflow: visible;
}

#dashboard-view .member-management-card-slot .employee-row {
  min-width: 0;
  border-color: var(--wm-line);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  outline: none;
}

#dashboard-view .member-management-card-slot .employee-row:hover,
#dashboard-view .member-management-card-slot .employee-row:focus-visible,
#dashboard-view .member-management-card-slot .employee-row.is-selected {
  transform: translateY(-1px) !important;
  border-color: #72cfaa !important;
  background: #f3fbf7;
  box-shadow: 0 0 0 2px rgba(15, 157, 112, 0.08);
}

#dashboard-view .member-management-card-slot .employee-row-left {
  min-width: 0;
}

#dashboard-view .member-management-card-slot .employee-row-left > div {
  min-width: 0;
}

#dashboard-view .member-management-card-slot .employee-row-name,
#dashboard-view .member-management-card-slot .employee-row-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-view .employee-detail-empty {
  min-height: clamp(240px, 35vh, 390px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
  border: 1px dashed #bcd8cc;
  border-radius: var(--wm-radius);
  color: var(--wm-muted);
  background: linear-gradient(145deg, #fbfdfc 0%, #f5faf8 100%);
  text-align: center;
}

#dashboard-view .employee-detail-empty[hidden],
#dashboard-view .employee-detail-panel[hidden] {
  display: none !important;
}

#dashboard-view .employee-detail-empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid #bce8d5;
  border-radius: 15px;
  color: var(--wm-green);
  background: var(--wm-green-soft);
}

#dashboard-view .employee-detail-empty strong {
  color: #334155;
  font-size: 0.96rem;
}

#dashboard-view .employee-detail-empty span {
  max-width: 520px;
  font-size: 0.8rem;
  line-height: 1.6;
}

#dashboard-view .employee-detail-panel {
  min-width: 0;
  padding: clamp(20px, 2vw, 30px);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

#dashboard-view .employee-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--wm-line);
}

#dashboard-view .employee-detail-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#dashboard-view .employee-detail-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #0f9d70, #087e5a);
  box-shadow: 0 8px 18px rgba(15, 157, 112, 0.2);
}

#dashboard-view .employee-detail-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--wm-green);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

#dashboard-view .employee-detail-title {
  margin: 0;
  color: var(--wm-ink);
  font-size: 1.1rem;
  font-weight: 850;
}

#dashboard-view .employee-detail-close {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--wm-line);
  border-radius: 9px;
  color: var(--wm-muted);
  background: var(--wm-surface-soft);
  font-size: 0.73rem;
  font-weight: 750;
  cursor: pointer;
}

#dashboard-view .employee-detail-close:hover {
  color: var(--wm-ink);
  border-color: var(--wm-line-strong);
  background: #fff;
}

#dashboard-view .employee-detail-close span {
  font-size: 1.1rem;
  line-height: 1;
}

#dashboard-view .employee-detail-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(400px, 1.4fr);
  gap: clamp(18px, 2vw, 28px);
}

#dashboard-view .employee-detail-account,
#dashboard-view .employee-detail-work {
  min-width: 0;
}

#dashboard-view .employee-detail-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #233047;
  font-size: 0.9rem;
  font-weight: 820;
}

#dashboard-view .employee-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--wm-line);
  border-radius: 12px;
  background: var(--wm-line);
}

#dashboard-view .employee-detail-grid > div {
  min-width: 0;
  padding: 13px 14px;
  background: var(--wm-surface-soft);
}

#dashboard-view .employee-detail-grid dt {
  margin-bottom: 5px;
  color: var(--wm-muted);
  font-size: 0.69rem;
  font-weight: 650;
}

#dashboard-view .employee-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--wm-ink);
  font-size: 0.82rem;
  font-weight: 780;
}

#dashboard-view .employee-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#dashboard-view .employee-detail-actions > button {
  width: auto;
  min-height: 40px;
  flex: 1 1 145px !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
}

#dashboard-view .employee-detail-actions > .btn-primary {
  border: 1px solid #a9ddc7 !important;
  color: #087e5a !important;
  background: #effaf5 !important;
}

#dashboard-view .employee-detail-actions > .btn-primary:hover {
  border-color: #72cfaa !important;
  background: #e3f6ee !important;
}

#dashboard-view .employee-detail-actions > .btn-primary.is-revoke {
  border-color: #fed7aa !important;
  color: #b45309 !important;
  background: #fff7ed !important;
}

#dashboard-view .employee-detail-actions > .btn-primary.is-revoke:hover {
  border-color: #fdba74 !important;
  background: #ffedd5 !important;
}

#dashboard-view .employee-detail-actions > .member-danger-button,
#dashboard-view .employee-detail-actions > .member-restore-button {
  flex-basis: 100% !important;
}

#dashboard-view .employee-detail-work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#dashboard-view .employee-detail-work-header .employee-detail-section-title {
  margin-bottom: 0;
}

#dashboard-view .employee-detail-date-tools,
#dashboard-view .employee-detail-date-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

#dashboard-view .employee-detail-date-nav {
  padding: 4px;
  border: 1px solid var(--wm-line);
  border-radius: 10px;
  background: var(--wm-surface-soft);
}

#dashboard-view .employee-detail-date-nav button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--wm-line);
  border-radius: 7px;
  color: #334155;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

#dashboard-view .employee-detail-date-nav button:hover {
  border-color: #a9ddc7;
  color: var(--wm-green);
  background: var(--wm-green-soft);
}

#dashboard-view .employee-detail-date-nav input {
  width: 132px;
  min-height: 30px;
  padding: 0 5px;
  border: 0;
  outline: none;
  color: var(--wm-ink);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 750;
  color-scheme: light;
}

#dashboard-view .employee-detail-task-count {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--wm-green);
  background: var(--wm-green-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

#dashboard-view .employee-detail-task-list {
  max-height: 360px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-right: 4px;
  overflow-y: auto;
}

#dashboard-view .employee-detail-task-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--wm-line);
  border-radius: 11px;
  background: var(--wm-surface-soft);
}

#dashboard-view .employee-detail-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--wm-muted);
  font-size: 0.66rem;
}

#dashboard-view .employee-detail-task-date {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  color: #087e5a;
  background: #dff5eb;
  font-weight: 750;
}

#dashboard-view .employee-detail-task-item h5 {
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--wm-ink);
  font-size: 0.82rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-view .employee-detail-task-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--wm-muted);
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#dashboard-view .employee-detail-task-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  border: 1px dashed var(--wm-line-strong);
  border-radius: 11px;
  color: var(--wm-muted);
  background: var(--wm-surface-soft);
  font-size: 0.8rem;
}

#dashboard-view .member-danger-button {
  min-height: 38px;
  flex: 1 1 100%;
  padding: 8px 14px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

#dashboard-view .member-danger-button:hover {
  border-color: #fca5a5;
  background: #ffe4e6;
}

#dashboard-view .member-danger-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

#dashboard-view .employee-row-suspended {
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

#dashboard-view .employee-offboarding-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

#dashboard-view .member-restore-button {
  min-height: 40px;
  flex: 1 1 100%;
  padding: 9px 14px;
  border: 1px solid #86efac;
  border-radius: 9px;
  color: #166534;
  background: #ecfdf5;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

#dashboard-view .member-restore-button:hover {
  border-color: #4ade80;
  background: #dcfce7;
}

#dashboard-view .member-restore-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

#dashboard-view .doc-view,
#dashboard-view #routine-view-content,
#dashboard-view #weekly-report-view-content {
  height: auto !important;
  min-height: 0;
  overflow: visible !important;
}

#dashboard-view .doc-panel-header {
  border-color: var(--wm-line);
}

#dashboard-view .doc-panel-title,
#dashboard-view .goals-page-header h2,
#dashboard-view .goals-section h3,
#dashboard-view .weekly-goal-card-title {
  color: var(--wm-ink);
}

#dashboard-view .doc-dropzone {
  border-color: #afdcca;
  background: #f6fcf9;
}

#dashboard-view .doc-dropzone:hover,
#dashboard-view .doc-dropzone.dragover {
  border-color: var(--wm-green);
  background: #effaf5;
}

#dashboard-view .doc-file-container {
  border-color: var(--wm-line);
  background: #fff;
  box-shadow: none;
}

#dashboard-view .doc-list-table th {
  color: #526075;
  background: var(--wm-surface-soft);
}

#dashboard-view .doc-list-table td,
#dashboard-view .doc-list-table th {
  border-color: var(--wm-line);
}

#dashboard-view .doc-list-table tbody tr:hover {
  background: #f8fbfa;
}

#dashboard-view .doc-table-btn,
#dashboard-view .doc-sort-btn,
#dashboard-view .doc-sort-dir-btn {
  border-color: var(--wm-line) !important;
  color: #475569 !important;
  background: var(--wm-surface-soft) !important;
}

#dashboard-view .goals-page-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--wm-line);
}

#dashboard-view .goals-month-control {
  border-color: var(--wm-line);
  background: var(--wm-surface-soft);
}

#dashboard-view .goals-month-control input,
#dashboard-view .goals-month-control button {
  color: var(--wm-ink);
}

#dashboard-view .goals-section {
  padding: clamp(18px, 1.8vw, 26px);
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

#dashboard-view .goal-add-form input {
  min-height: 42px;
  color: var(--wm-ink);
  border-color: var(--wm-line-strong);
  background: var(--wm-surface-soft);
}

#dashboard-view .goal-add-form button {
  color: #fff;
  border-color: var(--wm-green);
  background: var(--wm-green);
}

#dashboard-view .goal-item,
#dashboard-view .weekly-goal-card {
  border-color: var(--wm-line);
  background: var(--wm-surface-soft);
}

#dashboard-view .goal-item:hover,
#dashboard-view .weekly-goal-card.current-week {
  border-color: #a9ddc7;
  background: #f6fcf9;
}

#dashboard-view .weekly-goals-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

#dashboard-view .goals-progress-track {
  background: #e8edf2;
}

#dashboard-view #routine-view-content .card-panel,
#dashboard-view #weekly-report-view-content .card-panel,
#dashboard-view #routine-manage-section .card-panel {
  border-color: var(--wm-line) !important;
  color: var(--wm-ink);
  background: #fff !important;
  box-shadow: none;
}

#dashboard-view .routine-item-input,
#dashboard-view .routine-direct-item-input,
#dashboard-view .weekly-plan-title-field,
#dashboard-view .weekly-plan-desc-field {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
}

#dashboard-view .weekly-task-item,
#dashboard-view .weekly-future-card,
#dashboard-view .weekly-future-task-item {
  border-color: var(--wm-line) !important;
  color: var(--wm-ink);
  background: var(--wm-surface-soft) !important;
}

#dashboard-view #weekly-report-date-trigger,
#dashboard-view #weekly-report-mini-cal-popup,
#dashboard-view #btn-weekly-report-today {
  border-color: var(--wm-line) !important;
  color: var(--wm-ink) !important;
  background: #fff !important;
  box-shadow: var(--wm-shadow) !important;
}

#routine-view-content .routine-mini-count-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: flex;
  width: 13px;
  height: 13px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #047857;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  box-sizing: border-box;
}

#routine-view-content .routine-mini-count-badge.is-selected {
  color: #047857;
  background: #fff;
  border-color: #d1fae5;
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.22), 0 1px 4px rgba(15, 23, 42, 0.25);
}

/* ---------- Fluid administrator dashboard ---------- */

body.admin-dashboard-active {
  background: var(--wm-page);
  background-image: none;
}

body.admin-workspace-active .admin-dashboard-sidebar {
  width: var(--wm-sidebar);
  min-width: var(--wm-sidebar);
  flex: 0 0 var(--wm-sidebar);
}

body.admin-dashboard-active .admin-dashboard-main {
  min-width: 0;
  container: wm-admin-main / inline-size;
}

body.admin-dashboard-active .admin-dashboard-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 2.2vw, 48px) var(--wm-gutter) clamp(42px, 4vw, 72px);
}

body.admin-dashboard-active .admin-dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.05vw, 20px);
}

body.admin-dashboard-active .admin-dashboard-summary,
body.admin-dashboard-active .admin-dashboard-kpi,
body.admin-dashboard-active .admin-dashboard-approvals,
body.admin-dashboard-active .admin-dashboard-upcoming,
body.admin-dashboard-active .admin-dashboard-workload,
body.admin-dashboard-active .admin-dashboard-teams {
  grid-column: span 12;
  height: auto;
  min-height: 208px;
}

body.admin-dashboard-active .admin-dashboard-summary,
body.admin-dashboard-active .admin-dashboard-kpi {
  min-height: 176px;
}

body.admin-dashboard-active .admin-dashboard-approvals,
body.admin-dashboard-active .admin-dashboard-upcoming {
  min-height: 252px;
}

body.admin-dashboard-active .admin-dashboard-workload,
body.admin-dashboard-active .admin-dashboard-teams {
  min-height: 292px;
}

body.admin-dashboard-active .admin-dashboard-card {
  padding: clamp(17px, 1.25vw, 24px);
}

body.admin-dashboard-active .admin-dashboard-approvals,
body.admin-dashboard-active .admin-dashboard-upcoming,
body.admin-dashboard-active .admin-dashboard-vacations,
body.admin-dashboard-active .admin-dashboard-projects,
body.admin-dashboard-active .admin-dashboard-workload,
body.admin-dashboard-active .admin-dashboard-teams {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

body.admin-dashboard-active .admin-dashboard-card-head,
body.admin-dashboard-active .admin-dashboard-task-tabs {
  flex: 0 0 auto;
}

body.admin-dashboard-active .admin-dashboard-list,
body.admin-dashboard-active .admin-workload-list,
body.admin-dashboard-active .admin-upcoming-list {
  min-height: 0;
  max-height: clamp(160px, 28vh, 280px) !important;
  flex: 1 1 auto;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  -webkit-overflow-scrolling: touch;
}

body.admin-dashboard-active .admin-dashboard-list::-webkit-scrollbar,
body.admin-dashboard-active .admin-workload-list::-webkit-scrollbar,
body.admin-dashboard-active .admin-upcoming-list::-webkit-scrollbar {
  width: 7px;
}

body.admin-dashboard-active .admin-dashboard-list::-webkit-scrollbar-thumb,
body.admin-dashboard-active .admin-workload-list::-webkit-scrollbar-thumb,
body.admin-dashboard-active .admin-upcoming-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #94a3b8;
  background-clip: padding-box;
}

body.admin-dashboard-active .admin-dashboard-list::-webkit-scrollbar-track,
body.admin-dashboard-active .admin-workload-list::-webkit-scrollbar-track,
body.admin-dashboard-active .admin-upcoming-list::-webkit-scrollbar-track {
  background: transparent;
}

body.admin-dashboard-active .admin-dashboard-task-tabs {
  display: flex;
  gap: 4px;
  margin: -3px 0 11px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f1f5f9;
}

body.admin-dashboard-active .admin-dashboard-task-tabs button {
  min-height: 29px;
  flex: 1 1 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
}

body.admin-dashboard-active .admin-dashboard-task-tabs button.active {
  color: #065f46;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

body.admin-dashboard-active .admin-dashboard-task-tabs button span {
  display: inline-flex;
  min-width: 17px;
  height: 17px;
  margin-left: 3px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 0.58rem;
}

body.admin-dashboard-active .admin-dashboard-task-panel[hidden] {
  display: none !important;
}

body.admin-dashboard-active .admin-upcoming-row.is-overdue .admin-upcoming-date {
  color: #b91c1c;
}

body.admin-dashboard-active .admin-upcoming-row.is-overdue .admin-upcoming-progress {
  color: #b91c1c;
  background: #fef2f2;
}

body.admin-dashboard-active .admin-team-name-button {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #172033;
  background: transparent;
  cursor: pointer;
  font-size: 0.71rem;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-dashboard-active .admin-team-name-button:hover,
body.admin-dashboard-active .admin-team-name-button:focus-visible {
  color: #047857;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

body.admin-dashboard-active .admin-team-count-button {
  border: 0;
  cursor: pointer;
  font-weight: 850;
}

body.admin-dashboard-active .admin-team-count-button:hover,
body.admin-dashboard-active .admin-team-count-button:focus-visible {
  color: #fff;
  background: #059669;
  outline: none;
}

#dashboard-team-tasks-modal .dashboard-team-tasks-modal-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 32px));
  color: var(--wm-ink);
  background: #fff;
}

#dashboard-team-tasks-modal .dashboard-team-tasks-modal-header {
  align-items: flex-start;
}

#dashboard-team-tasks-modal .dashboard-team-tasks-modal-header p {
  margin: 5px 0 0;
  color: var(--wm-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

#dashboard-team-tasks-modal .dashboard-team-tasks-list {
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 155px);
  padding: 16px;
  overflow-y: auto;
}

#dashboard-team-tasks-modal .dashboard-team-task-item {
  padding: 14px;
  border: 1px solid var(--wm-line);
  border-radius: 12px;
  background: var(--wm-surface-soft);
}

#dashboard-team-tasks-modal .dashboard-team-task-head,
#dashboard-team-tasks-modal .dashboard-team-task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#dashboard-team-tasks-modal .dashboard-team-task-date,
#dashboard-team-tasks-modal .dashboard-team-task-confirmation {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 850;
}

#dashboard-team-tasks-modal .dashboard-team-task-date {
  color: #1d4ed8;
  background: #eff6ff;
}

#dashboard-team-tasks-modal .dashboard-team-task-confirmation {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  cursor: pointer;
}

#dashboard-team-tasks-modal .dashboard-team-task-confirmation::after {
  content: ' ▾';
}

#dashboard-team-tasks-modal .dashboard-team-task-confirmation[aria-expanded="true"]::after {
  content: ' ▴';
}

#dashboard-team-tasks-modal .dashboard-team-confirmation-details {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--wm-line);
  border-radius: 10px;
  background: #fff;
}

#dashboard-team-tasks-modal .dashboard-team-confirmation-details[hidden] {
  display: none !important;
}

#dashboard-team-tasks-modal .dashboard-team-task-item h4 {
  margin: 10px 0 5px;
  color: var(--wm-ink);
  font-size: 0.9rem;
  font-weight: 850;
}

#dashboard-team-tasks-modal .dashboard-team-task-item p {
  margin: 0 0 12px;
  color: var(--wm-muted);
  font-size: 0.77rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

#dashboard-team-tasks-modal .dashboard-team-task-footer {
  padding-top: 10px;
  border-top: 1px solid var(--wm-line);
}

#dashboard-team-tasks-modal .dashboard-team-task-footer > span {
  min-width: 0;
  overflow: hidden;
  color: var(--wm-muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-team-tasks-modal .dashboard-team-task-confirm-button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid #059669;
  border-radius: 8px;
  color: #fff;
  background: #059669;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}

#dashboard-team-tasks-modal .dashboard-team-task-confirm-button.confirmed {
  color: #047857;
  border-color: #a7f3d0;
  background: #d1fae5;
  cursor: default;
}

@media (max-width: 560px) {
  #dashboard-team-tasks-modal .dashboard-team-tasks-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  #dashboard-team-tasks-modal .dashboard-team-tasks-list {
    padding: 12px;
  }

  #dashboard-team-tasks-modal .dashboard-team-task-footer {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboard-team-tasks-modal .dashboard-team-task-confirm-button {
    width: 100%;
  }
}

#dashboard-detail-team-task-modal .dashboard-team-tasks-modal-card {
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  color: var(--wm-ink);
  background: #fff;
}

#dashboard-detail-team-task-modal .dashboard-team-tasks-modal-header {
  align-items: flex-start;
}

#dashboard-detail-team-task-modal .dashboard-team-tasks-modal-header p {
  margin: 5px 0 0;
  color: var(--wm-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-list {
  display: grid;
  gap: 8px;
  max-height: calc(100dvh - 155px);
  padding: 16px;
  overflow-y: auto;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--wm-line);
  border-radius: 11px;
  background: var(--wm-surface-soft);
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-item.completed {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-number {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #047857;
  background: #d1fae5;
  font-size: 0.72rem;
  font-weight: 900;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-copy {
  min-width: 0;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-copy strong,
#dashboard-detail-team-task-modal .dashboard-detail-team-task-copy small {
  display: block;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-copy strong {
  color: var(--wm-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-copy small {
  margin-top: 3px;
  color: var(--wm-muted);
  font-size: 0.68rem;
  font-weight: 650;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-toggle {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid #059669;
  border-radius: 8px;
  color: #fff;
  background: #059669;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-toggle.completed {
  color: #047857;
  border-color: #a7f3d0;
  background: #d1fae5;
}

#dashboard-detail-team-task-modal .dashboard-detail-team-task-toggle:disabled {
  cursor: default;
  opacity: 0.58;
}

@media (max-width: 560px) {
  #dashboard-detail-team-task-modal .dashboard-team-tasks-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  #dashboard-detail-team-task-modal .dashboard-detail-team-task-list {
    padding: 12px;
  }

  #dashboard-detail-team-task-modal .dashboard-detail-team-task-item {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  #dashboard-detail-team-task-modal .dashboard-detail-team-task-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }
}

body.admin-dashboard-active .admin-workload-name-button,
body.admin-dashboard-active .admin-workload-progress-button {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

body.admin-dashboard-active .admin-workload-name-button {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #172033;
  font-size: 0.71rem;
  font-weight: 750;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-dashboard-active .admin-workload-name-button:hover,
body.admin-dashboard-active .admin-workload-name-button:focus-visible {
  color: #047857;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

body.admin-dashboard-active .admin-workload-progress-button {
  padding: 3px 4px;
  border-radius: 7px;
}

body.admin-dashboard-active .admin-workload-progress-button:hover,
body.admin-dashboard-active .admin-workload-progress-button:focus-visible {
  background: #ecfdf5;
  outline: none;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-card {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  color: var(--wm-ink);
  background: #fff;
}

#dashboard-vacation-overview-modal .dashboard-team-tasks-modal-header {
  align-items: flex-start;
}

#dashboard-vacation-overview-modal .dashboard-team-tasks-modal-header p {
  margin: 5px 0 0;
  color: var(--wm-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-list {
  display: grid;
  max-height: calc(100dvh - 140px);
  gap: 8px;
  padding: 15px;
  overflow-x: hidden;
  overflow-y: auto;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-item:hover,
#dashboard-vacation-overview-modal .dashboard-vacation-overview-item:focus-visible {
  border-color: #6ee7b7;
  background: #ecfdf5;
  outline: none;
  transform: translateY(-1px);
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-date {
  padding: 4px 7px;
  border-radius: 7px;
  color: #047857;
  background: #d1fae5;
  font-size: 0.65rem;
  font-weight: 850;
  white-space: nowrap;
}

#dashboard-vacation-overview-modal .admin-list-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 9px;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-copy {
  min-width: 0;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-copy strong,
#dashboard-vacation-overview-modal .dashboard-vacation-overview-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-copy strong {
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 850;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 650;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-detail {
  color: #059669;
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

#dashboard-vacation-overview-modal .dashboard-vacation-overview-empty {
  padding: 40px 18px;
  color: #94a3b8;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  #dashboard-vacation-overview-modal .dashboard-vacation-overview-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  #dashboard-vacation-overview-modal .dashboard-vacation-overview-list {
    padding: 11px;
  }

  #dashboard-vacation-overview-modal .dashboard-vacation-overview-item {
    grid-template-columns: auto 30px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  #dashboard-vacation-overview-modal .dashboard-vacation-overview-detail {
    display: none;
  }
}

#dashboard-employee-overview-modal .dashboard-employee-overview-card {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  max-height: min(860px, calc(100dvh - 32px));
  color: var(--wm-ink);
  background: #f8fafc;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-header {
  flex: 0 0 auto;
  align-items: flex-start;
  background: #fff;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-header p {
  margin: 5px 0 0;
  color: var(--wm-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-content {
  display: flex;
  max-height: calc(100dvh - 125px);
  gap: 14px;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--employee-overview-color) 26%, #e2e8f0);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--employee-overview-color) 9%, #fff), #fff 68%);
}

#dashboard-employee-overview-modal .dashboard-employee-overview-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--employee-overview-color) 25%, transparent);
  font-size: 1.12rem;
  font-weight: 900;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-identity {
  min-width: 0;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-identity > strong,
#dashboard-employee-overview-modal .dashboard-employee-overview-identity > span {
  display: block;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-identity > strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 1.04rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-identity > span {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-badges span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #475569;
  background: #e2e8f0;
  font-size: 0.62rem;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-badges .is-active {
  color: #047857;
  background: #d1fae5;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-badges .is-warning {
  color: #b45309;
  background: #fef3c7;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric span,
#dashboard-employee-overview-modal .dashboard-employee-overview-metric strong,
#dashboard-employee-overview-modal .dashboard-employee-overview-metric small {
  display: block;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric span {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 750;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 1.18rem;
  font-weight: 900;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric small {
  margin-top: 2px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.61rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric.is-progress strong {
  color: #047857;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-metric.is-danger strong {
  color: #dc2626;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-section {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-section h4,
#dashboard-employee-overview-modal .dashboard-employee-overview-section h5 {
  margin: 0;
  color: #0f172a;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-section h4 {
  font-size: 0.82rem;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-section h5 {
  margin-top: 13px;
  font-size: 0.68rem;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 13px 0 0;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-info div {
  min-width: 0;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-info dt {
  color: #94a3b8;
  font-size: 0.61rem;
  font-weight: 750;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-info dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-progress-card > strong {
  display: block;
  margin-top: 10px;
  color: var(--employee-overview-color);
  font-size: 1.22rem;
  font-weight: 900;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-progress {
  height: 8px;
  display: block;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--employee-overview-color);
}

#dashboard-employee-overview-modal .dashboard-employee-overview-progress-card p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.45;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-teams span {
  max-width: 100%;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 6px;
  color: #4338ca;
  background: #eef2ff;
  font-size: 0.61rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-teams .is-empty {
  color: #94a3b8;
  background: #f1f5f9;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-tasks {
  padding-bottom: 10px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-tasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-tasks-head > span {
  padding: 3px 7px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 0.61rem;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-week-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 5px 0 10px;
  padding: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

#dashboard-employee-overview-modal .dashboard-employee-week-arrow {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dbe4eb;
  border-radius: 8px;
  color: #475569;
  background: #fff;
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-week-arrow:hover,
#dashboard-employee-overview-modal .dashboard-employee-week-arrow:focus-visible {
  border-color: #6ee7b7;
  color: #047857;
  background: #ecfdf5;
  outline: none;
}

#dashboard-employee-overview-modal .dashboard-employee-week-trigger-wrap {
  position: relative;
  min-width: 0;
}

#dashboard-employee-overview-modal .dashboard-employee-week-trigger {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #047857;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

#dashboard-employee-overview-modal .dashboard-employee-week-trigger:hover,
#dashboard-employee-overview-modal .dashboard-employee-week-trigger:focus-visible,
#dashboard-employee-overview-modal .dashboard-employee-week-trigger[aria-expanded="true"] {
  background: #ecfdf5;
  outline: none;
}

#dashboard-employee-overview-modal .dashboard-employee-week-trigger > span {
  font-size: 0.72rem;
}

#dashboard-employee-overview-modal .dashboard-employee-week-trigger > strong {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker {
  position: absolute;
  top: auto;
  bottom: calc(100% + 8px);
  left: 50%;
  width: min(304px, calc(100vw - 54px));
  z-index: 60;
  padding: 12px;
  border: 1px solid #cfe9df;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
  transform: translateX(-50%);
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker[hidden] {
  display: none !important;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-header strong {
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-header button {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-header button:hover,
#dashboard-employee-overview-modal .dashboard-employee-week-picker-header button:focus-visible {
  border-color: #6ee7b7;
  color: #047857;
  background: #ecfdf5;
  outline: none;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

#dashboard-employee-overview-modal .dashboard-employee-weekday {
  padding: 3px 0 5px;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 850;
  text-align: center;
}

#dashboard-employee-overview-modal .dashboard-employee-weekday.is-saturday,
#dashboard-employee-overview-modal .dashboard-employee-week-day.is-saturday {
  color: #2563eb;
}

#dashboard-employee-overview-modal .dashboard-employee-weekday.is-sunday,
#dashboard-employee-overview-modal .dashboard-employee-week-day.is-sunday {
  color: #dc2626;
}

#dashboard-employee-overview-modal .dashboard-employee-week-day {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #334155;
  background: transparent;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 750;
}

#dashboard-employee-overview-modal .dashboard-employee-week-day:hover,
#dashboard-employee-overview-modal .dashboard-employee-week-day:focus-visible {
  color: #047857;
  background: #d1fae5;
  outline: none;
}

#dashboard-employee-overview-modal .dashboard-employee-week-day.is-other-month {
  opacity: 0.36;
}

#dashboard-employee-overview-modal .dashboard-employee-week-day.is-selected-week {
  color: #047857;
  background: #d1fae5;
  opacity: 1;
}

#dashboard-employee-overview-modal .dashboard-employee-week-day.is-today {
  box-shadow: inset 0 0 0 2px #10b981;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-footer {
  display: flex;
  justify-content: center;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #eef2f7;
}

#dashboard-employee-overview-modal .dashboard-employee-week-picker-footer button {
  min-height: 28px;
  padding: 4px 11px;
  border: 0;
  border-radius: 7px;
  color: #047857;
  background: #ecfdf5;
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 850;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  max-height: 190px;
  overflow-x: hidden;
  overflow-y: auto;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  border-bottom: 1px solid #eef2f7;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task-date,
#dashboard-employee-overview-modal .dashboard-employee-overview-task-progress {
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.59rem;
  font-weight: 850;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task-date {
  color: #475569;
  background: #f1f5f9;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task-progress {
  color: #047857;
  background: #ecfdf5;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task.is-overdue .dashboard-employee-overview-task-date,
#dashboard-employee-overview-modal .dashboard-employee-overview-task.is-overdue .dashboard-employee-overview-task-progress {
  color: #b91c1c;
  background: #fef2f2;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task > div {
  min-width: 0;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task strong,
#dashboard-employee-overview-modal .dashboard-employee-overview-task small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task strong {
  color: #334155;
  font-size: 0.69rem;
  font-weight: 800;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-task small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.57rem;
  font-weight: 650;
}

#dashboard-employee-overview-modal .dashboard-employee-overview-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: #94a3b8;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
}

@media (max-width: 680px) {
  #dashboard-employee-overview-modal .dashboard-employee-overview-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-content {
    padding: 12px;
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-layout,
  #dashboard-employee-overview-modal .dashboard-employee-overview-task-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  #dashboard-employee-overview-modal .dashboard-employee-overview-profile {
    align-items: flex-start;
    padding: 13px;
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 12px;
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-info {
    grid-template-columns: minmax(0, 1fr);
  }

  #dashboard-employee-overview-modal .dashboard-employee-week-navigation {
    gap: 4px;
    padding: 5px;
  }

  #dashboard-employee-overview-modal .dashboard-employee-week-trigger {
    max-width: 220px;
    padding-inline: 7px;
  }

  #dashboard-employee-overview-modal .dashboard-employee-week-picker {
    width: min(286px, calc(100vw - 42px));
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-task {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #dashboard-employee-overview-modal .dashboard-employee-overview-task-progress {
    grid-column: 2;
    justify-self: start;
  }
}

@container wm-admin-main (min-width: 900px) {
  body.admin-dashboard-active .admin-dashboard-summary,
  body.admin-dashboard-active .admin-dashboard-kpi,
  body.admin-dashboard-active .admin-dashboard-approvals,
  body.admin-dashboard-active .admin-dashboard-upcoming,
  body.admin-dashboard-active .admin-dashboard-workload,
  body.admin-dashboard-active .admin-dashboard-teams {
    grid-column: span 6;
  }
}

@container wm-admin-main (min-width: 1500px) {
  body.admin-dashboard-active .admin-dashboard-summary,
  body.admin-dashboard-active .admin-dashboard-kpi,
  body.admin-dashboard-active .admin-dashboard-approvals,
  body.admin-dashboard-active .admin-dashboard-upcoming,
  body.admin-dashboard-active .admin-dashboard-workload,
  body.admin-dashboard-active .admin-dashboard-teams {
    grid-column: span 4;
  }

  body.admin-dashboard-active .admin-dashboard-summary,
  body.admin-dashboard-active .admin-dashboard-kpi,
  body.admin-dashboard-active .admin-dashboard-approvals {
    min-height: 220px;
  }

  body.admin-dashboard-active .admin-dashboard-upcoming,
  body.admin-dashboard-active .admin-dashboard-workload,
  body.admin-dashboard-active .admin-dashboard-teams {
    min-height: 300px;
  }
}

@container wm-admin-main (min-width: 900px) {
  body.employee-dashboard-user.admin-dashboard-active .admin-dashboard-summary,
  body.employee-dashboard-user.admin-dashboard-active .admin-dashboard-kpi {
    grid-column: span 6;
  }

  body.employee-dashboard-user.admin-dashboard-active .admin-dashboard-upcoming {
    grid-column: span 6;
    height: 220px;
    min-height: 220px;
  }

  body.employee-dashboard-user.admin-dashboard-active .admin-dashboard-upcoming .admin-upcoming-list {
    max-height: 150px !important;
  }
}

/* ---------- Authentication ---------- */

#auth-view {
  --bg-card: #fff;
  --border-color: var(--wm-line);
  --text-main: var(--wm-ink);
  --text-muted: var(--wm-muted);
  --card-shadow: var(--wm-shadow-float);
  color: var(--wm-ink);
  background: radial-gradient(circle at 20% 12%, #e7f9f1 0, transparent 35%), var(--wm-page);
}

#auth-view .auth-card {
  border-color: var(--wm-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--wm-shadow-float);
  backdrop-filter: blur(18px);
}

#auth-view .form-input,
#auth-view .form-select {
  border-color: var(--wm-line-strong);
  color: var(--wm-ink);
  background: var(--wm-surface-soft);
}

/* ---------- Modals and floating panels ---------- */

.modal-overlay {
  --bg-main: var(--wm-page);
  --bg-card: var(--wm-surface);
  --bg-modal: var(--wm-surface);
  --border-color: var(--wm-line);
  --border-color-glow: rgba(11, 122, 93, 0.28);
  --primary: var(--wm-green);
  --secondary: #0f9f77;
  --success: #059669;
  --danger: #dc2626;
  --text-main: var(--wm-ink);
  --text-muted: var(--wm-muted);
  width: 100vw;
  height: 100dvh;
  inset: 0;
  padding: clamp(14px, 2vw, 28px);
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.active,
.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-overlay.active .modal-card,
.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-overlay .modal-card {
  width: min(620px, 100%);
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--wm-line);
  border-radius: 18px;
  color: var(--wm-ink);
  background: #fff;
  box-shadow: var(--wm-shadow-float);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-overlay .modal-header {
  border-color: var(--wm-line) !important;
}

.modal-overlay .modal-title {
  color: var(--wm-ink);
}

.modal-overlay .btn-modal-close {
  color: var(--wm-muted);
  background: var(--wm-surface-soft);
}

.modal-overlay .modal-body {
  min-height: 0;
  max-height: none;
  color: var(--wm-ink);
}

.modal-overlay .form-input,
.modal-overlay .form-select,
.modal-overlay .form-textarea,
.modal-overlay textarea {
  border-color: var(--wm-line-strong) !important;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
}

.modal-overlay .msg-list-item:hover {
  background: var(--wm-surface-soft) !important;
}

.modal-overlay .modal-task-item,
.modal-overlay #message-detail-view > div:first-child {
  border-color: var(--wm-line) !important;
  color: var(--wm-ink) !important;
  background: var(--wm-surface-soft) !important;
}

.modal-overlay .modal-task-desc,
.modal-overlay .modal-task-footer,
.modal-overlay .modal-task-assignment,
.modal-overlay .modal-task-date,
.modal-overlay .progress-popup-header,
.modal-overlay .progress-popup-labels {
  color: var(--wm-muted);
}

.modal-overlay .modal-task-title {
  color: var(--wm-ink) !important;
}

.modal-overlay .modal-task-badge {
  border-color: var(--wm-line-strong) !important;
  color: #334155 !important;
  background: #fff !important;
}

.modal-overlay .modal-task-assignment span span {
  color: #334155 !important;
}

.modal-overlay .btn-progress-toggle {
  border-color: var(--wm-line-strong);
  color: var(--wm-green) !important;
  background: #fff;
}

.modal-overlay .progress-toggle-value,
.modal-overlay .progress-popup-header,
.modal-overlay .progress-popup-pct {
  color: var(--wm-green) !important;
}

.modal-overlay .progress-popup {
  border-color: #bce8d5;
  color: var(--wm-ink);
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.modal-overlay .btn-team-task-check {
  min-height: 28px;
  margin-left: 8px;
  padding: 4px 11px;
  border: 1px solid color-mix(in srgb, var(--member-color) 40%, white);
  border-radius: 999px;
  color: var(--member-color);
  background: color-mix(in srgb, var(--member-color) 10%, white);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.modal-overlay .btn-team-task-check:hover:not(:disabled) {
  background: color-mix(in srgb, var(--member-color) 18%, white);
}

.modal-overlay .btn-team-task-check.confirmed {
  border-color: var(--member-color);
  color: #fff;
  background: var(--member-color);
  cursor: default;
  opacity: 1;
}

.team-confirmation-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.modal-overlay .btn-team-confirmation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #b8decf;
  border-radius: 8px;
  color: var(--wm-green-strong);
  background: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.modal-overlay .btn-team-confirmation-toggle span {
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--wm-green);
  text-align: center;
  font-size: 0.66rem;
}

.modal-overlay .btn-team-confirmation-toggle:hover,
.modal-overlay .btn-team-confirmation-toggle.active {
  border-color: #79cdb0;
  background: var(--wm-surface-green);
}

.team-confirmation-popup {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(290px, calc(100vw - 42px));
  z-index: 30;
  padding: 12px;
  border: 1px solid #cfe9df;
  border-radius: 13px;
  color: var(--wm-ink);
  background: #fff;
  box-shadow: var(--wm-shadow-float);
}

.team-confirmation-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--wm-line);
}

.team-confirmation-popup-head strong {
  font-size: 0.78rem;
}

.team-confirmation-popup-head span {
  color: var(--wm-green);
  font-size: 0.72rem;
  font-weight: 900;
}

.team-confirmation-member-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.team-confirmation-member {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--member-color) 34%, white);
  border-radius: 10px;
  background: color-mix(in srgb, var(--member-color) 8%, white);
  transition: opacity 0.2s;
}

.team-confirmation-member.pending {
  opacity: 0.38;
  filter: grayscale(0.72);
}

.team-confirmation-member-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--member-color);
}

.team-confirmation-member-copy {
  min-width: 0;
}

.team-confirmation-member-copy strong,
.team-confirmation-member-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-confirmation-member-copy strong {
  color: var(--member-color);
  font-size: 0.77rem;
}

.team-confirmation-member-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
}

.team-confirmation-member-mark {
  color: var(--member-color);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 900;
}

.team-confirmation-empty {
  margin: 0;
  padding: 16px 10px;
  color: var(--wm-muted);
  text-align: center;
  font-size: 0.72rem;
}

.modal-overlay .progress-popup-track {
  background: #e5e9ef;
}

.modal-overlay .progress-popup-midmark {
  background: #94a3b8;
}

.modal-overlay .progress-popup-labels {
  color: #64748b;
}

#message-modal .msg-list-item {
  color: var(--wm-ink);
  background: #fff;
}

#message-modal .msg-person-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1e293b !important;
  font-weight: 800 !important;
}

#message-modal .msg-person-name::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--msg-person-color, var(--wm-green));
  content: '';
}

/* ---------- Dedicated vacation workspace ---------- */

.schedule-workspace.vacation-workspace {
  width: 100%;
  min-height: calc(100dvh - 70px - var(--wm-gutter) - var(--wm-gutter));
  min-width: 0;
  grid-template-columns: clamp(300px, 21vw, 360px) minmax(0, 1fr);
  align-items: start;
  gap: var(--wm-gap);
}

.schedule-workspace .vacation-compose-card,
.schedule-workspace .vacation-calendar-card {
  min-width: 0;
  border: 1px solid var(--wm-line);
  border-radius: var(--wm-radius-lg);
  color: var(--wm-ink);
  background: #fff;
  box-shadow: var(--wm-shadow);
}

.schedule-workspace .vacation-compose-card {
  padding: 22px;
}

.schedule-workspace .vacation-calendar-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1181px) {
  .schedule-workspace .vacation-compose-card {
    position: sticky;
    top: 0;
  }

  .schedule-workspace .vacation-calendar-card {
    min-height: calc(100dvh - 70px - var(--wm-gutter) - var(--wm-gutter));
  }
}

.schedule-workspace .vacation-compose-heading > span,
.schedule-workspace .vacation-calendar-header > div:first-child > span {
  display: block;
  margin-bottom: 6px;
  color: var(--wm-green);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.schedule-workspace .vacation-compose-heading h2,
.schedule-workspace .vacation-calendar-header h2 {
  margin: 0;
  color: var(--wm-ink);
  font-size: clamp(1.12rem, 1.3vw, 1.4rem);
  line-height: 1.3;
}

.schedule-workspace .vacation-compose-heading p,
.schedule-workspace .vacation-calendar-header p {
  margin: 7px 0 0;
  color: var(--wm-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.schedule-workspace .vacation-owner-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 20px 0 18px;
  padding: 12px;
  border: 1px solid #cfe9df;
  border-radius: 12px;
  background: var(--wm-surface-green);
}

.schedule-workspace #vacation-owner-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
}

.schedule-workspace .vacation-owner-chip small,
.schedule-workspace .vacation-owner-chip strong {
  display: block;
}

.schedule-workspace .vacation-owner-copy {
  min-width: 0;
  flex: 1;
}

.schedule-workspace #vacation-assignee-select[hidden],
.schedule-workspace #vacation-owner-name[hidden] {
  display: none !important;
}

.schedule-workspace #vacation-assignee-select {
  width: 100%;
  height: 36px;
  margin-top: 5px;
  padding: 0 30px 0 10px;
  border: 1px solid #b8decf;
  border-radius: 9px;
  color: #17352c;
  background: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.schedule-workspace .vacation-owner-chip small {
  margin-bottom: 2px;
  color: var(--wm-muted);
  font-size: 0.68rem;
}

.schedule-workspace .vacation-owner-chip strong {
  color: var(--wm-ink);
  font-size: 0.86rem;
}

.schedule-workspace .vacation-date-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: end;
  gap: 7px;
}

.schedule-workspace .vacation-date-fields > span {
  padding-bottom: 13px;
  color: var(--wm-faint);
  text-align: center;
  font-weight: 800;
}

.schedule-workspace .vacation-date-fields label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 0.73rem;
  font-weight: 800;
}

.schedule-workspace .vacation-date-fields input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 9px;
  border: 1px solid var(--wm-line-strong);
  border-radius: 10px;
  color: var(--wm-ink);
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

.schedule-workspace .vacation-range-preview {
  margin: 12px 0;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--wm-green-strong);
  background: #eefbf6;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.schedule-workspace .vacation-submit-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #0b8d69, #087154);
  box-shadow: 0 8px 18px rgba(11, 122, 93, 0.17);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.schedule-workspace .vacation-submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.schedule-workspace .vacation-form-actions {
  display: grid;
  gap: 8px;
}

.schedule-workspace .vacation-edit-cancel-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #475569;
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.schedule-workspace #vacation-form.is-editing {
  padding: 12px;
  border: 1px solid #7dd3b8;
  border-radius: 12px;
  background: #f2fcf8;
}

.schedule-workspace .vacation-form-error {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 9px;
  color: #be123c;
  background: #fff1f2;
  font-size: 0.72rem;
  font-weight: 800;
}

.schedule-workspace .vacation-form-error.success {
  color: #047857;
  background: #ecfdf5;
}

.schedule-workspace .vacation-my-list-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--wm-line);
}

.schedule-workspace .vacation-my-list-heading,
.schedule-workspace .vacation-my-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-workspace .vacation-my-list-heading strong {
  font-size: 0.82rem;
}

.schedule-workspace .vacation-my-list-heading small {
  color: var(--wm-green);
  font-weight: 900;
}

.schedule-workspace .vacation-my-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.schedule-workspace .vacation-my-item {
  min-height: 42px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--wm-line);
  border-radius: 10px;
  color: #334155;
  background: var(--wm-surface-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.schedule-workspace .vacation-my-item button {
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  color: #be123c;
  background: #ffe4e6;
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 900;
}

.schedule-workspace .vacation-empty {
  margin: 0;
  padding: 16px 10px;
  border-radius: 10px;
  color: var(--wm-faint);
  background: var(--wm-surface-soft);
  text-align: center;
  font-size: 0.72rem;
}

.schedule-workspace .vacation-calendar-card {
  overflow: hidden;
}

.schedule-workspace .vacation-calendar-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--wm-line);
}

.schedule-workspace .vacation-month-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.schedule-workspace .vacation-month-nav button {
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--wm-line-strong);
  border-radius: 9px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 900;
}

.schedule-workspace .vacation-month-nav button:hover {
  border-color: #9ed8c3;
  color: var(--wm-green);
  background: var(--wm-surface-green);
}

.schedule-workspace .vacation-calendar-scroll {
  width: 100%;
  min-height: 0;
  display: flex;
  flex: 1;
  overflow-x: auto;
}

.schedule-workspace .vacation-calendar-canvas {
  width: 100%;
  min-width: 690px;
  min-height: 0;
  display: grid;
  grid-template-rows: 39px minmax(0, 1fr);
}

.schedule-workspace .vacation-calendar-weeks {
  min-height: 0;
  display: grid;
}

.schedule-workspace .vacation-weekdays,
.schedule-workspace .vacation-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-workspace .vacation-weekdays {
  min-height: 39px;
  align-items: center;
  border-bottom: 1px solid var(--wm-line);
  color: #64748b;
  background: #fafcfd;
  text-align: center;
  font-size: 0.69rem;
  font-weight: 900;
}

.schedule-workspace .vacation-weekdays span:first-child {
  color: #e11d48;
}

.schedule-workspace .vacation-weekdays span:last-child {
  color: #2563eb;
}

.schedule-workspace .vacation-week {
  position: relative;
  min-height: 74px;
  border-bottom: 1px solid var(--wm-line);
}

.schedule-workspace .vacation-week:last-child {
  border-bottom: 0;
}

.schedule-workspace .vacation-day-cell {
  min-width: 0;
  grid-row: 1 / -1;
  padding: 8px 9px;
  border-right: 1px solid var(--wm-line);
  color: #475569;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.schedule-workspace .vacation-day-cell:nth-of-type(7n) {
  border-right: 0;
}

.schedule-workspace .vacation-day-cell.other-month {
  color: #c2cad5;
  background: #fafbfc;
}

.schedule-workspace .vacation-day-cell.today > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  color: #fff;
  background: var(--wm-green);
}

.schedule-workspace .vacation-span {
  min-width: 0;
  height: 22px;
  z-index: 2;
  align-self: center;
  margin: 1px 4px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--vacation-color) 42%, white);
  border-left: 4px solid var(--vacation-color);
  border-radius: 7px;
  color: var(--vacation-color);
  background: var(--vacation-bg);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 20px;
  box-sizing: border-box;
}

.schedule-workspace .vacation-span.continues-before {
  margin-left: 0;
  border-left-width: 0;
  border-radius: 0 7px 7px 0;
}

.schedule-workspace .vacation-span.continues-after {
  margin-right: 0;
  border-right-width: 0;
  border-radius: 7px 0 0 7px;
}

.schedule-workspace .vacation-span.continues-before.continues-after {
  border-radius: 0;
}

.schedule-workspace .schedule-field-label {
  display: block;
  margin: 12px 0 7px;
  color: #475569;
  font-size: 0.73rem;
  font-weight: 800;
}

.schedule-workspace .schedule-form-control {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--wm-line-strong);
  border-radius: 10px;
  color: var(--wm-ink);
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  box-sizing: border-box;
}

.schedule-workspace .schedule-form-control:focus {
  border-color: #79cdb0;
  outline: 3px solid rgba(11, 141, 105, 0.1);
}

.schedule-workspace .schedule-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.schedule-workspace .schedule-list-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-workspace .schedule-list-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.schedule-workspace .vacation-my-item .schedule-detail-button {
  color: #047857;
  background: #dff8ee;
}

.schedule-workspace .vacation-my-item .schedule-edit-button {
  color: #1d4ed8;
  background: #dbeafe;
}

.schedule-workspace .vacation-span {
  cursor: pointer;
}

.schedule-workspace .vacation-span:focus-visible {
  outline: 2px solid var(--vacation-color);
  outline-offset: 1px;
}

.schedule-workspace #project-owner-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
}

#project-view-content .vacation-compose-heading > span,
#project-view-content .vacation-calendar-header > div:first-child > span,
#project-view-content .vacation-my-list-heading small {
  color: #6d28d9;
}

#project-view-content .vacation-owner-chip {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

#project-view-content .vacation-range-preview {
  color: #5b21b6;
  background: #f5f3ff;
  word-break: keep-all;
  overflow-wrap: normal;
}

#schedule-detail-range {
  word-break: keep-all;
  overflow-wrap: normal;
}

body.admin-dashboard-active .admin-schedule-date-range {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.45;
}

body.admin-dashboard-active .admin-schedule-date-range > span {
  display: block;
  white-space: nowrap;
  word-break: keep-all;
}

#project-view-content .vacation-submit-button {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.18);
}

.schedule-detail-card {
  width: min(560px, calc(100% - 28px));
}

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

.schedule-detail-list > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--wm-line);
  border-radius: 11px;
  background: var(--wm-surface-soft);
}

.schedule-detail-list .schedule-detail-wide {
  grid-column: 1 / -1;
}

.schedule-detail-list dt {
  margin-bottom: 6px;
  color: var(--wm-muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.schedule-detail-list dd {
  margin: 0;
  color: var(--wm-ink);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* ---------- Tablet ---------- */

@media (max-width: 1180px) {
  #calendar-view-content.calendar-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-workspace.vacation-workspace {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-workspace .vacation-calendar-card {
    min-height: clamp(560px, 76dvh, 760px);
  }

  #calendar-view-content .mobile-task-panel-toggle {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    order: 1;
    padding: 0 16px;
    border: 1px solid #bce8d5;
    border-radius: 12px;
    color: var(--wm-green);
    background: #fff;
    box-shadow: var(--wm-shadow);
    font-size: 0.86rem;
    font-weight: 800;
  }

  #calendar-view-content .mobile-task-panel-toggle-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  #calendar-view-content .mobile-task-panel-toggle-state {
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--wm-muted);
    background: var(--wm-surface-soft);
    font-size: 0.7rem;
    text-align: center;
  }

  #calendar-view-content .task-compose-rail {
    display: none;
    order: 2;
  }

  #calendar-view-content .task-compose-rail.mobile-open {
    display: flex;
  }

  #calendar-view-content .calendar-panel {
    order: 3;
  }
}

@media (max-width: 1024px) {
  :root {
    --wm-gutter: clamp(16px, 2.5vw, 26px);
    --wm-gap: 16px;
  }

  body.admin-workspace-active .admin-dashboard-sidebar {
    width: 208px;
    min-width: 208px;
    flex-basis: 208px;
  }

  #dashboard-view .employee-detail-layout {
    grid-template-columns: 1fr;
  }

  #dashboard-view .employee-detail-task-list {
    max-height: none;
  }

  #calendar-view-content .calendar-header {
    align-items: stretch;
    flex-direction: column;
  }

  #calendar-view-content .calendar-header > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  #main-tab-nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #main-tab-nav::-webkit-scrollbar {
    display: none;
  }

  #main-tab-nav .main-tab-btn {
    flex: 0 0 auto;
  }

  .schedule-detail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-detail-list .schedule-detail-wide {
    grid-column: auto;
  }

  .schedule-workspace.vacation-workspace {
    gap: 12px;
  }

  .schedule-workspace .vacation-compose-card {
    padding: 16px;
  }

  .schedule-workspace .vacation-calendar-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 16px;
  }

  .schedule-workspace .vacation-month-nav {
    width: 100%;
  }

  .schedule-workspace .vacation-month-nav #vacation-today-button,
  .schedule-workspace .vacation-month-nav #project-today-button {
    flex: 1;
  }

  .schedule-workspace .vacation-calendar-canvas {
    min-width: 0;
  }

  .schedule-workspace .vacation-calendar-scroll {
    overflow-x: hidden;
  }

  .schedule-workspace .vacation-week {
    min-height: 70px;
  }

  .schedule-workspace .vacation-day-cell {
    padding: 7px 5px;
  }

  .schedule-workspace .vacation-span {
    margin-right: 1px;
    margin-left: 1px;
    padding: 0 3px;
    border-left-width: 3px;
    font-size: clamp(0.52rem, 2.3vw, 0.64rem);
  }

  :root {
    --wm-gutter: 12px;
    --wm-gap: 12px;
  }

  body.admin-workspace-active #dashboard-view.active,
  body.admin-workspace-active #dashboard-view.active .dashboard-wrapper {
    width: 100%;
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  body.admin-workspace-active #dashboard-view.active .dashboard-wrapper {
    display: flex;
    flex-direction: column;
  }

  body.admin-workspace-active .dash-header {
    order: 0;
    height: 58px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  #dashboard-view .notif-dropdown.active,
  .notif-dropdown.mobile-notif-portal.active,
  #dashboard-view #profile-dropdown[style*="display: flex"] {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: calc(100vw - 28px) !important;
    max-width: 380px !important;
    max-height: min(72dvh, 560px) !important;
    transform: translate(-50%, -50%) !important;
    border: 1px solid var(--wm-line-strong) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.58), 0 20px 55px rgba(15, 23, 42, 0.24) !important;
    animation: none !important;
    z-index: 1500 !important;
  }

  .notif-dropdown.mobile-notif-portal.active {
    --bg-main: var(--wm-page);
    --bg-card: var(--wm-surface);
    --bg-modal: var(--wm-surface);
    --border-color: var(--wm-line);
    --primary: var(--wm-green);
    --secondary: #0f9f77;
    --text-main: var(--wm-ink);
    --text-muted: var(--wm-muted);
    display: flex !important;
    color: var(--wm-ink) !important;
    background: #fff !important;
    z-index: 3000 !important;
  }

  .notif-dropdown.mobile-notif-portal .notif-header {
    border-color: var(--wm-line) !important;
    background: #fff;
  }

  .notif-dropdown.mobile-notif-portal .notif-item {
    border-color: var(--wm-line) !important;
    color: var(--wm-ink) !important;
    background: #fff;
  }

  .notif-dropdown.mobile-notif-portal .notif-item.unread {
    border-left-color: var(--wm-green) !important;
    background: #f3faf7;
  }

  #dashboard-view .dash-header:has(.notif-dropdown.active),
  #dashboard-view .dash-header:has(#profile-dropdown[style*="display: flex"]) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #dashboard-view #profile-dropdown[style*="display: flex"] {
    flex-direction: column !important;
    padding: 10px !important;
    gap: 7px !important;
  }

  #dashboard-view #profile-dropdown .dropdown-user-info {
    width: 100%;
    box-sizing: border-box;
  }

  #dashboard-view #profile-dropdown button {
    justify-content: flex-start;
    white-space: nowrap;
  }

  #dashboard-view .notif-dropdown .notif-list {
    max-height: calc(min(72dvh, 560px) - 62px);
  }

  body.admin-workspace-active .dash-header .header-container {
    height: 58px !important;
  }

  body.admin-workspace-active .dash-content,
  body.admin-workspace-active .menu-view,
  body.admin-workspace-active .admin-dashboard-view {
    order: 2;
    width: 100%;
    height: auto !important;
    min-height: 0;
  }

  body.admin-workspace-active .menu-view {
    overflow: visible !important;
  }

  #dashboard-view.active,
  #dashboard-view.active .dashboard-wrapper {
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  #dashboard-view .dash-header {
    position: sticky;
    top: 0;
  }

  #dashboard-view .header-container {
    height: 58px !important;
    padding: 0 12px !important;
  }

  #dashboard-view .main-tab-nav {
    position: sticky;
    top: 58px;
    z-index: 70;
    min-height: 48px;
    padding: 6px 12px !important;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.97) !important;
    scrollbar-width: none;
  }

  #dashboard-view .main-tab-nav::-webkit-scrollbar {
    display: none;
  }

  #dashboard-view .main-tab-btn {
    min-width: max-content;
    min-height: 35px;
    padding: 0 13px !important;
    border-radius: 9px !important;
    font-size: 0.74rem !important;
  }

  #dashboard-view .dash-content {
    height: auto !important;
    padding: 12px;
    overflow: visible !important;
  }

  #calendar-view-content .calendar-panel {
    gap: 10px;
  }

  #calendar-view-content .calendar-mode-banner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 11px 13px;
  }

  #calendar-view-content .calendar-mode-banner > small {
    white-space: normal;
  }

  #calendar-view-content .calendar-tabs {
    width: 100%;
  }

  #calendar-view-content .calendar-tab {
    flex: 1;
  }

  #calendar-view-content .calendar-goals-banner {
    padding: 14px;
  }

  #calendar-view-content .calendar-goals-heading {
    align-items: flex-start;
  }

  #calendar-view-content .calendar-header {
    gap: 10px !important;
    padding: 12px !important;
    border: 1px solid var(--wm-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: var(--wm-shadow) !important;
  }

  #calendar-view-content .calendar-filter {
    min-width: 0;
  }

  #calendar-view-content .calendar-filter .form-select {
    max-width: none !important;
  }

  #calendar-view-content .calendar-grid-card {
    padding: 6px !important;
    border: 1px solid var(--wm-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: var(--wm-shadow) !important;
  }

  #calendar-view-content .calendar-weekdays {
    min-height: 30px;
    font-size: 0.66rem;
  }

  #calendar-view-content .calendar-days {
    grid-auto-rows: clamp(76px, 21vw, 92px) !important;
    gap: 2px !important;
    min-height: 0 !important;
  }

  #calendar-view-content .calendar-day-cell {
    min-height: 0 !important;
    padding: 3px 2px !important;
    border: 1px solid #edf1f4 !important;
    border-radius: 5px !important;
    background: #fbfcfd !important;
  }

  #calendar-view-content .calendar-day-cell.today {
    background: #f0faf6 !important;
  }

  #calendar-view-content .task-pill {
    height: 17px !important;
    padding: 1px 3px !important;
    color: #1f2937 !important;
    font-size: 0.6rem !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
  }

  #calendar-view-content .task-pill.instruction-task {
    gap: 2px;
    border-left-width: 3px !important;
  }

  #calendar-view-content .pill-instruction-badge {
    padding: 0 2px;
    font-size: 0.5rem;
  }

  #routine-view-content,
  #routine-view-content .card-panel,
  #routine-view-content [style*="color:var(--text-main)"],
  #routine-view-content [style*="color: var(--text-main)"] {
    color: var(--wm-ink) !important;
  }

  #calendar-view-content .btn-quick-write {
    display: none !important;
  }

  #dashboard-view .menu-view {
    height: auto !important;
    overflow: visible !important;
  }

  #dashboard-view .menu-inner-wrap {
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 12px !important;
    overflow: visible !important;
  }

  #dashboard-view .doc-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    height: auto;
    min-height: 56px;
    flex-direction: row !important;
    align-items: center;
    gap: 7px !important;
    padding: 7px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 1px solid var(--wm-line) !important;
    border-radius: 12px;
    background: #fff !important;
    scrollbar-width: none;
  }

  #dashboard-view .doc-sidebar::-webkit-scrollbar {
    display: none;
  }

  #dashboard-view #btn-doc-folder-toggle,
  #dashboard-view #btn-routine-folder-toggle {
    display: none !important;
  }

  #dashboard-view .doc-nav,
  #dashboard-view .doc-nav.open {
    width: auto;
    max-height: none !important;
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: row !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  #dashboard-view .doc-nav-btn,
  #dashboard-view .doc-sidebar > #btn-weekly-report-tab,
  #dashboard-view .doc-sidebar > #btn-goals-tab {
    width: auto !important;
    min-width: max-content;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    padding: 0 12px !important;
    margin: 0 !important;
    border: 1px solid var(--wm-line) !important;
    border-radius: 9px !important;
    color: var(--wm-muted) !important;
    background: var(--wm-surface-soft) !important;
    font-size: 0.76rem !important;
  }

  #dashboard-view .doc-nav-btn.active,
  #dashboard-view .doc-sidebar > .doc-sidebar-header.active {
    color: var(--wm-green) !important;
    border-color: #a9ddc7 !important;
    background: var(--wm-green-soft) !important;
  }

  #dashboard-view .doc-main {
    width: 100%;
    height: auto !important;
    padding: 16px;
    border-radius: 12px;
    overflow: visible !important;
  }

  #dashboard-view .member-management-view {
    gap: 14px;
  }

  #dashboard-view .member-management-card-slot #admin-employee-card,
  #dashboard-view .employee-detail-panel {
    padding: 14px;
  }

  #dashboard-view .member-management-card-slot .employee-list-panel,
  #dashboard-view .employee-detail-task-list {
    grid-template-columns: 1fr;
  }

  #dashboard-view .employee-detail-empty {
    min-height: 210px;
    padding: 24px 18px;
  }

  #dashboard-view .employee-detail-header {
    align-items: flex-start;
  }

  #dashboard-view .employee-detail-work-header {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboard-view .employee-detail-date-tools {
    width: 100%;
    justify-content: space-between;
  }

  #dashboard-view .employee-detail-date-nav {
    min-width: 0;
    flex: 1 1 auto;
  }

  #dashboard-view .employee-detail-date-nav input {
    min-width: 0;
    flex: 1 1 auto;
  }

  #dashboard-view .employee-detail-close {
    flex: 0 0 auto;
    font-size: 0;
  }

  #dashboard-view .employee-detail-close span {
    font-size: 1.15rem;
  }

  #dashboard-view .employee-detail-grid {
    grid-template-columns: 1fr;
  }

  #dashboard-view .employee-detail-actions > button {
    flex-basis: 100% !important;
  }

  #dashboard-view .doc-panel-header,
  #dashboard-view .goals-page-header,
  #dashboard-view .goals-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #dashboard-view .doc-panel-title {
    font-size: 1.12rem;
  }

  #dashboard-view .doc-panel-subtitle {
    padding-left: 0;
  }

  #dashboard-view .doc-dropzone {
    padding: 25px 14px;
  }

  #dashboard-view .goals-month-control {
    width: 100%;
  }

  #dashboard-view .goals-month-control input {
    flex: 1;
  }

  #dashboard-view .goal-add-form {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboard-view .goal-add-form button {
    width: 100%;
  }

  #dashboard-view .goal-add-form input {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 13px;
  }

  #dashboard-view .weekly-goals-grid,
  #dashboard-view .weekly-past-grid {
    grid-template-columns: 1fr !important;
  }

  body.admin-workspace-active .admin-dashboard-sidebar {
    order: 1;
    width: 100%;
    min-width: 0;
    flex-basis: auto;
    height: auto;
    padding: 11px 12px 9px;
    position: sticky;
    top: 58px;
    z-index: 90;
    box-shadow: 0 2px 9px rgba(15, 23, 42, 0.12);
  }

  body.admin-workspace-active .admin-sidebar-brand {
    display: none;
  }

  body.admin-workspace-active .admin-sidebar-nav {
    scrollbar-width: none;
  }

  body.admin-workspace-active .admin-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  body.admin-dashboard-active .admin-dashboard-shell {
    padding: 18px 12px 34px;
  }

  body.admin-dashboard-active .admin-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  body.admin-dashboard-active .admin-dashboard-hero-side {
    width: 100%;
    justify-content: flex-start;
  }

  body.admin-dashboard-active .admin-dashboard-card {
    min-height: 0 !important;
    padding: 16px;
  }

  .modal-overlay {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    inset: 0 !important;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }

  .modal-overlay .modal-card,
  #doc-preview-modal .modal-card {
    width: 100% !important;
    max-width: 620px !important;
    max-height: calc(100dvh - 28px) !important;
    margin: 0 auto;
    border-radius: 16px !important;
    transform: none !important;
  }

  .modal-overlay .modal-body {
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto;
  }

  /* 팀 업무 확인 현황은 작은 버튼을 기준으로 띄우면 좌측 및 모달 스크롤
     영역 밖으로 잘릴 수 있으므로 모바일에서는 화면 중앙 레이어로 표시합니다. */
  .modal-overlay .team-confirmation-popup {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(340px, calc(100vw - 28px)) !important;
    max-width: none !important;
    max-height: calc(100dvh - 40px) !important;
    box-sizing: border-box;
    overflow: hidden;
    transform: translate(-50%, -50%) !important;
    z-index: 4000 !important;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.52), 0 22px 60px rgba(15, 23, 42, 0.28) !important;
  }

  .modal-overlay .team-confirmation-member-list {
    max-height: calc(100dvh - 140px);
    overscroll-behavior: contain;
  }

  #doc-preview-modal .modal-card {
    height: calc(100dvh - 28px);
  }

  #message-modal .modal-card {
    height: min(680px, calc(100dvh - 28px));
  }

  #message-modal .msg-list-item {
    align-items: flex-start !important;
    padding: 12px !important;
  }
}

@media (max-width: 480px) {
  #dashboard-view .header-logo span {
    font-size: 0.96rem !important;
  }

  #dashboard-view .header-right {
    gap: 2px;
  }

  #dashboard-view #btn-msg,
  #dashboard-view .btn-notif {
    width: 36px !important;
    height: 36px !important;
  }

  #calendar-view-content .calendar-goals-heading {
    gap: 8px;
  }

  #calendar-view-content .calendar-goals-add-btn {
    min-width: 38px;
    padding: 0 9px;
    font-size: 0;
  }

  #calendar-view-content .calendar-goals-add-btn svg {
    width: 16px;
    height: 16px;
  }

  #calendar-view-content .calendar-header > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  #calendar-view-content .calendar-filter {
    width: 100%;
  }

  #calendar-view-content .calendar-filter .form-select {
    flex: 1;
    min-width: 0;
  }

  body.admin-dashboard-active .admin-dashboard-hero-side {
    flex-wrap: wrap;
  }

  body.admin-dashboard-active .admin-card-title small,
  body.admin-dashboard-active .admin-kpi-overall small,
  body.admin-dashboard-active .admin-kpi-item small {
    display: none;
  }

  body.admin-dashboard-active .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-dashboard-active .admin-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-dashboard-active .admin-kpi-overall,
  body.admin-dashboard-active .admin-kpi-item {
    min-height: 82px;
    padding: 7px 4px;
  }

  body.admin-dashboard-active .admin-approval-row,
  body.admin-dashboard-active .admin-workload-row,
  body.admin-dashboard-active .admin-team-row,
  body.admin-dashboard-active .admin-upcoming-row {
    min-height: 48px;
    flex-wrap: wrap;
  }

  .modal-overlay .modal-card {
    max-height: calc(100dvh - 20px) !important;
  }

  .routine-item-input-row,
  .routine-direct-item-row {
    min-width: 0;
  }

  .weekly-plan-fields {
    flex-direction: column !important;
  }

  .btn-weekly-plan-submit {
    width: 100%;
    min-height: 40px;
  }

  .btn-weekly-popup-day {
    width: 38px !important;
    height: 38px !important;
  }
}

/* ============================================================
   KPI 2.0: 수량형 / 진행률형 항목별 관리
   ============================================================ */
#dashboard-view .kpi-create-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(220px, 1.5fr) minmax(170px, 0.75fr) auto;
  align-items: stretch;
  gap: 9px;
}

#dashboard-view .kpi-create-form.is-progress-type {
  grid-template-columns: minmax(140px, 0.55fr) minmax(220px, 1.5fr) auto;
}

#dashboard-view .kpi-type-select,
#dashboard-view .kpi-target-field {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--wm-line-strong);
  border-radius: 9px;
  color: var(--wm-ink);
  background: var(--wm-surface-soft);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
}

#dashboard-view .kpi-type-select {
  padding: 0 34px 0 12px;
  cursor: pointer;
}

#dashboard-view .kpi-target-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

#dashboard-view .kpi-target-field[hidden] {
  display: none !important;
}

#dashboard-view .kpi-target-field > span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

#dashboard-view .goal-add-form .kpi-target-field input {
  width: 100%;
  height: 34px;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#dashboard-view .weekly-goal-card .kpi-create-form {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

#dashboard-view .weekly-goal-card .kpi-create-form.is-progress-type {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

#dashboard-view .weekly-goal-card .kpi-create-form button {
  width: 100%;
}

#dashboard-view .kpi-goal-item {
  display: flex;
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
}

#dashboard-view .kpi-goal-item.achieved {
  border-color: #a7dfc7;
  background: #f2fbf7;
}

#dashboard-view .kpi-goal-heading,
#dashboard-view .kpi-goal-title-wrap,
#dashboard-view .kpi-goal-footer,
#dashboard-view .kpi-value-control {
  display: flex;
  min-width: 0;
  align-items: center;
}

#dashboard-view .kpi-goal-heading,
#dashboard-view .kpi-goal-footer {
  justify-content: space-between;
  gap: 12px;
}

#dashboard-view .kpi-goal-title-wrap {
  flex: 1 1 auto;
  gap: 8px;
}

#dashboard-view .kpi-title-edit-input {
  min-width: 120px;
  min-height: 35px;
  flex: 1 1 auto;
  padding: 0 10px;
  border: 1px solid #86cdb1;
  border-radius: 8px;
  color: var(--wm-ink);
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

#dashboard-view .kpi-title-edit-input[hidden],
#dashboard-view .goal-item-title[hidden],
#dashboard-view .kpi-title-cancel-btn[hidden] {
  display: none !important;
}

#dashboard-view .kpi-type-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 0.64rem;
  font-weight: 850;
}

#dashboard-view .kpi-type-badge.progress {
  color: #6d28d9;
  background: #ede9fe;
}

#dashboard-view .kpi-goal-percent {
  flex: 0 0 auto;
  color: #047857;
  font-size: 0.98rem;
}

#dashboard-view .kpi-value-control {
  flex: 1 1 auto;
  gap: 8px;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 750;
}

#dashboard-view .kpi-value-control > span,
#dashboard-view .kpi-value-control > em {
  flex: 0 0 auto;
  font-style: normal;
  white-space: nowrap;
}

#dashboard-view .kpi-value-control input[type="number"] {
  width: 94px;
  min-height: 35px;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid var(--wm-line-strong);
  border-radius: 8px;
  color: var(--wm-ink);
  background: #fff;
  font: inherit;
}

#dashboard-view .kpi-progress-control input[type="range"] {
  min-width: 90px;
  height: 6px;
  flex: 1 1 180px;
  padding: 0;
  border: 0;
  accent-color: var(--wm-green);
  background: transparent;
}

#dashboard-view .kpi-progress-control input[type="number"] {
  width: 66px;
}

#dashboard-view .kpi-value-save-btn,
#dashboard-view .kpi-title-edit-btn,
#dashboard-view .kpi-title-cancel-btn {
  min-width: 48px;
  height: 33px;
  padding: 0 10px;
  border: 1px solid #a7dfc7;
  border-radius: 8px;
  color: #047857;
  background: #effaf5;
  font-size: 0.69rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

#dashboard-view .kpi-value-save-btn:hover,
#dashboard-view .kpi-title-edit-btn:hover {
  color: #fff;
  border-color: var(--wm-green);
  background: var(--wm-green);
}

#dashboard-view .kpi-title-cancel-btn {
  color: #64748b;
  border-color: var(--wm-line-strong);
  background: #fff;
}

#dashboard-view .kpi-goal-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

#dashboard-view .kpi-goal-footer .goal-delete-btn {
  width: auto;
  min-width: 48px;
  height: 33px;
  padding: 0 10px;
  color: #dc2626;
  border: 1px solid #fecaca;
  background: #fff7f7;
}

#dashboard-view .calendar-goals-content {
  display: block;
}

#dashboard-view .calendar-kpi-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  width: 100%;
}

#dashboard-view .calendar-kpi-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  padding: 9px 11px;
}

#dashboard-view .calendar-kpi-chip-title {
  overflow: hidden;
  min-width: 0;
  color: var(--wm-ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard-view .calendar-kpi-chip strong {
  color: #047857;
}

#dashboard-view .calendar-kpi-mini-track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

#dashboard-view .calendar-kpi-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #34d399);
}

#dashboard-view .calendar-kpi-more {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  color: #047857;
  cursor: pointer;
}

body.admin-dashboard-active .admin-dashboard-kpi-tabs {
  margin-bottom: 8px;
}

body.admin-dashboard-active .admin-dashboard-task-tabs button {
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.admin-dashboard-active .admin-dashboard-task-tabs button:not(.active):hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
}

body.admin-dashboard-active .admin-dashboard-task-tabs button:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

body.admin-dashboard-active .admin-dashboard-kpi-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #059669, #0f8f68);
  box-shadow: 0 3px 9px rgba(5, 150, 105, 0.28);
  transform: translateY(-1px);
}

body.admin-dashboard-active .admin-dashboard-team-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

body.admin-dashboard-active .admin-dashboard-team-tabs button.active span {
  color: #7f1d1d;
  background: #fff;
}

body.admin-dashboard-active .admin-dashboard-kpi-list[hidden] {
  display: none !important;
}

body.admin-dashboard-active .admin-dashboard-kpi-list {
  gap: 6px;
  max-height: 150px !important;
}

body.admin-dashboard-active .admin-kpi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 8px 10px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fbfcfd;
}

body.admin-dashboard-active .admin-kpi-row-main {
  min-width: 0;
}

body.admin-dashboard-active .admin-kpi-row-main strong,
body.admin-dashboard-active .admin-kpi-row-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-dashboard-active .admin-kpi-row-main strong {
  color: #1e293b;
  font-size: 0.7rem;
}

body.admin-dashboard-active .admin-kpi-row-main small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.58rem;
}

body.admin-dashboard-active .admin-kpi-row-value {
  align-self: center;
  color: #047857;
  font-size: 0.78rem;
}

body.admin-dashboard-active .admin-kpi-row-track {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

@media (max-width: 760px) {
  #dashboard-view .kpi-create-form,
  #dashboard-view .weekly-goal-card .kpi-create-form {
    grid-template-columns: 1fr;
  }

  #dashboard-view .kpi-goal-heading,
  #dashboard-view .kpi-goal-footer {
    align-items: stretch;
  }

  #dashboard-view .kpi-goal-footer {
    flex-direction: column;
  }

  #dashboard-view .kpi-progress-control {
    flex-wrap: wrap;
  }

  #dashboard-view .kpi-progress-control input[type="range"] {
    flex-basis: calc(100% - 58px);
  }

  #dashboard-view .kpi-goal-footer .goal-delete-btn {
    width: 100%;
  }

  #dashboard-view .kpi-goal-actions {
    width: 100%;
  }

  #dashboard-view .kpi-goal-actions > button {
    flex: 1 1 0;
  }
}
