/* DF-1: urgent dashboard messages keep their semantic emphasis without a box.
   Ordinary feedback content and success/status messages are not recolored. */
html[data-color-variant] #personal-dashboard #employee-dashboard-day .employee-plan-disclosure .disclosure-urgent {
  background: transparent; border: 0; box-shadow: none;
  color: var(--feedback-warning-ink, #b32929);
}
/* DF-2: one identity button at the far right, with the existing accessible menu. */
#header-account { flex: 0 1 200px; justify-content: flex-end; }
#header-account .header-account-trigger {
  display: flex; flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%;
  min-height: 44px; padding: 4px 6px; text-align: left; font-size: 13px;
}
#header-account .header-account-identity { justify-content: flex-end; }
#header-account .header-account-copy { flex: 0 1 auto; }
#header-account .header-account-item { padding: 10px 12px; border-radius: 7px; }
#header-account .header-account-settings::before { content: '⚙'; width: 18px; flex: 0 0 18px; text-align: center; font-size: 17px; }
#header-account .session-logout-icon { width: 18px; flex: 0 0 18px; text-align: center; font-size: 17px; }
/* DF-3: unchanged original artwork; black fallback where yellow lacks contrast. */
#sidebar .brand > img { filter: var(--interface-sidebar-signet-filter, brightness(0)); }
.login-card > img { filter: var(--interface-surface-signet-filter, brightness(0)); }
/* DF-5: the sort picker follows the neighboring customer/project controls. */
.list-tools .sort-choice select {
  box-sizing: border-box; width: 230px; max-width: 100%; min-width: 135px;
  min-height: 38px; padding: 8px 10px; font: inherit; font-size: 12px;
}
.list-tools .list-filters .task-relation-combobox > input { box-sizing: border-box; min-height: 38px; }
/* DF-6: search action stays keyboard accessible inside the field's right edge. */
#workspace-header > .header-search { position: relative; gap: 0; }
#workspace-header .header-search input[type='search'] { padding-right: 48px; }
#workspace-header .header-search > .global-search-trigger {
  position: absolute; right: 1px; top: 1px; bottom: 1px; z-index: 1;
  width: 38px; min-width: 38px; min-height: 0; height: auto; margin: 0; padding: 8px;
  border: 0; background: transparent; box-shadow: none;
}
/* DF-7: plain light-gray unavailable-time surfaces without hatching.
   Holiday/sickness colors and overbooking fills remain distinct. */
html[data-color-variant] .planning-page.planning-compact :is(
  .planning-cell.planning-day-off:not(.planning-holiday):not(.planning-sickness),.planning-day.planning-day-off:not(.planning-holiday):not(.planning-sickness),
  .planning-nonworking-band,.calendar-context .calendar-absence:not(.calendar-sickness):not(.calendar-holiday),
  .legend-absence:not(.legend-sickness):not(.legend-holiday),.planning-absence-band:not(.calendar-sickness):not(.calendar-holiday)) {
  background-color: #f3f4f6; background-image: none;
}
/* DF-8: selection uses an outline; only true My Day/care membership fills rows. */
html[data-color-variant='crm'] #task-list .task-card.selected:not(.carried):not(.in-my-day):not(.personal-care-active) {
  background-color: var(--crm-paper, var(--surface));
  outline: 1px solid var(--crm-control, #899579); outline-offset: -1px;
}
.task-title-with-privacy { display: flex; align-items: center; gap: 5px; min-width: 0; width: 100%; }
.task-title-with-privacy > .task-title { flex: 0 1 auto; min-width: 0; }
#task-list .task-title-with-privacy > .private-marker {
  display: inline-flex; flex: 0 0 16px; align-items: center; width: 16px;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--crm-muted, #62705a);
}
#task-list .private-marker > .icon { width: 16px; height: 16px; }
@media (max-width: 820px) {
  .list-tools .sort-choice select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
  .list-tools .list-filters .task-relation-combobox > input { min-height: 44px; }
  #workspace-header .header-search > .global-search-trigger { width: 42px; min-width: 42px; }
}
@media (forced-colors: active) {
  html[data-color-variant] #personal-dashboard #employee-dashboard-day .employee-plan-disclosure .disclosure-urgent { color: CanvasText; }
  #task-list .task-card.selected { outline: 1px solid Highlight; }
}
/* DF-4: the carryover hint is an acknowledgement button, not a task mutation. */
button.my-day-carry-badge { font: inherit; font-size: 10px; min-height: 28px; padding: 3px 6px; cursor: pointer; }
button.my-day-carry-badge:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
button.my-day-carry-badge:disabled { cursor: wait; opacity: .65; }
@media(max-width:820px) { button.my-day-carry-badge { min-height: 44px; } }
/* Keep intrinsic title sizing and the existing mobile reading/touch behavior
   when the privacy marker adds a title wrapper. */
#task-list .task-title-with-privacy > .task-title { width: auto; flex: 0 1 auto; }
@media(max-width:820px) {
  #task-list:not(.kanban-board) .mobile-task-content > .task-title-with-privacy > .task-title {
    display: block; min-height: 36px; padding: 4px 0; font-size: 14px; line-height: 1.35;
    font-weight: 600; white-space: normal; text-overflow: clip; overflow: visible;
    overflow-wrap: anywhere; touch-action: pan-y; cursor: pointer; user-select: auto; -webkit-user-select: auto;
  }
}
/* Personal task-row controls: customize only the desktop list. Default rows
   retain their existing compact/extras behavior; custom rows may wrap safely. */
@media(min-width:821px) {
  #task-list:not(.kanban-board) .task-list-row.has-configured-actions { flex-wrap: wrap; }
  #task-list .task-list-row.has-configured-actions > .task-content { flex: 1 1 280px; min-width: 180px; }
  #task-list .task-configured-actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 1 auto; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; margin-left: auto; }
  #task-list .task-configured-control { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
  #task-list .task-configured-control > .task-timer-list { flex-wrap: wrap; max-width: 100%; }
}

/* Weekend headings retain the date; repetitive capacity/nonworking captions do not. */
.planning-page.planning-compact .planning-weekend.planning-day-off .planning-day-summary .capacity,
.planning-page.planning-compact .planning-weekend.planning-day-off .planning-nonworking-band span{display:none}
#data-export-form>button[type="submit"]{margin-top:20px;margin-bottom:8px}

html[data-color-variant] .planning-page.planning-compact .planning-cell.overbooked .planning-nonworking-band{background-color:#fbdadd}

/* 0.49.8: deadline is a stable column, whether empty, dated or timed.
   Only the summary clips; the editor/popover and focus ring remain unclipped. */
@media(min-width:821px) {
  #task-list:not(.kanban-board) .task-list-row .task-inline-deadline {
    box-sizing: border-box; flex: 0 0 116px; width: 116px; min-width: 116px; max-width: 116px;
  }
  #task-list:not(.kanban-board) .task-list-row .task-inline-deadline-trigger {
    box-sizing: border-box; position: relative; display: block; width: 100%; max-width: none;
    padding: 6px 24px 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border-color: var(--crm-line, var(--line)); background: var(--crm-paper, var(--surface));
  }
  #task-list:not(.kanban-board) .task-list-row .task-inline-deadline-trigger::after {
    position: absolute; right: 8px; top: calc(50% - 5px); margin: 0;
  }
  #task-list:not(.kanban-board) .task-list-row .task-inline-deadline[open] > .task-inline-deadline-trigger::after { top: calc(50% - 1px); }
}

/* Account actions use the same themed popup surface, row rhythm and state
   indicator as the other menus. JS retains top-layer viewport placement. */
#header-account .header-account-trigger {
  gap: 8px; border: 1px solid var(--crm-line, var(--line)); border-radius: 8px;
  background: var(--crm-paper, var(--surface));
}
#header-account .header-account-trigger::after {
  content: ''; display: block; box-sizing: border-box; flex: 0 0 7px;
  width: 7px; height: 7px; margin: -3px 3px 0 0;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); color: var(--crm-muted, var(--muted));
}
#header-account .header-account-trigger[aria-expanded='true']::after { transform: rotate(225deg); margin-top: 3px; }
#header-account .header-account-menu {
  box-sizing: border-box; gap: 4px; padding: 8px; border-radius: 9px;
  background: var(--crm-paper, var(--surface)); border-color: var(--crm-line, var(--line));
  box-shadow: 0 6px 24px #15244325; font-family: inherit;
}
#header-account .header-account-menu > .header-account-item {
  box-sizing: border-box; min-height: 44px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 7px; box-shadow: none;
  font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: normal; text-transform: none;
}
#header-account .header-account-menu > .header-account-item:is(:hover,:focus-visible):not(:disabled) {
  background: var(--crm-soft, var(--soft)); color: var(--crm-text, var(--text, CanvasText)); transform: none;
}
#header-account .header-account-menu > .header-account-item:disabled {
  opacity: 1; color: var(--crm-muted, var(--muted)); background: var(--crm-soft, var(--soft)); cursor: default;
}
#header-account .header-account-menu > .header-account-logout {
  margin-top: 4px; border-top-color: var(--crm-line, var(--line)); border-top-left-radius: 0; border-top-right-radius: 0;
}
@media(forced-colors:active) {
  #header-account .header-account-trigger, #header-account .header-account-menu { border-color: ButtonText; }
  #header-account .header-account-menu > .header-account-item:disabled { color: GrayText; background: Canvas; }
  #header-account .header-account-menu > .header-account-logout { border-top-color: ButtonText; }
}
