:root {
  --gold: #be844d;
  --copper: #8c5e33;
  --cream: #f5ebe2;
  --sand: #f2e6db;
  --ink: #262626;
  --muted: #6b625b;
  --surface: #ffffff;
  --bg: #f8f3ee;
  --app-bg: #d6e7f4;
  --surface-color: #ffffff;
  --surface-soft-color: #edf6fc;
  --border-color: rgba(38, 38, 38, 0.12);
  --shadow-color: rgba(38, 38, 38, 0.08);
  --primary-brand: #ed6a3d;
  --hover-brand: #000000;
  --text-color: var(--ink);
  --heading-color: var(--ink);
  --subheading-color: var(--muted);
  --app-font: Georgia, Arial, sans-serif;
  --line: var(--border-color);
  --green: #10b981;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 8px 22px var(--shadow-color);
  --shadow-sm: 0 2px 8px var(--shadow-color);
  --sidebar-width: clamp(220px, 18vw, 300px);
  --sidebar-viewport-height: 100vh;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--app-bg);
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  width: 100%;
  color: var(--text-color);
  background: var(--app-bg);
  font-family: var(--app-font);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

body:has(.app-shell) {
  max-width: none;
}

body.is-locked .app-shell {
  display: none;
}

#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: clamp(22px, 5vw, 72px);
  place-items: center;
  background: var(--app-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#auth-gate[hidden] {
  display: none;
}

#branding-onboarding-gate {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: grid;
  min-height: 100dvh;
  padding: clamp(22px, 5vw, 72px);
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--app-bg) 92%, white), color-mix(in srgb, var(--surface-color) 88%, var(--app-bg))),
    var(--app-bg);
  overflow-y: auto;
}

#branding-onboarding-gate[hidden] {
  display: none;
}

body.is-onboarding .app-shell {
  pointer-events: none;
  user-select: none;
}

.auth-card {
  display: grid;
  width: min(520px, 100%);
  gap: 22px;
  align-self: start;
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.onboarding-card {
  display: grid;
  width: min(620px, 100%);
  gap: 18px;
  padding: clamp(22px, 3.2vw, 34px);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 54px rgba(38, 38, 38, 0.16);
}

.onboarding-intro {
  display: grid;
  gap: 4px;
}

.onboarding-card h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 38px);
  line-height: 1.05;
}

.onboarding-card p {
  margin: 0;
}

.onboarding-form {
  display: grid;
  gap: 16px;
}

.onboarding-progress {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  background: color-mix(in srgb, var(--primary-brand) 7%, var(--surface-soft-color));
  border: 1px solid color-mix(in srgb, var(--primary-brand) 18%, var(--line));
  border-radius: 10px;
}

.onboarding-progress div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.onboarding-progress strong {
  color: var(--heading-color);
  font-size: 14px;
}

.onboarding-progress span {
  color: var(--subheading-color);
  font-size: 13px;
  font-weight: 800;
}

.onboarding-progress i {
  display: block;
  height: 6px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-color) 76%, var(--primary-brand));
  border-radius: 999px;
}

.onboarding-progress i span {
  display: block;
  height: 100%;
  background: var(--primary-brand);
  border-radius: inherit;
}

.onboarding-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-soft-color) 62%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.onboarding-section h3 {
  margin: 0 0 2px;
  font-size: 20px;
}

.onboarding-logo-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.onboarding-logo-preview,
.onboarding-logo-empty {
  display: grid;
  width: 150px;
  height: 96px;
  place-items: center;
  padding: 10px;
  color: var(--subheading-color);
  background: var(--surface-color);
  border: 1px dashed var(--line);
  border-radius: 8px;
  object-fit: contain;
  text-align: center;
  font-weight: 800;
}

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

.onboarding-actions .btn,
.onboarding-actions .secondary-btn {
  min-width: 150px;
}

.auth-card h1 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 48px);
}

.auth-card p {
  margin: 12px 0 0;
}

.auth-logo {
  display: block;
  max-width: 150px;
  max-height: 72px;
  margin-bottom: 20px;
  object-fit: contain;
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.password-field {
  position: relative;
  display: block;
}

.password-field .field {
  width: 100%;
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--text-color);
  background: transparent;
  border: 0;
  border-radius: 8px;
  line-height: 1;
  opacity: 0.68;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle:hover {
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 12%, transparent);
  opacity: 1;
  transform: translateY(-50%);
}

.auth-submit {
  margin-top: 4px;
}

.auth-switch {
  width: fit-content;
  padding: 0;
  color: var(--primary-brand);
  background: transparent;
  border: 0;
  font-weight: 800;
  text-align: left;
}

.auth-switch:hover {
  color: var(--hover-brand);
}

.team-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.team-form .btn {
  align-self: end;
}

.account-badge {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 7px 8px 7px 12px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.account-badge strong,
.account-badge span {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-badge span {
  color: var(--text-color);
  font-size: 12px;
}

:where(
  .wp-site-blocks,
  .site,
  .site-content,
  .content-area,
  .entry-content,
  .wp-block-post-content,
  .wp-block-html,
  .wp-block-group,
  .wp-block-cover,
  .elementor,
  .elementor-section,
  .elementor-container,
  .elementor-widget-container,
  .container,
  .wrap
):has(.app-shell) {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

:where(.entry-content, .wp-block-post-content, .wp-block-html, .elementor-widget-container):has(.app-shell) {
  overflow: visible !important;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--app-font);
  color: var(--heading-color);
  line-height: 1.12;
}

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

button {
  cursor: pointer;
  font-family: var(--app-font);
}

.app-shell {
  display: block;
  width: 100vw;
  max-width: 100vw;
  min-height: var(--sidebar-viewport-height);
  height: var(--sidebar-viewport-height);
  max-height: var(--sidebar-viewport-height);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: calc(50% - 50vw);
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-height: var(--sidebar-viewport-height);
  height: var(--sidebar-viewport-height);
  max-height: var(--sidebar-viewport-height);
  padding: 28px calc(20px + 0.5cm);
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.brand-kicker,
.eyebrow,
.label {
  color: var(--subheading-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand h1 {
  margin-top: 0;
  margin-bottom: 26px;
  font-size: 31px;
}

.brand p {
  margin: 12px 0 28px;
  color: var(--text-color);
}

.nav {
  display: grid;
  gap: 3px;
}

.project-sidebar-panel {
  display: grid;
  gap: 8px;
  margin: 6px 0 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface-color) 94%, white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--heading-color);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--shadow-color) 50%, transparent);
}

.sidebar-project-back {
  display: none;
  grid-template-columns: 20px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 7px 9px;
  background: color-mix(in srgb, var(--surface-soft-color) 92%, white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--heading-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-project-back-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-1px);
}

#sidebar-project-back-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-back-project-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  justify-self: end;
  place-items: center;
}

.sidebar-project-back-project-icon .project-sidebar-icon {
  width: 28px;
  height: 28px;
}

.sidebar-project-back:hover {
  background: color-mix(in srgb, var(--primary-brand) 14%, var(--surface-soft-color));
  color: var(--hover-color);
  transform: translateX(-2px);
}

.project-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: 13px;
  font-weight: 900;
}

.project-sidebar-add {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--primary-brand);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.project-sidebar-add:hover {
  background: color-mix(in srgb, var(--primary-brand) 12%, transparent);
  color: var(--hover-color);
}

.project-sidebar-list {
  display: grid;
  gap: 3px;
}

.project-sidebar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 4px;
  border-radius: 7px;
  transition: background 150ms ease;
}

.project-sidebar-row:hover,
.project-sidebar-row.active {
  background: color-mix(in srgb, var(--primary-brand) 14%, var(--surface-soft-color));
}

.project-sidebar-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 4px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.project-sidebar-row:hover .project-sidebar-item,
.project-sidebar-row.active .project-sidebar-item {
  background: transparent;
  color: var(--heading-color);
}

.project-sidebar-edit {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--subheading-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transition: opacity 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.project-sidebar-row:hover .project-sidebar-edit,
.project-sidebar-edit:focus-visible {
  opacity: 1;
}

.project-sidebar-edit:hover {
  background: color-mix(in srgb, var(--primary-brand) 14%, transparent);
  color: var(--primary-brand);
  transform: translateY(-1px);
}

.project-sidebar-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  overflow: hidden;
  background: var(--project-icon-bg);
  border-radius: 5px;
  color: var(--project-icon-fg);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.project-sidebar-icon svg,
.home-project-icon svg,
.project-appearance-icon svg,
.project-icon-choice svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-sidebar-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-mark {
  display: block;
  width: 62px;
  align-self: flex-start;
  margin-top: auto;
  margin-right: 0;
  margin-bottom: clamp(22px, 3vh, 44px);
  margin-left: 0;
  opacity: 0.88;
  transition: transform 0.18s ease, opacity 0.18s ease;
  transform-origin: left center;
}

.sidebar-mark:hover {
  opacity: 1;
  transform: scale(1.06);
}

.sidebar-mark svg {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--heading-color);
}

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

.nav-item {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-color);
  font-size: 15px;
  text-align: left;
  font-weight: 800;
}

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

.sidebar.has-project-menu .sidebar-project-back {
  display: grid;
}

.sidebar.has-project-menu .project-sidebar-panel,
.sidebar.has-project-menu .nav-item:not(.project-nav-item) {
  display: none;
}

.sidebar.has-project-menu .project-nav-item {
  display: block;
}

.sidebar.has-project-menu .nav {
  gap: 1px;
}

.sidebar.has-project-menu .project-nav-item {
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.2;
}

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

.sidebar.is-admin .admin-nav-item {
  display: block;
}

.top-level-card {
  display: grid;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.top-level-card .dashboard-widget {
  min-height: 0;
}

.effort-page {
  display: grid;
  gap: 16px;
  max-width: 1260px;
  margin: 0 auto;
  padding: 4px 0 28px;
  color: #334155;
  font-family: "Open Sans", Arial, sans-serif;
}

.effort-breadcrumb {
  color: #8a98a8;
  font-size: 13px;
  font-weight: 600;
}

.effort-breadcrumb strong {
  color: #1f2937;
}

.effort-page-title {
  margin: 0;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.05;
}

.effort-tabs {
  display: flex;
  gap: 26px;
  padding-left: 24px;
  border-bottom: 1px solid #d7e0e8;
}

.effort-tab {
  position: relative;
  padding: 0 0 9px;
  background: transparent;
  border: 0;
  color: #657386;
  cursor: pointer;
  font: 800 13px "Open Sans", Arial, sans-serif;
}

.effort-tab.active {
  color: #172033;
}

.effort-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #0b7fd3;
  border-radius: 999px 999px 0 0;
}

.effort-top-grid {
  display: grid;
  grid-template-columns: 315px minmax(680px, 760px);
  gap: 16px;
  align-items: start;
}

.effort-calendar-card,
.effort-form-card,
.effort-table-card {
  background: #ffffff;
  border: 1px solid #dbe3eb;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.effort-calendar-card {
  padding: 24px 24px 26px;
}

.effort-calendar-nav {
  display: grid;
  grid-template-columns: 24px 24px 1fr 24px 24px;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.effort-calendar-nav h3 {
  margin: 0;
  color: #536174;
  font: 800 19px "Open Sans", Arial, sans-serif;
  text-align: center;
}

.effort-calendar-control {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #0472c9;
  cursor: pointer;
  font: 900 21px/1 "Open Sans", Arial, sans-serif;
  transition: transform 160ms ease, color 160ms ease;
}

.effort-calendar-control:hover {
  color: #005a9e;
  transform: translateY(-1px);
}

.effort-calendar-labels,
.effort-calendar-week {
  display: grid;
  grid-template-columns: 33px repeat(7, 1fr);
  align-items: center;
  gap: 4px;
}

.effort-calendar-labels {
  margin-bottom: 12px;
  color: #5c6a7a;
  font: 800 12px "Open Sans", Arial, sans-serif;
  text-align: center;
}

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

.effort-calendar-kw {
  color: #4c5d70;
  font: 800 13px "Open Sans", Arial, sans-serif;
  text-align: center;
}

.effort-calendar-day {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  justify-self: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #657386;
  cursor: pointer;
  font: 700 13px "Open Sans", Arial, sans-serif;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.effort-calendar-day:hover {
  background: #e5f1ff;
  color: #005a9e;
  transform: translateY(-1px);
}

.effort-calendar-day.weekend {
  background: #eef2f6;
  color: #7b8794;
}

.effort-calendar-day.today {
  background: #d7dce2;
  color: #ffffff;
}

.effort-calendar-day.has-time {
  background: #a8d79d;
  color: #ffffff;
}

.effort-calendar-day.selected {
  background: #ffffff;
  color: #0284c7;
  box-shadow: inset 0 0 0 3px #20a7e4;
}

.effort-calendar-day.muted {
  opacity: 0.55;
}

.effort-form-card {
  overflow: visible;
}

.effort-form-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(240px, 0.8fr);
  gap: 12px 20px;
  padding: 24px 24px 22px;
  align-items: start;
}

.effort-form-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.effort-form-grid label > span,
.effort-form-row > span {
  color: #738095;
  font: 600 13px "Open Sans", Arial, sans-serif;
}

.effort-form-grid .field {
  min-height: 30px;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid #cdd6df;
  border-radius: 0;
  color: #1f2937;
  font: 600 13px "Open Sans", Arial, sans-serif;
}

.effort-inline-select {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 8px;
  align-items: center;
}

.effort-template-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  background: color-mix(in srgb, #0b7fd3 8%, #ffffff);
  border: 1px solid #cdd6df;
  border-radius: 4px;
  color: #0070c0;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.effort-template-icon:hover {
  background: #0b7fd3;
  border-color: #0b7fd3;
  color: #ffffff;
  transform: translateY(-1px);
}

.effort-template-icon svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.effort-template-form {
  display: grid;
  gap: 14px;
}

.effort-template-form label {
  display: grid;
  gap: 6px;
}

.effort-template-form .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.effort-date-duration {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 80px;
  gap: 14px;
  align-items: end;
}

.effort-date-duration label {
  display: grid;
  gap: 4px;
}

.effort-date-duration span {
  color: #738095;
  font: 600 13px "Open Sans", Arial, sans-serif;
}

.effort-date-input,
.effort-duration-input,
.effort-highlight-field,
.effort-task-type {
  background: #fff3cd !important;
}

.effort-task-type {
  border-color: #4b5563 !important;
}

.effort-form-footer {
  padding: 12px 28px 14px;
  border-top: 1px solid #e4ebf2;
}

.effort-save {
  min-height: 28px;
  padding: 0 34px;
  border-radius: 2px;
  background: #006fc9;
  font: 800 13px "Open Sans", Arial, sans-serif;
}

@media (max-width: 1240px) {
  .effort-top-grid {
    grid-template-columns: 315px minmax(0, 1fr);
  }

  .effort-form-grid {
    grid-template-columns: 1fr;
  }

  .effort-date-duration {
    max-width: 320px;
  }
}

.effort-table-card {
  padding: 18px 16px 16px;
}

.effort-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: #6b7280;
  font: 600 13px "Open Sans", Arial, sans-serif;
}

.effort-table-view {
  width: 28px;
  height: 24px;
  background: #ffffff;
  border: 1px solid #cdd6df;
  border-radius: 3px;
  color: #0070c0;
  cursor: pointer;
}

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

.effort-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #415166;
  font: 600 12px "Open Sans", Arial, sans-serif;
}

.effort-table th {
  padding: 8px 10px;
  border-bottom: 2px solid #cbd5df;
  border-right: 1px solid #d8e1ea;
  color: #6b7280;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.effort-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ccd6df;
  border-right: 1px solid #d8e1ea;
  background: #f6f8fa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.effort-table th:last-child,
.effort-table td:last-child {
  border-right: 0;
}

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

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

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

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

.effort-table th:nth-child(5),
.effort-table td:nth-child(5) {
  width: 116px;
}

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

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

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

.effort-table th:nth-child(9),
.effort-table td:nth-child(9) {
  width: 92px;
}

.effort-row-actions {
  width: 88px;
  background: #f6f8fa !important;
  text-align: right;
  white-space: nowrap;
}

.effort-row-actions button {
  width: 26px;
  height: 24px;
  margin-left: 4px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #cdd6df;
  border-radius: 4px;
  color: #0070c0;
  cursor: pointer;
  font: 900 15px/1 "Open Sans", Arial, sans-serif;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}

.effort-row-actions button:hover {
  border-color: #0070c0;
  color: #005a9e;
  transform: translateY(-1px);
}

.effort-row-actions button[data-effort-delete] {
  color: #b91c1c;
}

.effort-row-actions button[data-effort-delete]:hover {
  border-color: #fca5a5;
  background: #fff1f2;
}

.effort-empty-row {
  padding: 18px 10px !important;
  color: #7b8794;
  text-align: center;
}

.nav-icon {
  display: inline-block;
  width: 20px;
  margin-right: 6px;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  background: var(--primary-brand);
  color: white;
}

.home-page {
  display: grid;
  gap: 18px;
  min-height: calc(100dvh - 190px);
  place-items: start center;
  padding-top: clamp(10px, 2vw, 28px);
}

.home-task-card {
  width: min(100%, 1180px);
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 10px;
  border-bottom: 1px solid var(--line);
}

.home-task-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-task-avatar {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  object-fit: cover;
  background: color-mix(in srgb, var(--primary-brand) 18%, white 82%);
  border-radius: 999px;
  color: var(--primary-brand);
  font-family: var(--app-font);
  font-size: 14px;
  font-weight: 900;
}

.home-task-title h3 {
  margin: 0;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: 21px;
  line-height: 1.1;
}

.home-task-title h3 span {
  color: var(--subheading-color);
  font-size: 13px;
}

.home-task-menu {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 14px;
  line-height: 1;
}

.home-task-menu:hover {
  background: var(--surface-soft-color);
  border-color: var(--primary-brand);
}

.home-task-create-row {
  padding: 12px 24px 8px;
  border-bottom: 1px solid var(--line);
}

.home-task-create-row .dashboard-task-create {
  background: transparent;
  border-color: transparent;
  color: var(--text-color);
  padding-left: 0;
}

.home-task-create-row .dashboard-task-create:hover {
  background: transparent;
  border-color: transparent;
  color: var(--primary-brand);
}

.home-task-card .dashboard-task-toolbar {
  position: relative;
  margin: 0;
  padding: 0 24px;
  overflow: visible;
  justify-content: flex-start;
  gap: 18px;
}

.home-task-card .dashboard-task-tabs {
  flex: 0 0 auto;
}

.home-task-card .dashboard-task-list {
  max-height: 430px;
  padding: 0 24px 4px;
}

.home-task-card .dashboard-task-row {
  min-height: 36px;
}

.home-task-filter-menu {
  position: relative;
  flex: 0 0 auto;
}

.home-task-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  color: var(--text-color);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease;
}

.home-task-filter-button:hover,
.home-task-filter-button.active,
.home-task-filter-menu.open .home-task-filter-button {
  color: var(--primary-brand);
  background: transparent;
}

.home-task-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  width: min(360px, calc(100vw - 56px));
  padding: 14px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.home-task-filter-menu.open .home-task-filter-dropdown {
  display: grid;
  gap: 12px;
}

.home-task-filter {
  display: grid;
  gap: 6px;
  min-width: 100%;
}

.home-task-filter > span {
  color: var(--subheading-color);
  font-family: var(--app-font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-task-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  color: var(--text-color);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.home-task-filter-option:hover {
  background: var(--surface-soft-color);
}

.home-task-filter-option.selected {
  color: var(--primary-brand);
}

.home-task-filter-option span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--primary-brand);
  border: 1px solid color-mix(in srgb, var(--primary-brand) 54%, var(--line));
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
}

.home-task-filter-option.selected span {
  background: color-mix(in srgb, var(--primary-brand) 14%, transparent);
}

.home-task-filter select {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 32px;
  padding: 5px 30px 5px 10px;
  color: var(--text-color);
  background: color-mix(in srgb, var(--surface-soft-color) 82%, white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.home-task-filter select:hover,
.home-task-filter select:focus {
  border-color: color-mix(in srgb, var(--primary-brand) 42%, transparent);
  outline: none;
}

.home-toolbar-task-create {
  margin-left: auto;
}

.dashboard-task-title-block {
  min-width: 0;
}

.dashboard-task-title-block small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--subheading-color);
  font-family: var(--app-font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-toggle,
.home-project-toggle {
  width: fit-content;
  margin: 8px 24px 18px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--primary-brand);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 13px;
  font-weight: 800;
}

.home-task-toggle:hover,
.home-project-toggle:hover {
  color: var(--hover-brand);
}

.home-project-card {
  width: min(100%, 1180px);
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 4px;
}

.home-project-head > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-project-head h3 {
  margin: 0;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: 22px;
  line-height: 1.1;
}

.home-project-head span {
  color: var(--subheading-color);
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: 800;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 26px;
  padding: 18px 34px 28px;
}

.home-project-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-project-item:hover {
  background: var(--surface-soft-color);
  color: var(--heading-color);
  transform: translateY(-1px);
}

.home-project-icon,
.home-project-create-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  background: var(--project-icon-bg);
  color: var(--project-icon-fg);
  font-family: var(--app-font);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.home-project-create-icon {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--text-color);
  font-size: 24px;
}

.home-project-item.create {
  color: var(--subheading-color);
}

.project-appearance-form {
  display: grid;
  gap: 18px;
}

.project-appearance-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-appearance-preview > div {
  display: grid;
  gap: 2px;
}

.project-appearance-preview strong {
  color: var(--heading-color);
  font-size: 18px;
}

.project-appearance-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 auto;
  background: var(--project-icon-bg);
  border-radius: 12px;
  color: var(--project-icon-fg);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.project-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  gap: 8px;
  margin-top: 8px;
}

.project-icon-choice {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.project-icon-choice:hover,
.project-icon-choice.active {
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-soft-color));
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

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

.compact-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.workspace {
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  height: var(--sidebar-viewport-height);
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: clamp(14px, 1.35vw, 24px) clamp(18px, 2.4vw, 44px);
  background: color-mix(in srgb, var(--app-bg) 92%, white 8%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h2 {
  font-size: 34px;
}

.topbar h2.is-dashboard-greeting {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 16px;
  font-size: 28px;
  line-height: 1.08;
}

.dashboard-heading-date {
  color: var(--text-color);
  font-family: var(--app-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.82;
}

.topbar h2.is-dashboard-greeting strong {
  color: var(--heading-color);
  font: inherit;
}

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

.account-button {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: var(--heading-color);
  background: transparent;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  font-weight: 900;
}

.account-button:hover {
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  box-shadow: none;
  transform: translateY(-2px) scale(1.02);
}

.account-button-avatar,
.account-drawer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: white;
  background: var(--primary-brand);
  border-radius: 999px;
  object-fit: cover;
}

.account-button-avatar {
  font-size: 15px;
  width: 54px;
  height: 54px;
  color: var(--heading-color);
  background: color-mix(in srgb, var(--surface-soft-color) 80%, white);
  border-radius: 999px;
  object-fit: cover;
  image-rendering: auto;
}

img.account-button-avatar {
  background: transparent;
}

.account-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(38, 38, 38, 0.34);
  backdrop-filter: blur(2px);
}

.account-drawer-backdrop[hidden] {
  display: none;
}

.account-drawer {
  width: min(380px, 100vw);
  height: 100%;
  overflow-y: auto;
  background: var(--surface-color);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 42px rgba(38, 38, 38, 0.18);
  animation: drawerIn 0.2s ease-out;
}

@keyframes drawerIn {
  from {
    transform: translateX(24px);
    opacity: 0.72;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.account-drawer-head {
  display: flex;
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.account-drawer-body {
  display: grid;
  gap: 11px;
  padding: 14px 18px;
}

.account-drawer-profile {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.account-drawer-avatar {
  width: 66px;
  height: 66px;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

.account-photo-upload {
  position: relative;
  overflow: hidden;
}

.account-photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.account-drawer-info {
  text-align: center;
}

.account-drawer-info h4 {
  margin: 0;
  color: var(--heading-color);
  font-size: 18px;
}

.account-drawer-info p {
  margin: 5px 0 0;
  color: var(--text-color);
  font-size: 13px;
}

.account-drawer-info span {
  display: inline-flex;
  margin-top: 9px;
  padding: 5px 9px;
  color: var(--subheading-color);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-drawer-actions {
  display: grid;
  gap: 8px;
}

.account-drawer-message {
  padding: 12px 14px;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-weight: 800;
}

.account-profile-form {
  display: grid;
  gap: 11px;
  padding: 14px;
  background: color-mix(in srgb, var(--primary-brand) 7%, var(--surface-soft-color));
  border: 1px solid color-mix(in srgb, var(--primary-brand) 18%, var(--line));
  border-radius: 10px;
}

.account-profile-form[hidden] {
  display: none;
}

.account-profile-form.is-compact .field {
  min-height: 42px;
  padding: 9px 11px;
  background: color-mix(in srgb, var(--surface-color) 92%, white);
}

.account-profile-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-profile-form .label {
  margin-bottom: 4px;
  color: var(--subheading-color);
}

.account-profile-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.account-profile-form-actions .btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

.account-drawer hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.account-drawer-logout {
  background: #fee2e2;
  color: #991b1b;
}

.view {
  display: none;
  width: 100%;
  padding: clamp(18px, 2.2vw, 42px) clamp(18px, 2.4vw, 48px) clamp(42px, 4vw, 72px);
}

.brand-logo,
.dashboard-logo {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 72px;
  object-fit: contain;
}

.brand-logo {
  margin-bottom: 24px;
}

.dashboard-logo {
  margin: 0 auto 16px;
}

.brand-logo[hidden],
.dashboard-logo[hidden] {
  display: none;
}

.view.active {
  display: block;
}

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

.cols-2 {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.cols-1-3 {
  grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr);
}

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

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

.cols-3-1 {
  grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
}

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

.panel,
.card {
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  font-size: 25px;
}

.panel-body {
  padding: 22px;
}

.card {
  padding: 18px;
}

.kpi {
  border-left: 4px solid var(--primary-brand);
}

.kpi.danger {
  border-left-color: var(--red);
}

.kpi-value {
  margin-top: 6px;
  font-family: var(--app-font);
  color: var(--heading-color);
  font-size: 40px;
  font-weight: 800;
}

.muted,
.kpi-detail {
  color: var(--text-color);
}

.goal-card {
  margin-bottom: 22px;
  padding: 22px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.project-summary {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 20px 58px 22px;
  background: var(--surface-soft-color);
  border-radius: 8px;
  text-align: center;
}

.project-summary-head {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.project-summary h3 {
  margin-top: 6px;
  font-size: 30px;
}

.project-leader-preview {
  margin-top: 6px;
  color: var(--text-color);
  font-family: var(--app-font);
  font-size: 20px;
  font-weight: 700;
}

.project-summary p {
  margin: 12px 0 0;
  max-width: 820px;
  color: var(--text-color);
  font-size: 16px;
}

.edit-project {
  position: absolute;
  top: 16px;
  right: 16px;
}

.dashboard-export {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 20px 22px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.dashboard-export h3 {
  margin-top: 4px;
  font-size: 24px;
}

.dashboard-export p {
  margin: 6px 0 0;
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 12px;
}

.dashboard-widget {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 220ms ease;
}

.dashboard-widget:hover {
  box-shadow: var(--shadow-md);
}

.dashboard-widget.is-dragging {
  opacity: 0.55;
  transform: scale(0.985);
}

.dashboard-widget.is-drop-target {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-brand) 22%, transparent), var(--shadow-md);
}

.dashboard-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
}

.dashboard-widget-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  font-size: 18px;
}

.dashboard-widget-title-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--primary-brand);
}

.dashboard-widget-title-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.dashboard-widget-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-widget .edit-project {
  position: static;
}

.dashboard-widget-drag {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--subheading-color);
  cursor: grab;
  font-weight: 900;
  letter-spacing: -0.22em;
  user-select: none;
}

.dashboard-widget-body {
  flex: 1;
  padding: 12px;
}

.dashboard-project-widget {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-project-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.dashboard-project-logo-box {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary-brand) 8%, white);
  border-radius: 10px;
}

.dashboard-project-logo-box span {
  color: var(--primary-brand);
  font-size: 42px;
  font-weight: 900;
}

.dashboard-project-widget .dashboard-logo {
  width: 100%;
  max-width: 92px;
  max-height: 92px;
  margin: 0;
  object-fit: contain;
}

.dashboard-project-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dashboard-project-widget h4 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.dashboard-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 12%, white);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-project-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--primary-brand);
  border-radius: 999px;
}

.dashboard-project-goal-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  color: var(--primary-brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-project-widget p {
  max-width: 440px;
  margin: 7px 0 0;
  color: var(--text-color);
  line-height: 1.35;
  font-size: 14px;
}

.dashboard-project-footer {
  display: grid;
  grid-template-columns: minmax(112px, 0.72fr) minmax(112px, 0.72fr) minmax(210px, 1.56fr);
  gap: 10px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dashboard-project-fact {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.dashboard-project-fact:not(:first-child) {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.dashboard-project-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary-brand);
  font-size: 17px;
}

.dashboard-project-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-project-fact em,
.dashboard-project-fact strong {
  display: block;
}

.dashboard-project-fact em {
  color: var(--primary-brand);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-project-fact strong {
  overflow: hidden;
  color: var(--heading-color);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary-brand) 14%, white);
  border-radius: 999px;
  color: var(--primary-brand);
  font-size: 12px;
  font-weight: 900;
  object-fit: cover;
}

.dashboard-project-avatar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-empty-avatar {
  background: var(--surface-color);
  border: 1px solid var(--line);
  color: var(--muted);
}

.dashboard-project-leader em {
  color: var(--text-color);
  text-transform: none;
}

.dashboard-project-leader span {
  min-width: 0;
}

.dashboard-kpi-grid {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-kpi-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 90px;
  padding: 10px 12px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-kpi-tile.danger {
  --kpi-accent: var(--red);
}

.dashboard-kpi-tile:not(.danger) {
  --kpi-accent: var(--primary-brand);
}

.dashboard-kpi-ring {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background:
    radial-gradient(circle closest-side, var(--surface-soft-color) 70%, transparent 72%),
    conic-gradient(var(--kpi-accent) var(--kpi-ring), color-mix(in srgb, var(--kpi-accent) 12%, var(--surface-color)) 0);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kpi-accent) 18%, transparent);
}

.dashboard-kpi-ring strong {
  color: var(--heading-color);
  font-size: 19px;
  line-height: 1;
}

.dashboard-kpi-tile .label,
.dashboard-kpi-tile small {
  grid-column: 2;
}

.dashboard-kpi-tile .label {
  align-self: end;
}

.dashboard-kpi-tile small {
  align-self: start;
  color: var(--text-color);
}

.dashboard-progress {
  display: block;
  height: 6px;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary-brand) 14%, var(--surface-color));
  border-radius: 999px;
}

.dashboard-progress b {
  display: block;
  height: 100%;
  background: var(--primary-brand);
  border-radius: inherit;
}

.dashboard-calendar {
  display: grid;
  gap: 9px;
  padding: 10px 2px 4px;
  background: var(--surface-color);
}

.dashboard-calendar-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dashboard-calendar-month {
  margin: 0;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

.dashboard-calendar-today {
  min-height: 28px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 5px;
  color: #334155;
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 12px;
}

.dashboard-calendar-header-controls .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 5px;
  font-family: var(--app-font);
}

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

.dashboard-calendar-labels {
  color: #334155;
  font-family: var(--app-font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.dashboard-calendar-grid {
  display: grid;
  gap: 6px;
}

.dashboard-calendar-kw {
  display: grid;
  place-items: center;
  color: #64748b;
  font-family: var(--app-font);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-calendar-day {
  position: relative;
  display: grid;
  min-height: 29px;
  align-content: center;
  justify-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #1f2937;
  font-family: var(--app-font);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.dashboard-calendar-day:hover {
  transform: none;
  color: var(--primary-brand);
}

.dashboard-calendar-day span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
}

.dashboard-calendar-day.today span {
  background: transparent;
  border: 2px solid #5aa7ff;
  color: #1f2937;
}

.dashboard-calendar-day.weekend:not(.today) span {
  background: #e1e7ee;
  color: #475569;
}

.dashboard-calendar-day.muted-day {
  opacity: 0.5;
}

.dashboard-calendar-day.has-events:not(.today) span {
  color: #334155;
}

.dashboard-calendar-day.has-events:not(.today)::after {
  content: none;
}

.dashboard-calendar-day i,
.dashboard-calendar-legend {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.dashboard-calendar-day b,
.dashboard-calendar-legend b,
.dashboard-day-event span {
  display: inline-block;
  width: 0;
  height: 0;
  border-radius: 999px;
}

.dashboard-calendar-day b.appointment,
.dashboard-calendar-legend b.appointment,
.dashboard-day-event.appointment span {
  background: var(--primary-brand);
}

.dashboard-calendar-day b.milestone,
.dashboard-calendar-legend b.milestone,
.dashboard-day-event.milestone span {
  background: #7c3aed;
  border-radius: 2px;
  transform: rotate(45deg);
}

.dashboard-calendar-day b.absence,
.dashboard-calendar-legend b.absence,
.dashboard-day-event.absence span {
  background: #0ea5e9;
}

.dashboard-calendar-legend {
  color: var(--text-color);
  font-size: 11px;
}

.dashboard-effort-chart {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 200px;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 44px 10px 10px;
  overflow: visible;
}

.dashboard-effort-donut {
  position: relative;
  display: grid;
  width: min(168px, 100%);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  overflow: visible;
  background: var(--effort-chart-gradient,
    conic-gradient(
      var(--primary-brand) 0 var(--effort-progress),
      color-mix(in srgb, var(--primary-brand) 14%, var(--surface-soft-color)) var(--effort-progress) 100%
    ));
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-brand) 14%, transparent), var(--shadow-sm);
}

.dashboard-effort-donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  background: var(--surface-color);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dashboard-effort-donut strong,
.dashboard-effort-value-label {
  position: relative;
  z-index: 1;
  line-height: 1;
  text-align: center;
}

.dashboard-effort-donut strong {
  align-self: end;
  color: var(--heading-color);
  font-size: 34px;
  font-weight: 800;
}

.dashboard-effort-value-label {
  align-self: start;
  margin-top: 8px;
  color: var(--subheading-color);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-effort-segment-label {
  position: absolute;
  z-index: 3;
  display: block;
  min-width: 30px;
  padding: 1px 3px;
  background: color-mix(in srgb, var(--surface-color) 82%, transparent);
  border-radius: 999px;
  color: var(--heading-color);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.dashboard-effort-segment-line {
  position: absolute;
  z-index: 2;
  display: block;
  width: 22px;
  height: 1px;
  background: color-mix(in srgb, var(--heading-color) 72%, transparent);
  transform-origin: center;
  pointer-events: none;
}

.dashboard-effort-panel {
  display: grid;
  gap: 9px;
}

.dashboard-effort-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 10px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.dashboard-effort-stat span {
  color: var(--subheading-color);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-effort-stat strong {
  color: var(--heading-color);
  font-size: 16px;
  white-space: nowrap;
}

.dashboard-effort-panel p {
  margin: 4px 0 0;
  color: var(--text-color);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-effort-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 2px;
  padding: 7px 9px;
  color: var(--text-color);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.dashboard-effort-toggle:hover {
  background: color-mix(in srgb, var(--primary-brand) 9%, var(--surface-soft-color));
  border-color: color-mix(in srgb, var(--primary-brand) 24%, var(--line));
}

.dashboard-effort-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary-brand);
}

.dashboard-effort-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dashboard-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 8px;
  border-bottom: 1px solid var(--line);
}

.dashboard-task-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 0;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary-brand) 48%, transparent) transparent;
}

.dashboard-task-tabs::-webkit-scrollbar {
  height: 6px;
}

.dashboard-task-tabs::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary-brand) 48%, transparent);
  border-radius: 999px;
}

.dashboard-task-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 0 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-task-tab.active,
.dashboard-task-tab:hover {
  background: transparent;
  border-color: transparent;
  color: var(--primary-brand);
}

.dashboard-task-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--primary-brand);
  border-radius: 999px;
}

.dashboard-task-list {
  display: grid;
  max-height: 236px;
  overflow: auto;
  gap: 0;
  padding-right: 4px;
}

.dashboard-task-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 31px;
  padding: 5px 3px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text-color);
  text-align: left;
  cursor: pointer;
  transition: opacity 520ms ease, transform 520ms ease, background 180ms ease;
}

.dashboard-task-row:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
  background: var(--surface-soft-color);
}

.dashboard-task-row.is-completing {
  opacity: 0;
  transform: translateX(18px);
}

.dashboard-task-row strong {
  display: block;
  overflow: hidden;
  font-family: var(--app-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-check {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  color: var(--text-color);
  font-family: var(--app-font);
  font-size: 10px;
  line-height: 1;
}

.dashboard-task-check:hover::before {
  content: "✓";
}

.dashboard-task-check::before {
  content: "";
  width: 7px;
  height: 4px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: scaleX(-1) rotate(45deg) translate(-1px, -1px);
}

.dashboard-task-check.is-done {
  background: var(--primary-brand);
  border-color: var(--primary-brand);
}

.dashboard-task-check.is-done::before {
  border-color: white;
}

.dashboard-task-check:hover::before {
  content: "";
  border-color: currentColor;
}

.dashboard-task-check.is-done:hover::before {
  border-color: white;
}

.dashboard-task-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 240px;
}

.dashboard-task-project {
  display: inline-flex;
  align-items: center;
  min-width: 116px;
  max-width: 160px;
  height: 24px;
  padding: 2px 24px 2px 8px;
  background: color-mix(in srgb, var(--surface-soft-color) 78%, white);
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: hidden;
  color: var(--subheading-color);
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.dashboard-task-project:hover,
.dashboard-task-project:focus {
  border-color: color-mix(in srgb, var(--primary-brand) 26%, transparent);
  outline: none;
}

.dashboard-task-project-select {
  display: inline-flex;
  width: 152px;
  height: 24px;
  padding: 2px 24px 2px 8px;
  overflow: hidden;
  color: var(--subheading-color);
  background: color-mix(in srgb, var(--surface-soft-color) 78%, white);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-project-select:hover,
.dashboard-task-project-select:focus {
  border-color: color-mix(in srgb, var(--primary-brand) 26%, transparent);
  outline: none;
}

.task-priority {
  padding: 3px 7px;
  border-radius: 999px;
  font-family: var(--app-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.dashboard-task-meta em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 90px;
  color: var(--text-color);
  font-family: var(--app-font);
  font-size: 12px;
  font-style: normal;
}

.dashboard-task-meta em::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid #6b7280;
  border-top-width: 3px;
  border-radius: 2px;
}

.dashboard-task-delete {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: color-mix(in srgb, var(--text-color) 62%, transparent);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-task-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-task-delete:hover,
.dashboard-task-delete:focus-visible {
  background: color-mix(in srgb, #ff4d4f 12%, var(--surface-soft-color));
  border-color: color-mix(in srgb, #ff4d4f 28%, transparent);
  color: #a51616;
  outline: none;
  transform: translateY(-1px);
}

.dashboard-task-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  min-height: 28px;
  margin: 0 0 6px;
  padding: 6px 12px;
  background: var(--primary-brand);
  border: 1px solid var(--primary-brand);
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-family: var(--app-font);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.dashboard-widget-actions .dashboard-task-create {
  margin: 0;
}

.dashboard-task-create:hover {
  background: var(--hover-brand);
  border-color: var(--hover-brand);
  color: #ffffff;
}

.dashboard-task-create span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.team-page {
  display: grid;
  gap: 18px;
}

.team-page-head {
  max-width: 780px;
  justify-self: center;
  margin-bottom: 18px;
  text-align: center;
}

.team-page-head h2 {
  color: var(--heading-color);
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.05;
}

.team-page-head .label {
  color: var(--heading-color);
  font-size: 18px;
  font-weight: 900;
}

.team-section h2 {
  color: var(--heading-color);
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.08;
}

.team-page-head p {
  margin: 8px auto 0;
  max-width: 620px;
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.45;
}

.team-section {
  display: grid;
  align-content: start;
  gap: 12px;
}

.team-role-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.team-role-column-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.team-role-empty {
  display: grid;
  height: 148px;
  box-sizing: border-box;
  margin: 0;
  align-items: center;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft-color) 58%, transparent);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .team-role-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-member-card {
  display: grid;
  min-height: 148px;
  height: 148px;
  align-content: center;
  justify-items: center;
  position: relative;
  padding: 16px 13px 14px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.team-member-edit {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft-color) 72%, white);
  color: var(--heading-color);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.team-member-card:hover .team-member-edit,
.team-member-edit:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.team-member-edit:hover {
  background: color-mix(in srgb, var(--primary-brand) 16%, white);
  color: var(--primary-brand);
}

.team-member-edit svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.team-member-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--primary-brand) 12%, white);
  border-radius: 999px;
  color: var(--primary-brand);
  font-size: 22px;
  font-weight: 900;
}

.team-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member-copy h3 {
  margin: 7px 0 0;
  color: var(--heading-color);
  font-family: var(--app-font);
  font-size: 15px;
  line-height: 1.15;
}

.team-member-copy p {
  margin: 3px 0 0;
  color: var(--text-color);
  font-size: 13px;
  line-height: 1.28;
}

.team-member-copy small {
  display: block;
  margin-top: 3px;
  color: var(--text-color);
  font-size: 11px;
  line-height: 1.28;
  opacity: 0.78;
}

.team-member-copy small a {
  color: inherit;
  text-decoration: none;
}

.team-member-copy small a:hover {
  color: var(--primary-brand);
  text-decoration: underline;
}

.team-member-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.team-member-actions .field {
  min-height: 34px;
  height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.team-member-actions .icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  color: #a11212;
  background: #ffe1e1;
}

.team-member-actions .icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.project-role-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.project-role-drawer {
  display: grid;
  width: min(420px, 100vw);
  max-width: 100%;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
  overflow-y: auto;
  background: var(--surface-color);
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.18);
  animation: drawer-in 0.22s ease-out;
}

.project-role-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-role-drawer-head h3 {
  margin: 2px 0 0;
  color: var(--heading-color);
  font-size: 24px;
}

.project-role-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft-color);
}

.project-role-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-brand) 12%, white);
  color: var(--primary-brand);
  font-size: 20px;
  font-weight: 900;
}

.project-role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-role-profile strong,
.project-role-profile small {
  display: block;
}

.project-role-profile strong {
  color: var(--heading-color);
  font-size: 17px;
}

.project-role-profile small {
  margin-top: 3px;
  color: var(--text-color);
  font-size: 13px;
  opacity: 0.74;
}

.project-role-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.project-role-option {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft-color);
  color: var(--heading-color);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.project-role-option:hover,
.project-role-option.active {
  border-color: color-mix(in srgb, var(--primary-brand) 55%, var(--line));
  background: color-mix(in srgb, var(--primary-brand) 12%, var(--surface-soft-color));
  color: var(--primary-brand);
}

.project-role-option:hover {
  transform: translateY(-1px);
}

.project-role-option strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-brand) 14%, white);
  color: var(--primary-brand);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-role-remove {
  min-height: 46px;
  border: 1px solid color-mix(in srgb, #b91c1c 18%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, #ef4444 12%, white);
  color: #991b1b;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.project-role-remove:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.project-team-assignment-card {
  display: grid;
  gap: 10px;
}

.project-team-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) auto;
  gap: 14px;
  align-items: end;
}

.project-team-form .btn {
  min-height: 52px;
  white-space: nowrap;
}

.project-team-empty {
  margin: 0;
}

.activities-page {
  display: grid;
  gap: 18px;
}

.activities-grid {
  display: grid;
  gap: 14px;
}

.activity-project-card {
  display: grid;
  gap: 14px;
}

.activity-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activity-project-head h3 {
  margin: 2px 0 0;
  font-size: clamp(22px, 2vw, 30px);
}

.activity-project-count {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft-color);
  color: var(--text-color);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.activity-project-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-project-edit {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft-color);
  color: var(--heading-color);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.activity-project-edit:hover {
  background: color-mix(in srgb, var(--primary-brand) 14%, white);
  color: var(--primary-brand);
  transform: translateY(-1px);
}

.activity-project-edit svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.project-pt-drawer {
  grid-template-rows: auto 1fr;
  align-content: start;
}

.project-pt-drawer-head {
  padding: 18px 20px;
}

.project-pt-drawer-body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
}

.project-pt-summary,
.project-pt-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft-color);
}

.project-pt-summary strong {
  display: block;
  color: var(--heading-color);
  font-size: 22px;
  line-height: 1.1;
}

.project-pt-summary p,
.project-pt-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.project-pt-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.project-pt-field-row .field {
  min-height: 48px;
  height: 48px;
  font-size: 18px;
  font-weight: 800;
}

.project-pt-field-row .field::placeholder {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.project-pt-unit {
  display: grid;
  min-width: 54px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-color);
  color: var(--heading-color);
  font-weight: 900;
  font-size: 14px;
}

.project-pt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.project-pt-actions .btn {
  width: auto;
  min-height: 40px;
  padding: 0 18px;
}

.project-pt-actions .btn.secondary {
  border: 1px solid var(--line);
  background: var(--surface-color);
  color: var(--heading-color);
}

.activity-add-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.activity-add-form.is-disabled {
  opacity: 0.72;
}

.activity-add-form.is-disabled .field,
.activity-add-form.is-disabled .btn {
  cursor: not-allowed;
}

.activity-budget-note {
  margin: -2px 0 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, #b91c1c 22%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, #fee2e2 72%, var(--surface-soft-color));
  color: #991b1b;
  font-size: 14px;
  font-weight: 800;
}

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

.activity-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, 160px) minmax(140px, 180px) minmax(210px, 300px) 38px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft-color);
}

.activity-row-main {
  display: grid;
  gap: 6px;
}

.activity-days-field {
  display: grid;
  gap: 6px;
}

.activity-color-field {
  display: grid;
  gap: 6px;
}

.activity-color-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.activity-color-input {
  text-transform: uppercase;
}

.activity-color-swatch {
  width: 42px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.activity-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.activity-color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.activity-permission-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  align-self: end;
  height: 40px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-color);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.activity-permission-button:hover,
.activity-permission-button:focus-visible {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-brand) 14%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.activity-permission-button span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--subheading-color);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.activity-permission-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft-color);
  color: var(--heading-color);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.activity-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(3px);
}

.activity-drawer {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: clamp(360px, 30vw, 460px);
  height: 100dvh;
  overflow: hidden;
  background: var(--surface-color);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.18);
  animation: drawer-in 0.22s ease-out;
}

.activity-drawer-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.activity-drawer-head h3 {
  margin: 4px 0 0;
  color: var(--heading-color);
  font-size: 24px;
  line-height: 1.12;
}

.activity-drawer-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

.activity-drawer-summary {
  display: grid;
  gap: 7px;
  padding: 18px 22px;
  background: var(--surface-soft-color);
  border-bottom: 1px solid var(--line);
}

.activity-drawer-summary span {
  color: var(--subheading-color);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.activity-drawer-summary strong {
  color: var(--heading-color);
  font-size: 18px;
}

.activity-drawer-summary p {
  margin: 0;
  color: var(--text-color);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.76;
}

.activity-drawer-body {
  min-height: 0;
  padding: 16px 22px 22px;
  overflow: auto;
}

.activity-drawer-list {
  display: grid;
  gap: 8px;
}

@keyframes drawer-in {
  from {
    opacity: 0.82;
    transform: translateX(34px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.activity-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.activity-member-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-color);
}

.activity-member-option input {
  margin-top: 2px;
}

.activity-member-option strong,
.activity-member-option small {
  display: block;
  line-height: 1.25;
}

.activity-member-option small {
  margin-top: 2px;
  color: var(--text-color);
  font-size: 11px;
  opacity: 0.68;
}

.activity-members-empty {
  margin: 0;
}

.activity-delete {
  display: grid;
  align-self: end;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin-bottom: 2px;
  color: var(--heading-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.activity-delete:hover,
.activity-delete:focus-visible {
  color: #991b1b;
  background: #fff5f5;
  border-color: #fecaca;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.task-priority.low {
  background: #dcfce7;
  color: #166534;
}

.task-priority.medium {
  background: #fef3c7;
  color: #92400e;
}

.task-priority.high {
  background: #ffedd5;
  color: #9a3412;
}

.task-priority.critical {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-empty {
  margin: 18px 0 0;
  color: var(--text-color);
}

.dashboard-day-details {
  display: grid;
  gap: 10px;
}

.dashboard-day-event {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-day-event small {
  display: block;
  margin-top: 3px;
  color: var(--text-color);
}

.org-export-preview {
  max-height: 58vh;
  overflow: auto;
  background: var(--app-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.org-export-page {
  position: relative;
  width: 100%;
  min-height: 620px;
  padding: 24px;
  box-sizing: border-box;
  background: var(--app-bg);
  color: var(--text-color);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.org-export-kicker {
  color: var(--subheading-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.org-export-header {
  display: flex;
  min-height: 28px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.org-export-logo {
  width: auto;
  max-width: 140px;
  max-height: 42px;
  object-fit: contain;
}

.org-export-page h1 {
  margin: 8px 0 6px;
  font-size: 32px;
}

.org-export-page p {
  margin: 0 0 20px;
  max-width: 850px;
  color: var(--text-color);
  font-size: 14px;
}

.org-title-page {
  display: grid;
  min-height: 620px;
  align-content: center;
  padding: 42px 56px;
}

.org-title-brand {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--subheading-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.org-title-content {
  width: min(860px, 100%);
  margin: 0 auto;
  text-align: center;
}

.org-title-logo {
  display: block;
  width: auto;
  max-width: 220px;
  max-height: 90px;
  margin: 0 auto 26px;
  object-fit: contain;
}

.org-title-content h1 {
  margin: 0;
  color: var(--heading-color);
  font-size: 46px;
  line-height: 1.04;
}

.org-title-content p {
  margin: 22px auto 0;
  max-width: 760px;
  color: var(--text-color);
  font-size: 17px;
  line-height: 1.5;
}

.org-title-leader {
  margin-top: 26px;
  color: var(--text-color);
  font-family: var(--app-font);
  font-size: 22px;
  font-weight: 700;
}

.org-export-root,
.org-export-node {
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.org-export-root {
  width: min(380px, 100%);
  margin: 0 auto;
  padding: 14px 18px;
  text-align: center;
  border-top: 4px solid var(--primary-brand);
}

.org-export-root strong,
.org-export-node strong {
  display: block;
  color: var(--heading-color);
  font-size: 16px;
}

.org-export-node strong {
  min-height: 0;
  line-height: 1.2;
}

.org-export-root span,
.org-export-root small,
.org-export-node span,
.org-export-node small {
  display: block;
  margin-top: 4px;
  color: var(--text-color);
}

.org-export-rows {
  display: grid;
  gap: 24px;
}

.org-export-connector {
  height: 58px;
}

.org-export-lines {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.org-export-lines path {
  fill: none;
  stroke: var(--primary-brand);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: square;
}

.org-export-children {
  display: grid;
  grid-template-columns: repeat(var(--org-columns, 4), minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.org-export-phase {
  display: grid;
  grid-template-rows: auto 16px auto;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.org-export-node {
  position: relative;
  min-width: 0;
  padding: 13px 14px;
  border-top: 3px solid var(--primary-brand);
}

.org-export-ap-connector {
  width: 2px;
  height: 16px;
  margin: 0 auto;
  background: var(--primary-brand);
}

.org-export-ap-list {
  display: grid;
  gap: 6px;
  padding-top: 0;
}

.org-export-ap-node,
.org-export-ap-empty {
  position: relative;
  min-width: 0;
  padding: 6px 8px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(38, 38, 38, 0.04);
}

.org-export-ap-node strong,
.org-export-ap-node span,
.org-export-ap-node small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.org-export-ap-node strong {
  color: var(--subheading-color);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-export-ap-node span {
  margin-top: 2px;
  color: var(--text-color);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.org-export-ap-node small,
.org-export-ap-empty {
  margin-top: 2px;
  color: var(--text-color);
  font-size: 10px;
}

.org-export-code {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: rgba(140, 94, 51, 0.68);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.org-export-root strong,
.org-export-root span,
.org-export-root small,
.org-export-node strong,
.org-export-node span,
.org-export-node small {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.org-export-empty {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--text-color);
  background: var(--surface-color);
  border-radius: 8px;
}

.org-export-page + .org-export-page {
  margin-top: 22px;
}

.org-export-page-number {
  position: absolute;
  right: 24px;
  bottom: 18px;
  color: var(--text-color);
  font-size: 12px;
  font-weight: 800;
}

.print-document {
  display: none;
}

.pptx-capture {
  position: fixed;
  left: -200vw;
  top: 0;
  width: 1320px;
  background: var(--app-bg);
  pointer-events: none;
}

.pptx-capture .org-export-page {
  width: 1320px;
  min-height: 760px;
  margin: 0;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.field,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: var(--surface-color);
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.field:focus,
textarea:focus {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 3px rgba(190, 132, 77, 0.18);
}

.field.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.settings-card {
  display: grid;
  gap: 4px;
}

.branding-color-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.color-picker-field {
  position: relative;
}

.color-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.color-preview {
  width: 42px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.color-picker-popover {
  position: absolute;
  right: 0;
  z-index: 80;
  width: 300px;
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.color-picker-title {
  margin: 8px 0 6px;
  color: var(--subheading-color);
  font-size: 12px;
  font-weight: 800;
}

.color-picker-title:first-child {
  margin-top: 0;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.color-swatch {
  width: 23px;
  height: 23px;
  padding: 0;
  border: 1px solid rgba(38, 38, 38, 0.16);
  border-radius: 3px;
  box-shadow: none;
}

.color-swatch:hover {
  outline: 2px solid var(--hover-brand);
  outline-offset: 1px;
}

.color-picker-empty {
  grid-column: 1 / -1;
  color: var(--text-color);
  font-size: 12px;
}

.color-picker-more {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  color: var(--text-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
}

.color-picker-more:hover {
  color: white;
  background: var(--hover-brand);
}

.color-picker-custom {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.color-picker-native {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-color);
}

.color-picker-live {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.settings-logo-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  align-items: end;
}

.settings-logo-preview,
.settings-logo-empty {
  display: grid;
  width: 100%;
  height: 96px;
  margin-bottom: 10px;
  place-items: center;
  object-fit: contain;
  color: var(--text-color);
  background: var(--surface-color);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.settings-logo-preview {
  padding: 10px;
}

.settings-button-preview {
  padding: 14px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.color-settings-card,
.typography-card {
  background: var(--surface-soft-color);
}

.settings-error {
  padding: 10px 12px;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 8px;
  font-weight: 800;
}

.btn,
.icon-btn {
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.btn {
  min-height: 40px;
  padding: 10px 14px;
  background: var(--primary-brand);
  color: white;
}

.btn:hover {
  background: var(--hover-brand);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-light {
  background: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--line);
}

.btn-light:hover {
  background: var(--hover-brand);
  color: white;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.btn-danger:hover {
  background: var(--red);
  color: white;
}

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

.icon-btn {
  width: 34px;
  height: 34px;
  background: rgba(38, 38, 38, 0.06);
  color: var(--text-color);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.settings-button {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.edit-subproject:hover,
.edit-phase:hover,
.edit-appointment:hover,
.edit-project:hover,
.add-appointment:hover,
.add-subproject:hover,
.add-phase-goal:hover,
.settings-button:hover {
  color: white;
  background: var(--hover-brand);
  box-shadow: 0 6px 16px rgba(190, 132, 77, 0.28);
  transform: translateY(-1px);
}

.icon-btn-danger {
  color: #991b1b;
  background: #fee2e2;
}

.icon-btn-danger:hover {
  color: white;
  background: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 18px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phase-goals {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.work-packages {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phase-goal-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr) 34px;
  gap: 16px;
  align-items: end;
}

.work-package-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 2fr) minmax(110px, 0.7fr) 34px;
  gap: 16px;
  align-items: end;
}

.phase-goal-row .remove-phase-goal {
  width: 34px;
  height: 34px;
  align-self: end;
  margin-bottom: 3px;
  color: #991b1b;
  background: transparent;
  font-size: 17px;
  box-shadow: none;
}

.work-package-row .remove-work-package {
  width: 34px;
  height: 34px;
  align-self: end;
  margin-bottom: 3px;
  color: #991b1b;
  background: transparent;
  font-size: 17px;
  box-shadow: none;
}

.work-package-row .remove-work-package:hover {
  color: white;
  background: var(--red);
  transform: none;
  box-shadow: none;
}

.work-package-balance {
  margin: -4px 0 0;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
}

.work-package-balance.is-error {
  color: var(--text-color);
}

.phase-goal-row .remove-phase-goal:hover {
  color: white;
  background: var(--red);
  transform: none;
  box-shadow: none;
}

.badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.gold {
  background: var(--cream);
  color: var(--copper);
}

.badge.green {
  background: #dcfce7;
  color: #166534;
}

.badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.badge.gray {
  background: rgba(38, 38, 38, 0.07);
  color: rgba(38, 38, 38, 0.72);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-color);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.sharepoint-header,
.sharepoint-connect-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.sharepoint-user {
  display: flex;
  gap: 14px;
  align-items: center;
}

.sharepoint-avatar,
.sharepoint-user img {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--surface-soft-color);
}

.sharepoint-avatar {
  display: grid;
  place-items: center;
  color: var(--heading-color);
  font-weight: 800;
}

.sharepoint-user img {
  object-fit: cover;
}

.sharepoint-connect-card .sharepoint-connect {
  min-width: 190px;
  white-space: nowrap;
}

.sharepoint-info-card {
  display: grid;
  gap: 18px;
}

.sharepoint-info-status {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sharepoint-dropzone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  min-height: 96px;
  padding: 16px 18px;
  border: 1.5px dashed var(--border-color);
  border-radius: 8px;
  background: var(--surface-soft-color);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.sharepoint-dropzone:hover,
.sharepoint-dropzone.is-dragging {
  border-color: var(--primary-brand);
  background: color-mix(in srgb, var(--surface-soft-color) 78%, var(--primary-brand) 22%);
  transform: translateY(-1px);
}

.sharepoint-drop-icon {
  grid-row: span 3;
  color: var(--primary-brand);
  font-size: 28px;
  font-weight: 800;
}

.sharepoint-dropzone h3,
.sharepoint-dropzone p,
.sharepoint-dropzone .muted {
  margin: 0;
}

.sharepoint-upload-actions {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}

.sharepoint-progress {
  height: 10px;
  overflow: hidden;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sharepoint-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary-brand);
  transition: width 0.18s ease;
}

.file-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}

.file-name-button {
  padding: 0;
  color: var(--heading-color);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.file-name-button:hover {
  color: var(--hover-brand);
}

.file-type-icon {
  display: inline-grid;
  position: relative;
  width: 30px;
  height: 34px;
  flex: 0 0 30px;
  padding-top: 11px;
  place-items: center;
  color: white;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(38, 38, 38, 0.16);
}

.file-type-icon:not(.file-icon-folder)::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.72);
  border-bottom-left-radius: 3px;
  content: "";
}

.file-icon-word {
  background: linear-gradient(135deg, #2b579a, #2563eb);
}

.file-icon-excel {
  background: linear-gradient(135deg, #107c41, #16a34a);
}

.file-icon-pdf {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.file-icon-ppt {
  background: linear-gradient(135deg, #c43e1c, #f97316);
}

.file-icon-folder {
  width: 34px;
  height: 26px;
  flex-basis: 34px;
  margin-top: 0;
  padding: 0;
  background: linear-gradient(180deg, #ffd76a, #f4b942);
  border-radius: 4px 4px 5px 5px;
  box-shadow: inset 0 -1px 0 rgba(124, 74, 22, 0.16), 0 1px 2px rgba(38, 38, 38, 0.12);
}

.file-icon-folder::before {
  position: absolute;
  top: -6px;
  left: 3px;
  width: 16px;
  height: 8px;
  background: #f7c948;
  border-radius: 4px 4px 0 0;
  content: "";
}

.file-icon-default {
  background: var(--primary-brand);
}

.file-row {
  cursor: grab;
}

.file-row:active {
  cursor: grabbing;
}

.file-row.is-dragging-file {
  opacity: 0.55;
}

.folder-row.is-folder-drop {
  outline: 2px solid var(--primary-brand);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--surface-soft-color) 78%, var(--primary-brand) 22%);
}

.compact-field {
  width: 150px;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

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

  .phase-plan-grid {
    --phase-info-width: 200px;
    grid-template-columns: var(--phase-info-width) minmax(620px, 1fr);
    min-width: 820px;
  }

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

  .compact-field {
    width: 100%;
  }
}

th {
  background: var(--surface-soft-color);
  color: rgba(38, 38, 38, 0.58);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.matrix {
  display: grid;
  grid-template-columns: 34px repeat(5, minmax(42px, 1fr));
  gap: 4px;
}

.axis {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(38, 38, 38, 0.5);
  font-size: 12px;
}

.matrix-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  padding: 5px;
  color: white;
  font-weight: 800;
  opacity: 0.36;
}

.matrix-cell.has {
  opacity: 1;
}

.matrix-cell.green-cell {
  background: var(--green);
}

.matrix-cell.amber-cell {
  background: var(--amber);
  color: #241400;
}

.matrix-cell.red-cell {
  background: var(--red);
}

.matrix-count {
  display: flex;
  height: calc(100% - 16px);
  align-items: center;
  justify-content: center;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 26px;
}

.org-node {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
}

.org-children {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid rgba(190, 132, 77, 0.45);
}

.psp-builder {
  min-height: calc(100dvh - 180px);
}

.psp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.psp-layout.is-editing {
  grid-template-columns: minmax(0, 3fr) minmax(400px, 1fr);
}

.psp-builder-head {
  align-items: flex-start;
  gap: 18px;
}

.psp-builder-head h3 {
  margin-bottom: 2px;
}

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

.psp-history-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 4px;
}

.psp-history-btn {
  color: var(--subheading-color);
  background: var(--surface-soft-color);
}

.psp-history-btn:not(:disabled):hover {
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-soft-color));
  transform: translateY(-1px);
}

.psp-history-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.psp-zoom-value {
  display: inline-flex;
  min-width: 54px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.psp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 0;
}

.psp-meta-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.psp-meta-bubbles span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  color: var(--text-color);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.psp-canvas-viewport {
  min-height: 620px;
  max-height: min(760px, calc(100dvh - 250px));
  overflow: auto;
  margin: 18px 22px 22px;
  padding: 28px;
  background:
    linear-gradient(color-mix(in srgb, var(--line) 62%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 62%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 32%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 32%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--surface-soft-color) 72%, var(--surface-color));
  background-size: 48px 48px, 48px 48px, 12px 12px, 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  cursor: grab;
}

.psp-canvas-viewport.is-panning {
  cursor: grabbing;
}

.psp-canvas-content {
  display: grid;
  width: max-content;
  min-width: 100%;
  gap: 22px;
  zoom: var(--psp-zoom);
}

.psp-root-drop {
  display: grid;
  min-height: 42px;
  width: min(560px, 100%);
  margin: 0 auto;
  place-items: center;
  color: var(--subheading-color);
  background: color-mix(in srgb, var(--surface-color) 78%, transparent);
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.76;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.psp-tree {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  padding: 4px 10px 36px;
}

.psp-project-root {
  position: relative;
  display: flex;
  min-width: 100%;
  flex-direction: column;
  align-items: center;
}

.psp-root,
.psp-child,
.psp-node-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.psp-node-wrapper {
  min-width: 250px;
  box-sizing: border-box;
  transition: padding 0.35s ease-in-out, transform 0.35s ease-in-out;
}

.psp-node-card {
  position: relative;
  display: grid;
  width: 250px;
  min-height: 112px;
  gap: 8px;
  align-content: center;
  padding: 16px 14px 44px;
  color: var(--text-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary-brand);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  user-select: none;
  transition: transform 0.35s ease-in-out, box-shadow 0.35s ease-in-out, border-color 0.35s ease-in-out, opacity 0.35s ease-in-out;
}

.psp-view-transitioning::view-transition-group(*) {
  animation-duration: 0.68s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.psp-view-transitioning::view-transition-old(*),
.psp-view-transitioning::view-transition-new(*) {
  animation-duration: 0.68s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.psp-quick-add {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.psp-quick-add-btn {
  position: absolute;
  display: block;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  font-size: 0;
  opacity: 1;
  padding: 0;
  pointer-events: auto;
  transform: scale(1);
  transition: opacity 0.22s ease-in-out, transform 0.22s ease-in-out, background 0.22s ease-in-out, box-shadow 0.22s ease-in-out, filter 0.22s ease-in-out;
}

.psp-quick-add-btn::before,
.psp-quick-add-btn::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: #8b80ff;
  border-radius: 999px;
  content: "";
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: width 0.2s ease-in-out, height 0.2s ease-in-out, opacity 0.2s ease-in-out, background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.psp-quick-add-btn::before {
  width: 8px;
  height: 8px;
  opacity: 0.68;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface-color) 88%, transparent);
}

.psp-quick-add-btn::after {
  width: 15px;
  height: 2.5px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.psp-quick-add-btn:hover,
.psp-quick-add-btn:focus-visible {
  background: linear-gradient(135deg, #6d66f2, #4f46e5);
  border: 3px solid var(--surface-color);
  box-shadow: 0 0 0 1px rgba(91, 85, 214, 0.18), 0 10px 22px rgba(79, 70, 229, 0.24);
}

.psp-quick-add-btn:hover::before,
.psp-quick-add-btn:focus-visible::before {
  width: 15px;
  height: 2.5px;
  background: #fff;
  opacity: 1;
  box-shadow: none;
}

.psp-quick-add-btn:hover::after,
.psp-quick-add-btn:focus-visible::after {
  background: #fff;
  opacity: 1;
}

.psp-quick-add-btn:hover,
.psp-quick-add-btn:focus-visible {
  background: linear-gradient(135deg, #5b55d6, #3730a3);
  box-shadow: 0 0 0 6px rgba(91, 85, 214, 0.12), 0 14px 28px rgba(79, 70, 229, 0.32);
  filter: saturate(1.08);
}

.psp-quick-add-btn.is-top {
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
}

.psp-quick-add-btn.is-top:focus-visible {
  transform: translateX(-50%);
}

.psp-quick-add-btn.is-top:hover {
  transform: translateX(-50%) scale(1.06);
}

.psp-quick-add-btn.is-bottom {
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
}

.psp-quick-add-btn.is-bottom:focus-visible {
  transform: translateX(-50%);
}

.psp-quick-add-btn.is-bottom:hover {
  transform: translateX(-50%) scale(1.06);
}

.psp-quick-add-btn.is-left {
  top: 50%;
  left: -18px;
  transform: translateY(-50%);
}

.psp-quick-add-btn.is-left:focus-visible {
  transform: translateY(-50%);
}

.psp-quick-add-btn.is-left:hover {
  transform: translateY(-50%) scale(1.06);
}

.psp-quick-add-btn.is-right {
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
}

.psp-quick-add-btn.is-right:focus-visible {
  transform: translateY(-50%);
}

.psp-quick-add-btn.is-right:hover {
  transform: translateY(-50%) scale(1.06);
}

.psp-selection-handles {
  position: absolute;
  inset: 0;
  z-index: 7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.psp-node-card.is-selected .psp-selection-handles {
  opacity: 1;
}

.psp-selection-handles span {
  position: absolute;
  background: #8b80ff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface-color) 86%, transparent);
  opacity: 0.16;
  transition: opacity 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.psp-selection-handles .is-top,
.psp-selection-handles .is-bottom {
  left: 50%;
  width: 58px;
  height: 3px;
  transform: translateX(-50%);
}

.psp-selection-handles .is-top {
  top: -6px;
}

.psp-selection-handles .is-bottom {
  bottom: -6px;
}

.psp-selection-handles .is-left,
.psp-selection-handles .is-right {
  top: 50%;
  width: 3px;
  height: 58px;
  transform: translateY(-50%);
}

.psp-selection-handles .is-left {
  left: -6px;
}

.psp-selection-handles .is-right {
  right: -6px;
}

.psp-builder.is-dragging .psp-node-card .psp-selection-handles {
  opacity: 0;
}

.psp-builder.is-dragging .psp-node-card.is-dragging .psp-selection-handles {
  opacity: 0 !important;
}

.psp-builder.is-dragging .psp-node-card.is-dragging .psp-quick-add-btn {
  opacity: 0 !important;
  pointer-events: none;
}

.psp-builder.is-dragging .psp-node-card .psp-quick-add-btn {
  pointer-events: none;
}

.psp-builder.is-dragging .psp-node-wrapper.is-drop-active > .psp-node-card .psp-selection-handles {
  opacity: 1;
}

.psp-builder.is-dragging .psp-node-wrapper.is-drop-active > .psp-node-card .psp-selection-handles span {
  opacity: 0.16;
}

.psp-builder.is-dragging .psp-node-wrapper.is-drop-before > .psp-node-card .psp-selection-handles .is-top,
.psp-builder.is-dragging .psp-node-wrapper.is-drop-after > .psp-node-card .psp-selection-handles .is-bottom,
.psp-builder.is-dragging .psp-node-wrapper.is-drop-left > .psp-node-card .psp-selection-handles .is-left,
.psp-builder.is-dragging .psp-node-wrapper.is-drop-right > .psp-node-card .psp-selection-handles .is-right {
  background: #4f46e5;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface-color) 90%, transparent), 0 0 0 5px rgba(79, 70, 229, 0.12);
  opacity: 1;
}

.psp-card-drop-zone {
  position: absolute;
  z-index: 6;
  display: none;
  pointer-events: none;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 0.22s ease-in-out, border-color 0.22s ease-in-out, box-shadow 0.22s ease-in-out;
}

.psp-builder.is-dragging .psp-card-drop-zone {
  display: block;
  pointer-events: auto;
}

.psp-card-drop-zone.is-top {
  top: 0;
  right: 0;
  left: 0;
  height: 32%;
}

.psp-card-drop-zone.is-bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: 32%;
}

.psp-card-drop-zone.is-left {
  top: 32%;
  bottom: 32%;
  left: 0;
  width: 50%;
}

.psp-card-drop-zone.is-right {
  top: 32%;
  right: 0;
  bottom: 32%;
  width: 50%;
}

.psp-project-card {
  width: 320px;
  min-height: 118px;
  text-align: center;
  cursor: default;
}

.psp-project-card h4 {
  font-size: 20px;
}

.psp-project-card .psp-node-actions {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.psp-node-card:hover {
  box-shadow: var(--shadow);
}

.psp-node-card.is-selected {
  border-color: color-mix(in srgb, var(--primary-brand) 70%, var(--line));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary-brand) 18%, transparent), var(--shadow);
}

.psp-node-card.is-dragging {
  opacity: 0.28;
  transform: scale(0.96);
}

.psp-node-card.is-subtree-dragging {
  opacity: 0.32;
  filter: saturate(0.75);
  transform: scale(0.98);
}

.psp-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.24);
  transform-origin: top left;
  transition: none;
}

.psp-is-pointer-dragging {
  cursor: grabbing;
}

.psp-drag-count {
  position: absolute;
  right: -10px;
  bottom: -10px;
  z-index: 10;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #111827;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.28);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.psp-builder.is-dragging .psp-node-card:not(.is-dragging) {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.psp-node-wrapper.is-drop-before > .psp-node-card .psp-card-drop-zone.is-top,
.psp-node-wrapper.is-drop-after > .psp-node-card .psp-card-drop-zone.is-bottom,
.psp-node-wrapper.is-drop-left > .psp-node-card .psp-card-drop-zone.is-left,
.psp-node-wrapper.is-drop-right > .psp-node-card .psp-card-drop-zone.is-right {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.psp-node-wrapper.is-drop-before::before,
.psp-node-wrapper.is-drop-after::after,
.psp-node-wrapper.is-drop-left::before,
.psp-node-wrapper.is-drop-right::after {
  display: none !important;
  content: none !important;
}

.psp-node-wrapper.is-drop-before::before {
  top: 0;
  left: 50%;
  border-top: 4px solid var(--primary-brand);
  transform: translateX(-50%);
}

.psp-node-wrapper.is-drop-after::after {
  bottom: 0;
  left: 50%;
  border-bottom: 4px solid var(--primary-brand);
  content: "Darunter einfügen";
  transform: translateX(-50%);
}

.psp-node-wrapper.is-drop-left::before {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  content: "Links daneben";
}

.psp-node-wrapper.is-drop-right::after {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  content: "Rechts daneben";
}

.psp-node-wrapper.is-drop-before::before,
.psp-node-wrapper.is-drop-after::after,
.psp-node-wrapper.is-drop-left::before,
.psp-node-wrapper.is-drop-right::after {
  content: "" !important;
}

.psp-node-wrapper.is-drop-before::before,
.psp-node-wrapper.is-drop-after::after {
  border-top: 2px dashed #8b80ff;
  border-bottom: 2px dashed #8b80ff;
}

.psp-node-wrapper.is-drop-before::before,
.psp-node-wrapper.is-drop-after::after,
.psp-node-wrapper.is-drop-left::before,
.psp-node-wrapper.is-drop-right::after {
  display: none !important;
  border: 0 !important;
  content: none !important;
}

.psp-node-wrapper.is-drop-before::before,
.psp-node-wrapper.is-drop-after::after,
.psp-node-wrapper.is-drop-left::before,
.psp-node-wrapper.is-drop-right::after {
  display: none !important;
  content: none !important;
}

.psp-node-wrapper.is-drop-before > .psp-node-card {
  transform: translateY(18px);
}

.psp-node-wrapper.is-drop-after > .psp-node-card {
  transform: translateY(-18px);
}

.psp-node-wrapper.is-drop-left > .psp-node-card {
  transform: translateX(18px);
}

.psp-node-wrapper.is-drop-right > .psp-node-card {
  transform: translateX(-18px);
}

.psp-node-wrapper.is-drop-inside-disabled > .psp-node-card {
  border-color: color-mix(in srgb, var(--primary-brand) 58%, var(--line));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary-brand) 18%, transparent), var(--shadow);
}

.psp-node-wrapper.is-drop-inside-disabled > .psp-node-card::before {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-color));
  border: 1.5px dashed color-mix(in srgb, var(--primary-brand) 56%, var(--line));
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "Als Unterelement einfügen";
  pointer-events: none;
}

.psp-project-root.is-drop-root > .psp-project-card {
  border-color: color-mix(in srgb, var(--primary-brand) 58%, var(--line));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary-brand) 18%, transparent), var(--shadow);
}

.psp-project-root.is-drop-root > .psp-project-card::before {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-color));
  border: 1.5px dashed color-mix(in srgb, var(--primary-brand) 56%, var(--line));
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "Direkt unter Projekt einfügen";
  pointer-events: none;
}

.psp-node-top,
.psp-node-details,
.psp-node-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.psp-node-top {
  justify-content: space-between;
}

.psp-status,
.psp-priority {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.psp-status.offen {
  color: #166534;
  background: #dcfce7;
}

.psp-status.in_arbeit {
  color: #92400e;
  background: #fef3c7;
}

.psp-status.geschlossen {
  color: #991b1b;
  background: #fee2e2;
}

.psp-priority.low {
  color: #166534;
  background: #dcfce7;
}

.psp-priority.medium {
  color: #854d0e;
  background: #fef3c7;
}

.psp-priority.high {
  color: #9a3412;
  background: #ffedd5;
}

.psp-priority.critical {
  color: #991b1b;
  background: #fee2e2;
}

.psp-node-card h4 {
  margin: 0;
  color: var(--heading-color);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.psp-code {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  min-width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-color));
  border: 1px solid color-mix(in srgb, var(--primary-brand) 22%, var(--line));
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.psp-workdays {
  color: var(--subheading-color);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.psp-node-card p {
  margin: 0;
  color: var(--text-color);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.psp-node-details {
  flex-wrap: wrap;
  color: var(--subheading-color);
  font-size: 12px;
  font-weight: 800;
}

.psp-node-details span + span::before {
  margin-right: 6px;
  content: "·";
}

.psp-node-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  justify-content: flex-end;
}

.psp-node-actions .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 7px;
  font-size: 14px;
}

.psp-node-actions .icon-btn:hover,
.psp-node-actions .icon-btn:focus-visible {
  color: #fff;
  background: var(--primary-brand);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-brand) 28%, transparent);
  transform: translateY(-2px);
}

.psp-node-actions .icon-btn-danger:hover,
.psp-node-actions .icon-btn-danger:focus-visible {
  color: #fff;
  background: var(--red);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.22);
  transform: translateY(-2px);
}

.psp-drop-line {
  display: flex;
  width: 250px;
  height: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: transparent;
  background: transparent;
  border: 1.5px dashed transparent;
  border-radius: 10px;
  opacity: 0;
  overflow: hidden;
  transform: scale(0.98);
  transition: height 0.3s ease-in-out, margin 0.3s ease-in-out, opacity 0.3s ease-in-out, background 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.psp-side-drop-zone {
  display: flex;
  width: 0;
  min-height: 112px;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  border: 1.5px dashed transparent;
  border-radius: 10px;
  opacity: 0;
  overflow: hidden;
  transform: scale(0.98);
  transition: width 0.3s ease-in-out, margin 0.3s ease-in-out, opacity 0.3s ease-in-out, background 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.psp-drop-line::after {
  content: "";
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.psp-side-drop-zone::after {
  content: "";
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.psp-builder.is-dragging .psp-drop-line:not(.is-drop-hover) {
  height: 24px;
  opacity: 0;
}

.psp-builder.is-dragging .psp-side-drop-zone:not(.is-drop-hover) {
  width: 26px;
  margin: 0 -13px;
  opacity: 0;
}

.psp-drop-line.is-drop-hover {
  height: 112px;
  margin: 8px 0;
  color: color-mix(in srgb, var(--primary-brand) 78%, var(--subheading-color));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-brand) 9%, transparent) 25%, transparent 25%),
    linear-gradient(225deg, color-mix(in srgb, var(--primary-brand) 9%, transparent) 25%, transparent 25%),
    color-mix(in srgb, var(--primary-brand) 5%, var(--surface-color));
  background-size: 18px 18px;
  border-color: color-mix(in srgb, var(--primary-brand) 62%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-brand) 18%, transparent), 0 10px 24px color-mix(in srgb, var(--primary-brand) 10%, transparent);
  opacity: 1;
  transform: scale(1);
}

.psp-drop-line.is-drop-hover::after {
  content: "Ablageposition";
}

.psp-child-drop-zone.is-drop-hover::after {
  content: "Als Unterelement ablegen";
}

.psp-side-drop-zone.is-drop-hover {
  width: 250px;
  margin: 0 8px;
  color: color-mix(in srgb, var(--primary-brand) 78%, var(--subheading-color));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-brand) 9%, transparent) 25%, transparent 25%),
    linear-gradient(225deg, color-mix(in srgb, var(--primary-brand) 9%, transparent) 25%, transparent 25%),
    color-mix(in srgb, var(--primary-brand) 5%, var(--surface-color));
  background-size: 18px 18px;
  border-color: color-mix(in srgb, var(--primary-brand) 62%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-brand) 18%, transparent), 0 10px 24px color-mix(in srgb, var(--primary-brand) 10%, transparent);
  opacity: 1;
  transform: scale(1);
}

.psp-side-drop-zone.is-drop-hover::after {
  content: "Daneben ablegen";
}

.psp-children {
  position: relative;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 28px;
}

.psp-node-wrapper.has-children > .psp-node-card::after {
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 2px;
  height: 30px;
  background: color-mix(in srgb, var(--primary-brand) 52%, var(--line));
  content: "";
  transform: translateX(-50%);
}

.psp-project-root > .psp-project-card::after {
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 2px;
  height: 30px;
  background: color-mix(in srgb, var(--primary-brand) 52%, var(--line));
  content: "";
  transform: translateX(-50%);
}

.psp-project-root:not(:has(.psp-project-children)) > .psp-project-card::after {
  content: none;
}

.psp-node-wrapper.is-collapsed > .psp-node-card::after {
  content: none;
}

.psp-child {
  padding-top: 28px;
}

.psp-child::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 28px;
  background: color-mix(in srgb, var(--primary-brand) 52%, var(--line));
  content: "";
  transform: translateX(-50%);
}

.psp-child::after {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: color-mix(in srgb, var(--primary-brand) 52%, var(--line));
  content: "";
}

.psp-child:first-child::after {
  left: 50%;
}

.psp-child:last-child::after {
  right: 50%;
}

.psp-child:only-child::after {
  content: none;
}

.psp-empty {
  display: grid;
  width: min(520px, calc(100vw - 80px));
  gap: 10px;
  margin: 40px auto;
  padding: 28px;
  background: var(--surface-color);
  border: 1px dashed var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.psp-empty h3 {
  margin: 0;
}

.psp-properties-panel {
  position: sticky;
  top: 18px;
  display: flex;
  min-width: 400px;
  max-height: calc(100dvh - 36px);
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.psp-properties-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.psp-properties-head h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.psp-properties-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  padding: 22px;
}

.psp-properties-form textarea {
  min-height: 132px;
  resize: vertical;
}

.psp-name-code-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(96px, 1fr);
  gap: 12px;
  align-items: end;
}

.psp-code-field {
  text-align: center;
  font-weight: 900;
}

.psp-code-field[readonly] {
  color: var(--heading-color);
  background: var(--surface-color);
  cursor: default;
}

.psp-properties-actions {
  position: sticky;
  bottom: -22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: auto -22px -22px;
  padding: 16px 22px 22px;
  background: color-mix(in srgb, var(--surface-color) 94%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.psp-properties-actions .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .psp-layout.is-editing {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.42fr);
  }
}

@media (max-width: 860px) {
  .psp-layout.is-editing {
    grid-template-columns: minmax(0, 1fr);
  }

  .psp-properties-panel {
    position: relative;
    top: auto;
    min-width: 0;
    max-height: none;
  }

  .psp-name-code-row {
    grid-template-columns: 1fr;
  }
}

.phase-plan-head {
  position: relative;
  z-index: 1;
  align-items: center;
}

.phase-plan-panel {
  overflow: visible;
}

.phase-plan-panel .panel-body {
  overflow: visible;
}

.phase-plan-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.phase-plan-titlebar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.phase-plan-titlebar h3 {
  margin-right: 2px;
}

.phase-plan-titlebar span {
  position: relative;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.phase-plan-titlebar span::before {
  margin-right: 12px;
  color: var(--subheading-color);
  content: "|";
}

.phase-plan-shell {
  overflow-x: auto;
  padding-bottom: 82px;
}

.phase-plan-grid {
  position: relative;
  display: grid;
  --phase-info-width: 230px;
  --phase-grid-gap: 14px;
  --phase-row-height: 42px;
  --phase-row-gap: 6px;
  --phase-bar-height: 32px;
  grid-template-columns: var(--phase-info-width) minmax(var(--phase-timeline-width), 1fr);
  gap: var(--phase-row-gap) var(--phase-grid-gap);
  min-width: 980px;
}

.phase-plan-axis-spacer {
  min-height: var(--phase-axis-height);
}

.phase-plan-axis {
  position: relative;
  display: grid;
  min-height: var(--phase-axis-height);
  grid-template-rows: repeat(var(--phase-axis-rows), minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.phase-axis-menu {
  position: relative;
}

.phase-axis-menu-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--primary-brand);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Arial, sans-serif;
  gap: 3px;
  font-size: 0;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.phase-axis-menu-button:hover,
.phase-axis-menu[open] .phase-axis-menu-button {
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 10%, var(--surface-soft-color));
  border-color: color-mix(in srgb, var(--primary-brand) 34%, var(--line));
  box-shadow: var(--shadow-sm);
}

.phase-axis-menu-button span {
  display: block;
  width: 4px;
  height: 4px;
  color: transparent;
  font-size: 0;
  background: var(--primary-brand);
  border-radius: 999px;
  box-shadow: -7px 0 0 var(--primary-brand), 7px 0 0 var(--primary-brand);
}

.phase-axis-menu-button::-webkit-details-marker {
  display: none;
}

.phase-axis-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  width: 220px;
  gap: 8px;
  padding: 12px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.phase-axis-menu-panel strong {
  margin-top: 4px;
  color: var(--subheading-color);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.phase-axis-menu-panel strong:first-child {
  margin-top: 0;
}

.phase-axis-menu-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.phase-axis-menu-panel input {
  accent-color: var(--primary-brand);
}

.phase-plan-axis-row {
  position: relative;
  min-height: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.phase-plan-axis-row:last-child {
  border-bottom: 0;
}

.phase-plan-line-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.phase-plan-line-layer i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--subheading-color) 70%, transparent);
  opacity: 0.58;
}

.phase-plan-line-layer i.is-year {
  width: 2px;
  background: color-mix(in srgb, var(--heading-color) 42%, transparent);
  opacity: 0.72;
}

.phase-plan-line-layer i.is-quarter {
  width: 1px;
  background: color-mix(in srgb, var(--primary-brand) 50%, transparent);
  opacity: 0.48;
}

.phase-plan-line-layer i.is-month {
  width: 1px;
  background: var(--line);
  opacity: 0.24;
}

.phase-plan-axis-row > span {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: block;
  overflow: hidden;
  transform: translateY(-50%);
  color: var(--subheading-color);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-plan-axis-years > span {
  color: var(--heading-color);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.phase-plan-add-button {
  color: white;
  background: var(--primary-brand);
  box-shadow: var(--shadow-sm);
}

.phase-plan-add-button:hover {
  color: white;
  background: var(--primary-brand);
  transform: none;
}

.phase-plan-today-line {
  position: absolute;
  top: var(--phase-axis-height);
  left: calc(var(--phase-info-width) + var(--phase-grid-gap) + ((100% - var(--phase-info-width) - var(--phase-grid-gap)) * var(--today-left) / 100));
  height: calc((var(--phase-row-height) * var(--phase-count)) + (var(--phase-row-gap) * (var(--phase-count) - 1)) + 48px);
  width: 2px;
  background: color-mix(in srgb, var(--red) 78%, transparent);
  z-index: 5;
  pointer-events: none;
}

.phase-plan-today-line span {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 13px;
  height: 13px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--red);
  border: 2px solid var(--surface-color);
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.phase-plan-today-line em {
  position: absolute;
  left: 50%;
  bottom: -27px;
  transform: translateX(-50%);
  color: var(--red);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.phase-plan-info {
  position: relative;
  display: flex;
  min-height: var(--phase-row-height);
  padding: 5px 42px 5px 12px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: var(--text-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.phase-plan-info-main {
  display: flex;
  width: 100%;
  min-height: calc(var(--phase-row-height) - 10px);
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phase-plan-info:hover {
  border-color: var(--line);
  transform: none;
}

.phase-plan-info span {
  color: var(--subheading-color);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.phase-plan-info strong {
  color: var(--heading-color);
  font-size: 14px;
  line-height: 1.2;
}

.phase-plan-info small {
  color: var(--text-color);
  font-size: 10.5px;
}

.phase-plan-track {
  position: relative;
  min-height: var(--phase-row-height);
  overflow: visible;
  background: linear-gradient(90deg, var(--surface-soft-color), color-mix(in srgb, var(--surface-soft-color) 72%, var(--surface-color) 28%));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phase-plan-track::before {
  content: none;
}

.phase-plan-bar {
  position: absolute;
  top: calc((var(--phase-row-height) - var(--phase-bar-height)) / 2);
  z-index: 2;
  display: grid;
  min-width: 0;
  max-width: 100%;
  min-height: var(--phase-bar-height);
  align-content: center;
  padding: 4px 10px;
  color: white;
  background: var(--primary-brand);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.phase-plan-bar:hover {
  transform: none;
}

.phase-plan-resize-handle {
  position: absolute;
  top: 50%;
  z-index: 7;
  width: 7px;
  height: calc(var(--phase-bar-height) + 8px);
  padding: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  background: color-mix(in srgb, var(--heading-color) 72%, transparent);
  border: 2px solid var(--surface-color);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: ew-resize;
  transition: opacity 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.phase-plan-bar:hover ~ .phase-plan-resize-handle,
.phase-plan-track.is-resizing .phase-plan-resize-handle,
.phase-plan-resize-handle:hover,
.phase-plan-resize-handle:focus-visible {
  opacity: 1;
}

.phase-plan-resize-handle:hover,
.phase-plan-resize-handle:focus-visible,
.phase-plan-track.is-resizing .phase-plan-resize-handle {
  background: var(--primary-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-brand) 14%, transparent), var(--shadow-sm);
}

.phase-plan-track.is-resizing {
  cursor: ew-resize;
}

.phase-plan-track.is-resizing .phase-plan-bar {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary-brand) 18%, transparent);
}

.phase-plan-bar.is-closed {
  color: var(--heading-color);
}

.phase-plan-milestone {
  position: absolute;
  top: calc(var(--phase-row-height) / 2);
  z-index: 4;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--primary-brand);
  border: 2px solid var(--surface-color);
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.phase-plan-info *,
.phase-plan-track *:not(.phase-plan-resize-handle),
.phase-plan-bar * {
  background-color: transparent;
}

.phase-plan-delete {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--heading-color);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  opacity: 0.72;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.phase-plan-delete:hover,
.phase-plan-delete:focus-visible {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.phase-plan-empty {
  padding: 24px;
  background: var(--surface-soft-color);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

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

.kanban-shell {
  display: grid;
  gap: 18px;
}

.kanban-board {
  display: flex;
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scrollbar-color: var(--primary-brand) var(--surface-soft-color);
  scrollbar-width: thin;
}

.kanban-board::-webkit-scrollbar {
  height: 10px;
}

.kanban-board::-webkit-scrollbar-track {
  background: var(--surface-soft-color);
  border-radius: 999px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: var(--primary-brand);
  border-radius: 999px;
}

.kanban-lane {
  flex: 0 0 268px;
  min-height: min(700px, calc(100vh - 150px));
  max-height: min(700px, calc(100vh - 150px));
  overflow: hidden;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.kanban-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-color);
}

.kanban-lane-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.kanban-title-input {
  width: 100%;
  padding: 0;
  color: var(--heading-color);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
}

.kanban-title-input:focus {
  padding: 4px 6px;
  background: var(--surface-soft-color);
  outline: 2px solid var(--primary-brand);
}

.kanban-lane-head span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--heading-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.kanban-lane-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--heading-color);
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.kanban-lane-close:hover {
  color: var(--hover-brand);
  background: color-mix(in srgb, var(--hover-brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--hover-brand) 38%, var(--line));
}

.kanban-lane-body {
  display: grid;
  align-content: start;
  min-height: min(580px, calc(100vh - 280px));
  max-height: min(580px, calc(100vh - 280px));
  overflow-y: auto;
  overflow-x: hidden;
  gap: 8px;
  padding: 10px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.kanban-lane-body.is-drop-target {
  background: color-mix(in srgb, var(--surface-soft-color) 78%, var(--primary-brand) 22%);
  box-shadow: inset 0 0 0 2px var(--primary-brand);
}

.kanban-card {
  display: grid;
  position: relative;
  gap: 7px;
  min-height: 58px;
  padding: 9px 10px 8px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.kanban-card.is-done-compact {
  align-items: center;
  min-height: 34px;
  padding: 9px 30px 7px 12px;
}

.kanban-card.is-done-compact h4 {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-card.is-done-compact .kanban-card-close {
  top: 5px;
  right: 6px;
}

.kanban-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.kanban-card-close {
  position: absolute;
  top: 13px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--heading-color);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.kanban-card:hover .kanban-card-close,
.kanban-card-close:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.kanban-card-close:hover {
  color: var(--task-card-color);
  background: color-mix(in srgb, var(--task-card-color) 14%, transparent);
  border-color: var(--task-card-color);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.is-dragging {
  opacity: 0.5;
}

.kanban-card.is-overdue {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.28), var(--shadow-sm);
}

.kanban-card-strip {
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: var(--task-card-color);
  border-radius: 8px 8px 0 0;
}

.kanban-card h4 {
  padding-right: 32px;
  margin: 6px 0 0;
  color: var(--heading-color);
  font-size: 14px;
  line-height: 1.28;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.task-priority {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.task-priority.low {
  color: #166534;
  background: #dcfce7;
}

.task-priority.medium {
  color: var(--copper);
  background: var(--cream);
}

.task-priority.high {
  color: #92400e;
  background: #ffedd5;
}

.task-priority.critical {
  color: #991b1b;
  background: #fee2e2;
}

.kanban-meta {
  color: var(--text-color);
  font-size: 13px;
}

.task-date {
  color: var(--text-color);
  font-size: 12px;
}

.task-date.overdue {
  color: #991b1b;
  font-weight: 900;
}

.task-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: white;
  background: var(--primary-brand);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.kanban-empty {
  display: grid;
  min-height: 54px;
  place-items: center;
  color: var(--text-color);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft-color);
  font-weight: 700;
}

.kanban-add-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-color);
}

.kanban-add-card-input {
  min-height: 36px;
  padding: 7px 9px;
}

.kanban-add-card-button {
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.kanban-add-card-button:hover,
.kanban-add-card-button:focus-visible {
  color: #fff;
  background: var(--primary-brand);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-brand) 24%, transparent);
  transform: translateY(-2px);
}

.kanban-add-column {
  flex: 0 0 240px;
  min-height: 58px;
  padding: 14px;
  color: var(--heading-color);
  background: var(--surface-soft-color);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 900;
  text-align: left;
}

.kanban-add-column:hover {
  color: var(--primary-brand);
  background: color-mix(in srgb, var(--primary-brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--primary-brand) 42%, var(--line));
}

.task-modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 14px;
  padding: 14px;
}

.task-modal-main,
.task-modal-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.task-title-field {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 20px;
  font-weight: 900;
  padding-left: 0;
}

.task-modal-side {
  padding: 10px;
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-editor-modal {
  position: relative;
  width: min(760px, calc(100vw - 48px));
}

.task-editor-modal .modal-head {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 3;
  padding: 0;
  border: 0;
}

.task-editor-modal .modal-head h3 {
  display: none;
}

.task-editor-modal .modal-close {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: 20px;
  line-height: 1;
}

.task-editor-modal .modal-body {
  max-height: min(78vh, 720px);
  padding: 0;
}

.task-modal-hero {
  padding: 20px 46px 16px;
}

.task-modal-hero .task-title-field {
  width: min(560px, 100%);
  margin: 0;
  font-size: 20px;
}

.task-modal-hero p {
  margin: 5px 0 0;
  opacity: 0.88;
  font-size: 12px;
  line-height: 1.25;
}

.task-editor-modal .label {
  font-size: 12px;
}

.task-editor-modal .field,
.task-editor-modal select,
.task-editor-modal textarea {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 14px;
}

.task-due-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.task-due-check {
  display: grid;
  height: 36px;
  place-items: center;
}

.task-overdue-pill {
  align-self: end;
  padding: 8px 10px;
  color: white;
  background: #c9270a;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-checklist {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.task-check-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.task-checklist-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 8px;
}

.task-checklist-add .btn {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--text-color);
  background: var(--surface-soft-color);
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 12px;
}

.task-checklist-add .btn:hover {
  color: white;
  background: var(--hover-brand);
  transform: none;
  box-shadow: none;
}

.task-checklist-empty {
  margin: 0;
  padding: 10px;
  background: var(--surface-soft-color);
  border-radius: 6px;
}

.export-card {
  display: grid;
  align-content: space-between;
  min-height: 185px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 38, 38, 0.42);
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: hidden;
  background: var(--surface-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  max-height: calc(90vh - 72px);
  overflow: auto;
  padding: 22px;
}

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

.project-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(160px, 1fr) minmax(140px, 0.75fr) minmax(140px, 0.75fr);
  gap: 14px;
  align-items: end;
}

@media (max-width: 900px) {
  .project-edit-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .project-edit-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }

  .print-document {
    display: block !important;
  }

  body:has(.print-document) .app-shell,
  body:has(.print-document) .modal-backdrop {
    display: none !important;
  }

  .print-document .org-export-page {
    width: auto;
    min-height: 100vh;
    margin: 0;
    padding: 12mm;
    background: var(--app-bg);
    break-after: page;
    page-break-after: always;
  }

  .print-document .org-export-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .sidebar,
  .topbar,
  .nav,
  .form-grid,
  .btn,
  .icon-btn {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .view {
    display: block !important;
    padding: 0;
  }

  .view:not(.active) {
    display: none !important;
  }

  body {
    background: white;
  }

  .panel,
  .card {
    box-shadow: none;
  }
}

@media (max-width: 1050px) {
  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .workspace {
    width: 100%;
    margin-left: 0;
    height: auto;
    overflow: visible;
  }

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

  .topbar,
  .topbar-actions,
  .dashboard-export {
    flex-direction: column;
    align-items: stretch;
  }

  .cols-2,
  .cols-1-3,
  .cols-3-1,
  .kanban,
  .goal-card,
  .dashboard-widget-grid {
    grid-template-columns: 1fr;
  }

  .project-team-form {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .branding-color-grid,
  .auth-name-grid,
  .onboarding-logo-area,
  .settings-logo-area {
    grid-template-columns: 1fr;
  }

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

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

  .kanban-lane,
  .kanban-add-column {
    flex-basis: min(280px, 82vw);
  }
}

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

  .activity-drawer {
    width: min(100vw, 460px);
  }

  .activity-project-head {
    display: grid;
  }

  .activity-delete {
    justify-self: start;
  }

  .topbar {
    position: static;
  }

  .topbar h2 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .topbar h2.is-dashboard-greeting {
    font-size: clamp(24px, 7vw, 32px);
  }

  .dashboard-heading-date {
    font-size: 14px;
  }

  .dashboard-project-main,
  .dashboard-project-footer {
    grid-template-columns: 1fr;
  }

  .dashboard-project-logo-box {
    width: 96px;
    height: 96px;
  }

  .dashboard-project-fact:not(:first-child) {
    padding-left: 0;
    border-left: 0;
  }

  .team-role-board {
    grid-template-columns: 1fr;
  }

  .view {
    padding: 16px 14px 42px;
  }

  .project-summary {
    padding: 18px 46px 20px;
  }

  .project-summary h3 {
    font-size: clamp(24px, 8vw, 30px);
  }

  .project-leader-preview {
    font-size: clamp(16px, 5vw, 20px);
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .kanban-board {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .kanban-lane {
    min-height: 260px;
  }

  .task-modal {
    grid-template-columns: 1fr;
  }

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

  .dashboard-calendar-labels,
  .dashboard-calendar-week {
    grid-template-columns: 34px repeat(7, minmax(34px, 1fr));
    gap: 4px;
  }

  .dashboard-calendar-day {
    min-height: 38px;
    padding: 5px;
  }

  .dashboard-task-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-task-meta {
    justify-items: start;
  }

  .home-project-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .home-project-head > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@supports not (min-height: 100dvh) {
  #auth-gate {
    min-height: 100vh;
    max-height: 100vh;
  }

  .app-shell {
    min-height: 100vh;
  }

  .sidebar {
    min-height: var(--sidebar-viewport-height);
  }
}
