/* Compact navigation, with the frequent work areas before administration. */
.sidebar.crm-sidebar { padding: 17px 12px 12px; }
.sidebar.crm-sidebar .brand,
.sidebar.crm-sidebar .brand:has(.organization-logo) {
  min-height: 0;
  padding: 0 8px 13px;
  gap: 8px;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
.sidebar.crm-sidebar .brand .organization-logo {
  width: 100%;
  max-width: 100%;
  height: 46px;
  max-height: 46px;
  object-fit: contain;
  object-position: left center;
}
.sidebar.crm-sidebar .brand-mark {
  width: 29px;
  height: 29px;
  font-size: 21px;
  letter-spacing: 0;
  padding-right: 0;
  border-radius: 8px;
}
.sidebar.crm-sidebar .brand > .crm-brand-word { font-size: 20px; letter-spacing: -.5px; }
.sidebar.crm-sidebar .workspace-switch {
  display: flex;
  margin: 0 4px 10px;
  padding: 8px;
  gap: 7px;
  min-height: 46px;
}
.sidebar.crm-sidebar .workspace-switch > .workspace-icon {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  min-width: 25px;
}
.sidebar.crm-sidebar .workspace-icon .icon { width: 16px; height: 16px; }
.sidebar.crm-sidebar .workspace-caption { font-size: 7px; margin-bottom: 4px; letter-spacing: .7px; }
.sidebar.crm-sidebar .workspace-switch select { font-size: 11px; line-height: 1.5; }
.sidebar.crm-sidebar .customer-scope-picker {
  margin: 0 4px 10px;
  padding: 8px;
  border-radius: 7px;
}
.sidebar.crm-sidebar .customer-scope-picker > span {
  margin-bottom: 5px;
  font-size: 9px;
  letter-spacing: 0;
  color: #7285a1;
}
.sidebar.crm-sidebar .customer-scope-picker select { padding: 6px; font-size: 11px; min-height: 31px; }
.sidebar.crm-sidebar > .sidebar-timer { margin: 0 4px 12px; padding: 9px; border-radius: 7px; }
.sidebar.crm-sidebar > .sidebar-timer:not(.is-running) { padding: 0; border: 0; background: transparent; }
.sidebar.crm-sidebar > .sidebar-timer:not(.is-running) > .btn {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  padding: 7px 9px;
}
.sidebar.crm-sidebar .sidebar-timer-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sidebar.crm-sidebar .sidebar-timer-row > strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #45618a;
}
.sidebar.crm-sidebar .sidebar-timer-clock { margin: 0; flex-shrink: 0; font-size: 15px; letter-spacing: 0; }
.sidebar.crm-sidebar .sidebar-timer > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 4px 0 0;
  font-size: 9px;
}
.sidebar.crm-sidebar .sidebar-timer-actions { margin-top: 6px; gap: 6px; }
.sidebar.crm-sidebar .sidebar-timer-actions .btn { min-height: 29px; padding: 5px 7px; font-size: 10px; }
.sidebar.crm-sidebar .nav-group { margin-bottom: 13px; }
.sidebar.crm-sidebar .nav-label { padding: 0 10px; margin-bottom: 5px; font-size: 7px; letter-spacing: 1px; }
.sidebar.crm-sidebar .nav-item {
  min-height: 35px;
  margin-bottom: 1px;
  padding: 7px 10px;
  gap: 9px;
  font-size: 11px;
  line-height: 1.3;
  transition: background .16s, color .16s;
}
.sidebar.crm-sidebar .nav-item .icon { width: 16px; height: 16px; }
.sidebar.crm-sidebar .sidebar-footer { padding: 9px 8px 0; }
.sidebar.crm-sidebar .sidebar-user { padding-top: 4px; margin-top: 0; border-top: 0; }
.sidebar.crm-sidebar .sidebar-user .avatar { width: 29px; height: 29px; font-size: 10px; }
.project-due-date { margin: 0 0 12px; }
.customer-scope-overview.crm-dashboard-customer-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.crm-dashboard-customer-context > h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.crm-dashboard-customer-actions { display: flex; align-items: center; flex-shrink: 0; gap: 5px; }
.crm-dashboard-customer-actions .btn { min-height: 32px; padding: 6px 7px; font-size: 10px; }
@media (max-width: 1200px) and (min-width: 901px) {
  .sidebar.crm-sidebar { padding-left: 9px; padding-right: 9px; }
  .sidebar.crm-sidebar .nav-item { padding-left: 8px; padding-right: 8px; gap: 8px; }
  .sidebar.crm-sidebar .sidebar-timer-row { flex-wrap: wrap; }
  .sidebar.crm-sidebar .sidebar-timer-clock { width: 100%; }
}
@media (max-width: 900px) {
  .sidebar.crm-sidebar { padding: 17px 12px 15px; }
  .sidebar.crm-sidebar .nav-item { min-height: 42px; font-size: 12px; padding: 9px 10px; }
  .sidebar.crm-sidebar .nav-label { font-size: 8px; }
  .sidebar.crm-sidebar .workspace-switch select { font-size: 13px; }
  .sidebar.crm-sidebar .customer-scope-picker select { font-size: 16px; min-height: 40px; }
  .sidebar.crm-sidebar .customer-scope-picker > span { font-size: 10px; }
  .sidebar.crm-sidebar .sidebar-timer-actions .btn { min-height: 40px; padding: 8px; }
  .sidebar.crm-sidebar > .sidebar-timer:not(.is-running) > .btn { min-height: 40px; }
}
@media (max-width: 600px) {
  .sidebar.crm-sidebar .nav-item { min-height: 44px; }
  .sidebar.crm-sidebar .workspace-switch select { font-size: 16px; }
  .customer-scope-overview.crm-dashboard-customer-context { gap: 8px; padding: 8px 10px; margin-bottom: 12px; }
  .crm-dashboard-customer-context > h2 { font-size: 13px; }
  .crm-dashboard-customer-actions .btn { min-height: 40px; padding: 7px; }
}
.project-status-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; min-width: 0; margin: 0 0 20px; padding: 15px 18px; border: 1px solid #e2e9f4; border-radius: 9px; background: #fff; }
.project-status-toolbar .field { min-width: 0; width: 260px; max-width: 100%; }
.project-status-toolbar select { min-width: 0; width: 100%; }
.project-status-toolbar p { margin: 0 0 9px; color: #8b9ab1; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.modal-footer.entry-edit-footer { flex-wrap: wrap; }
.entry-delete-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.entry-delete-button { color: #b5605e; border-color: #f0d9d5; }
.entry-delete-button:hover { color: #9f4543; background: #fff3f0; border-color: #e5bcb6; }
.entry-delete-confirmation { margin: 0 0 20px; padding: 17px; border: 1px solid #eed4ce; border-radius: 8px; background: #fff8f5; }
.entry-delete-confirmation[hidden], .entry-delete-footer-actions [hidden] { display: none !important; }
[data-form="backup-delete"] [hidden] { display: none !important; }
.entry-delete-confirmation h3 { margin: 0 0 9px; color: #985956; font-size: 14px; }
.entry-delete-confirmation p { margin: 0 0 11px; color: #967871; font-size: 11px; line-height: 1.7; }
.entry-delete-summary { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0 0 12px; padding: 11px; border: 1px solid #f2e4de; border-radius: 5px; background: #fff; overflow-wrap: anywhere; }
.entry-delete-summary strong { color: #6a7485; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.entry-delete-summary span { color: #9b9fad; font-size: 10px; line-height: 1.6; }
.entry-delete-confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.task-quick-entry { padding: 18px 22px; border-top: 1px solid #e8eef7; background: #fbfcff; border-radius: 0 0 9px 9px; }
.task-quick-fields { display: flex; align-items: end; gap: 10px; min-width: 0; }
.task-quick-title { flex: 1; min-width: 0; }
.task-quick-customer { flex: 0 1 240px; min-width: 0; }
.task-quick-fields input, .task-quick-fields select { width: 100%; min-width: 0; }
.task-quick-submit { flex: 0 0 40px; height: 40px; padding: 0; justify-content: center; }
.task-quick-context { display: block; margin-top: 8px; color: #94a2b8; overflow-wrap: anywhere; line-height: 1.6; }
.task-quick-entry .form-error:empty { display: none; }
@media (max-width: 900px) {
  .entry-delete-footer-actions .btn, .entry-delete-confirm-actions .btn { min-height: 44px; white-space: normal; }
  [data-form="backup-delete"] .modal-footer .btn { min-height: 44px; white-space: normal; }
}
@media (max-width: 600px) {
  .project-status-toolbar { align-items: stretch; flex-direction: column; gap: 8px; padding: 14px; }
  .project-status-toolbar .field { width: 100%; }
  .project-status-toolbar select { font-size: 16px; min-height: 42px; }
  .project-status-toolbar p { margin: 0; white-space: normal; }
  .entry-delete-footer-actions { width: 100%; margin: 0; }
  .entry-delete-footer-actions .btn, .entry-delete-confirm-actions .btn { min-height: 44px; white-space: normal; }
  .entry-delete-confirmation { padding: 14px; }
  .entry-delete-confirm-actions { flex-direction: column; align-items: stretch; }
  .entry-delete-confirm-actions .btn { justify-content: center; }
  .task-quick-entry { padding: 16px; }
  .task-quick-fields { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; }
  .task-quick-title { grid-column: 1/-1; }
  .task-quick-fields input, .task-quick-fields select { min-height: 44px; font-size: 16px; }
  .task-quick-customer { grid-column: 1; }
  .task-quick-submit { grid-column: 2; min-height: 44px; height: 44px; }
  .task-quick-fields:not(:has(.task-quick-customer)) .task-quick-title { grid-column: 1; }
}

.sidebar.crm-sidebar .crm-brand-word{max-width:145px;white-space:normal;overflow-wrap:anywhere;font-size:15px;line-height:1.35}

/* Independent project work above navigation; the employee clock stays with the account. */
.sidebar.crm-sidebar { overflow: hidden; }
.sidebar.crm-sidebar > .brand,
.sidebar.crm-sidebar > .customer-scope-picker,
.sidebar.crm-sidebar > .sidebar-timer { flex-shrink: 0; }
.sidebar.crm-sidebar > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar.crm-sidebar .sidebar-footer { flex: 0 0 auto; margin-top: 8px; padding: 8px 4px 0; background: #fff; }
.sidebar.crm-sidebar .sidebar-project-time .sidebar-timer-row { display: grid; grid-template-columns: minmax(0,1fr) auto; flex-wrap: nowrap; align-items: center; gap: 6px; }
.sidebar.crm-sidebar .sidebar-project-time .sidebar-timer-row > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar.crm-sidebar .sidebar-project-time .sidebar-timer-clock { width: auto; font-size: 13px; }
.sidebar.crm-sidebar .sidebar-project-time > small { margin-top: 3px; }
.sidebar-personnel-time { margin: 0 0 10px; padding: 9px; border: 1px solid #e1e8f4; border-radius: 7px; background: #f7f9fd; color: #536786; }
.sidebar-personnel-time.is-running { border-color: #c9e4da; background: #f1faf6; }
.sidebar-personnel-time.is-paused { border-color: #f0dfb9; background: #fffbf1; }
.sidebar-personnel-heading { display: flex; gap: 7px; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sidebar-personnel-heading > strong { color: #263957; font-size: 11px; }
.sidebar-personnel-status { font-size: 9px; font-weight: 600; color: #38876f; }
.is-paused .sidebar-personnel-status { color: #9a6a19; }
.sidebar-personnel-label { display: block; font-size: 9px; }
.sidebar-personnel-clock { display: block; margin: 3px 0; color: #3156d3; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.sidebar-personnel-first { display: block; font-size: 9px; line-height: 1.5; }
.sidebar-personnel-actions { display: flex; gap: 5px; margin-top: 7px; }
.sidebar-personnel-actions .btn { flex: 1; min-height: 29px; padding: 5px; font-size: 10px; white-space: nowrap; }
.sidebar-personnel-actions .icon { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .sidebar-personnel-actions .btn { min-height: 40px; font-size: 11px; }
  .sidebar-personnel-heading > strong { font-size: 12px; }
  .sidebar-personnel-label,.sidebar-personnel-first { font-size: 10px; }
}
@media (max-height: 600px) {
  .sidebar.crm-sidebar { padding-top: 8px; padding-bottom: 8px; }
  .sidebar.crm-sidebar .brand,.sidebar.crm-sidebar .brand:has(.organization-logo) { padding-bottom: 7px; }
  .sidebar.crm-sidebar .brand .organization-logo { height: 30px; max-height: 30px; }
  .sidebar.crm-sidebar .customer-scope-picker { margin-bottom: 7px; }
  .sidebar.crm-sidebar > .sidebar-timer { margin-bottom: 7px; }
  .sidebar.crm-sidebar .sidebar-footer { margin-top: 4px; padding-top: 5px; }
  .sidebar-personnel-time { padding: 6px; margin-bottom: 6px; }
  .sidebar-personnel-clock { font-size: 18px; margin: 1px 0; }
  .sidebar-personnel-heading { margin-bottom: 2px; }
  .sidebar-personnel-actions { margin-top: 4px; }
}

/* Independent project pauses retain the original start, while the clock shows net work. */
.sidebar-project-time.is-paused { background: #fffbf1; border-color: #f0dfb9; }
.sidebar-project-time .project-time-started { display: block; color: #697892; font-size: 9px; }
.sidebar-project-time .sidebar-timer-actions { flex-wrap: wrap; }
.project-timer.timer-paused .timer-display { color: #ad7a2f; }
.topbar-timer.is-paused .live-dot { background: #ad7a2f; animation: none; }
.project-timer .project-time-started { display: block; margin-top: 5px; color: #71809a; }
.project-timer .timer-buttons { flex-wrap: wrap; }
.project-coupling { padding: 12px; border: 1px solid #dbe4f4; border-radius: 7px; background: #f7f9fe; }
.project-coupling .checkbox-label { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.project-coupling input[type=checkbox] { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.project-coupling small { display: block; margin-top: 5px; color: #697892; line-height: 1.5; overflow-wrap: anywhere; }
