/* Activity Feed & Deal Timeline */

.activity-feed,
.activity-timeline {
  max-width: 760px;
  margin-top: 1.5rem;
}

.activity-date-group {
  margin-bottom: 2rem;
}

.activity-date-divider {
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.activity-entry {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.activity-entry:last-child {
  border-bottom: none;
}

.activity-entry__deal-link {
  font-weight: 600;
  color: #2d6a4f;
  text-decoration: none;
  font-size: 0.9rem;
}

.activity-entry__deal-link:hover {
  text-decoration: underline;
}

.activity-entry__body {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.activity-entry__time {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

.activity-entry__description {
  font-size: 0.95rem;
  color: #333;
}

.activity-empty {
  color: #888;
  font-style: italic;
}
/* =====================================================
   Dashboard
   ===================================================== */

.dash-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 1.5rem;
}

.dash-card-number {
  width: 180px;
  height: 200px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.40);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-card-number__header {
  background-color: #4470a6;
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.dash-card-number__value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  font-weight: 700;
  color: #ababab;
  line-height: 1;
}

.dash-deal-card {
  width: 180px;
  min-height: 200px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.40);
  display: flex;
  flex-direction: column;
}

a.dash-deal-card,
a.dash-deal-card:hover,
a.dash-deal-card:visited {
  text-decoration: none;
}

.dash-deal-card__header {
  background-color: #479256;
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  min-height: 40px;
}

.dash-deal-card__body {
  flex: 1;
  padding: 0.6rem 1rem;
}

.dash-deal-card__value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #3a3a3a;
}

.dash-deal-card__type {
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
  background: #e8e8e8;
  color: #444;
  display: inline-block;
  margin-top: 0.4rem;
}

.dash-deal-card__progress {
  margin-top: 0.6rem;
}

.dash-deal-progress__days {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
}

.dash-deal-progress__tasks {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.2rem;
}
/* =====================================================
   Deals Builder
   ===================================================== */

body.deal-builder-page .main-content__body {
  background-color: #ebebeb;
  cursor: grab;
  padding-bottom: 32px;
}

body.deal-builder-page .main-content__body a,
body.deal-builder-page .main-content__body button,
body.deal-builder-page .main-content__body input,
body.deal-builder-page .main-content__body select,
body.deal-builder-page .main-content__body textarea {
  cursor: pointer;
}

/* Deal Header */

.deal-header {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.15);
  position: sticky;
  left: 0;
}

.deal-header__main {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.deal-header__main h1 {
  margin: 0;
}

.deal-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.8rem;
}

.deal-header__summary {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}

.deal-header__actions {
  display: flex;
  gap: 0.5rem;
}

/* Deal header two-column layout */

.deal-header__top {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.deal-header__left {
  flex: 1;
}

/* Deal Progress Panel */

.deal-header__progress {
  min-width: 200px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.85rem;
  background: #f7f9fb;
  border: 1px solid #dce3ea;
  border-radius: 6px;
}

.deal-progress__date {
  font-size: 0.85rem;
  color: #555;
}

.deal-progress__days {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 0.4rem;
}

.deal-progress__tasks {
  font-size: 0.85rem;
  color: #555;
}

.deal-progress__bar-wrap {
  background: #e0e0e0;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.deal-progress__bar-fill {
  height: 100%;
  background: #2faa59;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Status Badge */

.deal-status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: capitalize;
}

.deal-status-badge--pending    { background: #fef3c7; color: #92400e; }
.deal-status-badge--active     { background: #dcfce7; color: #15803d; }
.deal-status-badge--closed     { background: #e0e7ff; color: #3730a3; }
.deal-status-badge--cancelled  { background: #fee2e2; color: #991b1b; }

/* Zoom Toolbar */

.zoom-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: sticky;
  top: -32px;
  left: 0;
  z-index: 500;
  background-color: #ebebeb;
  box-shadow: -32px 0 0 0 #ebebeb, 32px 0 0 0 #ebebeb;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.zoom-label {
  font-size: 0.82rem;
  color: #666;
  margin-right: 0.2rem;
}

.zoom-btn {
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  color: #444;
}

.zoom-btn:hover {
  background: #f0f0f0;
}

.zoom-btn--active:hover {
  background: #6cbfdf;
  color: #ffffff;
}

.zoom-btn--active {
  background: #6cbfdf;
  color: #ffffff;
  font-weight: 600;
}

.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0 0.25rem;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1aa5da;
  cursor: pointer;
}

.zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1aa5da;
  cursor: pointer;
  border: none;
}

/* Deal Builder */

.deal-builder {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 42px;
  gap: 0;
  min-width: min-content;
}

.deal-builder__phases {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deal-builder__phases-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Deal Phase */

.deal-phase-block {
  width: max-content;
  min-width: 240px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.40);
}

.deal-phase-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
}

.deal-phase-header__actions {
  position: relative;
}

.deal-phase-header__actions .dropdown-menu {
  top: 22px;
}

.deal-phase-header__name {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1.4rem;
}

.deal-phase-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.deal-phase-add-row {
  display: flex;
  justify-content: center;
}

.deal-phase-connector {
  text-align: center;
  font-size: 2.4rem;
  color: #888;
  padding: 1.2rem 0;
  width: 100%;
}

/* Deal Sequence Row */

.deal-sequence-row {
  display: flex;
  flex-direction: column;
}

.deal-sequence-row__items {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.deal-sequence-row__add {
  position: relative;
  display: flex;
  align-items: center;
}

.deal-sequence-row-connector {
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  padding: 0.1rem 0;
}

/* Deal Task Card */

.deal-task-card {
  background: #eeecec;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  width: 190px;
  min-width: 190px;
  max-height: max-content;
  flex: 0 0 190px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin: 2px 14px 14px 5px;
}

.deal-task-card__actions {
  position: relative;
}

.deal-task-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 0px 0px 8px 0px;
}

.deal-task-card__name {
  font-weight: 500;
  font-size: 0.9rem;
  flex: 1;
}

.deal-task-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.deal-task-card__assignee {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 4px;
  background: #e8e8e8;
  color: #444;
}

.deal-task-card__assignee--admin    { background: #a0aaaf; color: #ffffff; }
.deal-task-card__assignee--client   { background: #48a8ec; color: #ffffff; }
.deal-task-card__assignee--vendor   { background: #ffcf0d; color: #000000; }
.deal-task-card__assignee--lender   { background: #8462b9; color: #ffffff; }

.deal-task-card__assigned-vendor-type {
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
}

.deal-task-card__deal-client,
.deal-group-task__deal-client {
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
  background: #919191;
  color: #ffffff;
  margin: 8px 0px 8px 0px;
}

.deal-task-card__assigned-vendor,
.deal-group-task__assigned-vendor {
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
  background: #919191;
  color: #ffffff;
  margin: 8px 0px 8px 0px;
}

.deal-task-card__assigned-user,
.deal-group-task__assigned-user {
  font-size: 0.8rem;
  padding: 5px 8px;
  border-radius: 4px;
  background: #f2f2f2;
  color: #4a4a4a;
  margin: 8px 0px 8px 0px;
}

.deal-task-card__doc-required {
  font-size: 0.9rem;
}

.deal-task-card__locked {
  font-size: 0.9rem;
}

.deal-task-card__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.deal-task-card__due-date,
.deal-group-task__due-date {
  font-size: 0.85rem;
  color: #666;
  margin: 0px 0px 6px 3px;
}

.deal-task-card__notes {
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.4rem;
  font-style: italic;
  white-space: pre-wrap;
}

/* Inline editing — name input in header */

input[type="text"].deal-task-card__name-input {
  flex: 1;
  border: none;
  background-color: transparent;
  background-image: none;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0;
  margin: 0;
  outline: none;
  min-width: 0;
  color: inherit;
  width: auto;
}

input[type="text"].deal-task-card__name-input:hover,
input[type="text"].deal-task-card__name-input:focus {
  background-color: transparent;
  background-image: none;
  border: none;
  outline: none;
}

/* Always-visible fields container */

.deal-task-card__fields {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.4rem;
  width: 100%;
}

.deal-task-card__field-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.deal-task-card__field-row--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.deal-task-card__field-label {
  display: block;
  font-size: 0.62rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2px 0px 0px 0px;
}

/* Selects inside the card */

.deal-task-card__select,
.deal-task-card__input {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.deal-task-card__select:hover,
.deal-task-card__input:hover {
  border-color: #bbb;
  background: rgba(255, 255, 255, 0.6);
}

.deal-task-card__select:focus,
.deal-task-card__input:focus {
  border-color: #888;
  background: #fff;
  outline: none;
}



/* Date input — override Chrome's internal spin-box sizing */

input[type="date"].deal-task-card__input {
  width: 100%;
  margin: 0px 0px 14px 0px;
  font-size: 0.72rem;
  padding: 3px 4px;
}

/* Date input calendar picker icon */

input[type="date"].deal-task-card__input::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  filter: invert(40%);
  font-size: 1rem;
  padding: 0;
}

/* Vendor type select */

.deal-task-card__select--vendor-type,
.deal-task-card__select--vendor-type:focus {
  background: #fceba8;
  color: #000;
  border: none;
}

.deal-task-card__select--vendor-type:hover {
  background: #f5df7e;
  border-color: transparent;
}

/* Guided task select — subtle differentiation */

.deal-task-card__select--guided {
  font-size: 0.75rem;
  color: #666;
}

/* Textarea */

.deal-task-card__textarea {
  width: 100%;
  font-size: 0.8rem;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  resize: vertical;
  box-sizing: border-box;
}

.deal-task-card__textarea:focus {
  border-color: #888;
  background: #fff;
  outline: none;
}

/* Expand toggle */

.deal-task-card__expand-toggle {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 3px 0;
  background: none;
  border: none;
  border-top: 1px solid #ddd;
  font-size: 0.75rem;
  color: #888;
  cursor: pointer;
  text-align: center;
}

.deal-task-card__expand-toggle:hover {
  color: #444;
}

/* Expandable section */

.deal-task-card__expandable {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.4rem;
}

.deal-task-card__expandable--open {
  display: flex;
}

/* Documents button */

.deal-task-card__documents-btn {
  display: inline-flex;
  align-items: center;
  background-color: #ececec;
  color: #027dc5;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 8px 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.deal-task-card__documents-btn:hover {
  background-color: #dcdcdc;
}

/* Vendor type browser (reused inside card) */

.deal-task-card__vendor-type-wrap {
  position: relative;
  margin-bottom: 2px;
}

.deal-task-card__vendor-type-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.deal-task-card__vendor-browse-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1em;
  color: #666;
  padding: 0px 1px 12px 0px;
  line-height: 1;
}

.deal-task-card__vendor-browse-panel {
  margin-bottom: 4px;
}

.deal-task-card__vendor-search {
  width: 100%;
  margin-bottom: 4px;
  font-size: 0.8rem;
  padding: 3px 5px;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-sizing: border-box;
}

.deal-task-card__vendor-browser {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85em;
  background: #fff;
}

/* Task Status Badge */

.deal-task-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  margin: 8px 0px 10px 0px;
}

.deal-task-status--not_started { background: #f3f4f6; color: #6b7280; }
.deal-task-status--in_progress { background: #dcfce7; color: #093f1d; }
.deal-task-status--complete    { background: #2faa59; color: #ffffff; }

/* Deal Group Box */

.deal-group-box {
  border-radius: 6px;
  min-width: 180px;
  flex: 0 0 auto;
  background: #d7d7d7;
  margin: 0px 14px 14px 5px;
  border: solid 2px #c7c7c7;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
}

/* Alternating background colors for nested group levels */
.deal-group-box--depth-1,
.deal-group-box--depth-3,
.deal-group-box--depth-5,
.deal-group-box--depth-7,
.deal-group-box--depth-9 {
  background: #e7e7e7;
}

.deal-group-box--depth-2,
.deal-group-box--depth-4,
.deal-group-box--depth-6,
.deal-group-box--depth-8,
.deal-group-box--depth-10 {
  background: #d7d7d7;
}

.deal-group-box__actions {
  position: relative;
}

.deal-group-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: #efefef;
  border-bottom: 1px solid #ddd;
  border-radius: 4px 4px 0 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.deal-group-box__name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

input[type="text"].deal-group-box__name-input {
  flex: 1;
  border: none;
  background-color: transparent;
  background-image: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
  outline: none;
  min-width: 0;
  color: inherit;
  width: auto;
}

input[type="text"].deal-group-box__name-input:hover,
input[type="text"].deal-group-box__name-input:focus {
  background-color: transparent;
  background-image: none;
  border: none;
  outline: none;
}

.deal-group-box > turbo-frame {
  display: block;
  padding: 0.2rem;
}

.deal-group-box__tasks {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  flex-wrap: wrap;
  min-height: 52px;
  justify-content: center;
}

.deal-group-box--sequential > .deal-group-box__tasks {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
}

/* CSS connector arrows between sequential group children */
.deal-group-box--sequential > .deal-group-box__tasks > * + * {
  position: relative;
  margin-top: 1.6rem;
}

.deal-group-box--sequential > .deal-group-box__tasks > * + *::before {
  content: "↓";
  position: absolute;
  top: -1.9rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  height: 1.4rem;
  line-height: 1.4rem;
}

.deal-group-box--parallel > .deal-group-box__tasks {
  flex-direction: row;
}

/* Deal Group Task */

.deal-group-task {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.4rem 0.5rem 0.8rem 0.5rem;
  font-size: 0.85rem;
  width: 190px;
  min-width: 190px;
  height: max-content;
  box-sizing: border-box;
  margin: 3px 0px 0px 0px;
}

.deal-group-task__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  margin: 0px 0px 8px 0px;
}

.deal-group-task__actions {
  position: relative;
}

.deal-group-task__name {
  font-weight: 500;
  flex: 1;
}

.deal-group-task__meta {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.deal-group-task__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}


/* =====================================================
   Deal Calendar
   ===================================================== */

.deal-calendar-page {
  padding: 1.5rem 2rem;
}

/* Toolbar: toggle + month nav */

.deal-calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.deal-calendar-toggle {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.deal-calendar-toggle__btn {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: #444;
  background: #fff;
}

.deal-calendar-toggle__btn + .deal-calendar-toggle__btn {
  border-left: 1px solid #ccc;
}

.deal-calendar-toggle__btn--active {
  background: #1aa5da;
  color: #fff;
  font-weight: 600;
}

.deal-calendar-toggle__btn:hover:not(.deal-calendar-toggle__btn--active) {
  background: #f0f0f0;
}

.deal-calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.deal-calendar-month-nav__btn {
  padding: 0.3rem 0.7rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: #444;
  font-size: 1rem;
  line-height: 1;
}

.deal-calendar-month-nav__btn:hover {
  background: #f0f0f0;
}

.deal-calendar-month-nav__title {
  font-weight: 600;
  font-size: 1rem;
  min-width: 130px;
  text-align: center;
}

/* Share panel */

.cal-share-panel {
  background: #f7f9fb;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cal-share-panel__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cal-share-panel__note {
  font-size: 0.85rem;
  color: #666;
}

.cal-share-panel__url-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cal-share-panel__url-input {
  flex: 1;
  font-size: 0.82rem;
  font-family: monospace;
  padding: 0.35rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: text;
}

.cal-share-panel__google-note {
  font-size: 0.85rem;
  color: #555;
}

.cal-share-panel__regenerate {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid #e0e6ec;
  margin-top: 0.1rem;
}

.cal-share-panel__regenerate-note {
  font-size: 0.82rem;
  color: #888;
}

/* Legend */

.deal-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cal-legend-item {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 10px;
}

.cal-legend-item--deal_date   { background: #1aa5da; color: #fff; }
.cal-legend-item--admin_task  { background: #a0aaaf; color: #fff; }
.cal-legend-item--client_task { background: #48a8ec; color: #fff; }
.cal-legend-item--vendor_task { background: #ffcf0d; color: #000; }
.cal-legend-item--lender_task { background: #8462b9; color: #fff; }

/* Overview: multi-month grid */

.deal-calendar-overview {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.deal-calendar-month-wrap {
  min-width: 0;
}

/* In overview mode hide the simple-calendar prev/today/next nav */
.deal-calendar-overview .calendar-heading nav {
  display: none;
}

/* Single month */

.deal-calendar-single {
  max-width: 800px;
}

/* simple-calendar base styles */

.simple-calendar .calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f5f7fa;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.simple-calendar .calendar-heading nav {
  display: flex;
  gap: 0.4rem;
}

.simple-calendar .calendar-heading nav a {
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  text-decoration: none;
  color: #444;
  background: #fff;
}

.simple-calendar .calendar-heading nav a:hover {
  background: #f0f0f0;
}

.simple-calendar table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.simple-calendar thead th {
  background: #f0f2f5;
  border: 1px solid #ddd;
  padding: 0.35rem 0.25rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
}

.simple-calendar td.day {
  border: 1px solid #ddd;
  padding: 0.35rem 0.3rem;
  vertical-align: top;
  height: 76px;
  background: #fff;
  overflow: hidden;
}

.simple-calendar td.prev-month,
.simple-calendar td.next-month {
  background: #f8f8f8;
}

.simple-calendar td.prev-month .cal-day-number,
.simple-calendar td.next-month .cal-day-number {
  color: #bbb;
}

.simple-calendar td.today {
  background: #eff8ff;
}

.simple-calendar td.today .cal-day-number {
  color: #1aa5da;
  font-weight: 700;
}

.cal-day-number {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.15rem;
  line-height: 1;
}

/* Calendar event chips */

.cal-event {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  position: relative;
  display: block;
}

.cal-event--deal_date   { background: #1aa5da; color: #fff; }
.cal-event--admin_task  { background: #a0aaaf; color: #fff; }
.cal-event--client_task { background: #48a8ec; color: #fff; }
.cal-event--vendor_task { background: #ffcf0d; color: #000; }
.cal-event--lender_task { background: #8462b9; color: #fff; }

/* Hover tooltip */

.cal-event[data-tooltip] {
  cursor: pointer;
}

.cal-event[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: normal;
  width: 220px;
  z-index: 300;
  pointer-events: none;
  line-height: 1.4;
}

/* =====================================================
   Signing — Status Badges
   ===================================================== */

.signing-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: capitalize;
}

.signing-status-badge--pending     { background: #e8e8e8; color: #555; }
.signing-status-badge--in_progress { background: #fff3cd; color: #856404; }
.signing-status-badge--complete    { background: #d4edda; color: #155724; }
.signing-status-badge--declined    { background: #f8d7da; color: #721c24; }
.signing-status-badge--expired     { background: #f0f0f0; color: #888; }

.signing-signer-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.signing-signer-status-badge--awaiting { background: #fff3cd; color: #856404; }
.signing-signer-status-badge--signed   { background: #d4edda; color: #155724; }
.signing-signer-status-badge--declined { background: #f8d7da; color: #721c24; }

/* =====================================================
   Signing — Deal Task Card
   ===================================================== */

.deal-task-card__signing {
  border-top: 1px solid #eee;
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deal-task-card__signer-line {
  font-size: 0.78rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
}

.deal-task-card__signing-link {
  font-size: 0.78rem;
  color: #3a7bd5;
  text-decoration: none;
}

.deal-task-card__signing-link:hover {
  text-decoration: underline;
}

.deal-task-card__send-for-signing {
  display: inline-block;
  font-size: 0.78rem;
  color: #36ac76;
  text-decoration: none;
  font-weight: 600;
  margin: 2px 0px 0px 5px;
}

.deal-task-card__send-for-signing:hover {
  text-decoration: underline;
}

/* =====================================================
   Signing — New Form Page
   ===================================================== */

.signing-form-page {
  max-width: 700px;
  padding: 24px 0;
}

.signing-form-task-info {
  font-size: 1rem;
  color: #555;
  margin-bottom: 24px;
}

.signing-form-alert {
  background: #f8d7da;
  color: #721c24;
  border-radius: 4px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.signing-form-section {
  margin-bottom: 20px;
}

.signing-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.signing-inline-note {
  display: block;
  font-size: 0.85rem;
  color: #777;
  margin-top: 4px;
}

.signing-signers-section h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.signer-row {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fafafa;
}

.signer-row__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.signer-row__remove {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
}

.signer-row__remove:hover {
  text-decoration: underline;
}

.signer-row__signing-as {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.signer-row__signing-as-label {
  font-size: 0.95rem;
  color: #444;
}

.signer-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.95rem;
  cursor: pointer;
  margin: 0;
}

.signing-add-signer-btn {
  display: inline-block;
  background: none;
  border: 1px dashed #3a7bd5;
  color: #3a7bd5;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 20px;
}

.signing-add-signer-btn:hover {
  background: #f0f6ff;
}

.signing-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

/* =====================================================
   Signing — Show Page
   ===================================================== */

.signing-show-page {
  max-width: 700px;
  padding: 24px 0;
}

.signing-show-meta {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px 24px;
  background: #fafafa;
  margin-bottom: 28px;
}

.signing-show-meta__row {
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.signing-show-meta__row:last-child {
  border-bottom: none;
}

.signing-show-signers h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.signing-signer-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: #fff;
}

.signing-signer-row__order {
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  min-width: 24px;
  padding-top: 2px;
}

.signing-signer-row__info {
  flex: 1;
}

.signing-signer-row__name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.signing-signer-row__email {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 2px;
}

.signing-signer-row__business {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 2px;
}

.signing-signer-row__signing-as {
  font-size: 0.8rem;
  color: #999;
}

.signing-signer-row__status {
  text-align: right;
  min-width: 90px;
}

.signing-signer-row__signed-at {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
/* Form element styles */

label {
  display: block;
  margin: 16px 0px 8px 0px;
}

label + input,
label + textarea,
label + select {
  display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  border: none;
  border-radius: 4px;
  background-color: #f2f2f2;
  background-image: radial-gradient(ellipse at center, #f2f2f2 40%, #e6e6e6 100%);
  color: #444444;
  padding: 10px 14px;
  font-size: 1.1rem;
  line-height: 1.5;
  box-sizing: border-box;
  outline: none;
  margin: 4px 4px 18px 0px;
  width: 360px;
}

button.btn-cancel {
  background-color: #d0d0d0;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

button.btn-cancel:hover {
  background-color: #b8b8b8;
}

input[type="submit"],
button[type="submit"] {
  background-color: #3a7bd5;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background-color: #2f67b8;
}

a.button-link-manage {
  display: inline-flex;
  align-items: center;
  background-color: #3a7bd5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

a.button-link-manage:hover {
  background-color: #2f67b8;
}

a.button-link-cancel,
button.button-link-cancel {
  display: inline-flex;
  align-items: center;
  background-color: #d0d0d0;
  color: #1a1a1a;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

a.button-link-cancel:hover,
button.button-link-cancel:hover {
  background-color: #b8b8b8;
}

a.button-link-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #36ac76;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 4px;
  font-size: 1.1rem;
  cursor: pointer;
  min-width: 50px;
}

a.button-link-edit--wide {
  min-width: 86px;
}

a.button-link-edit:hover,
button.button-link-edit:hover {
  background-color: #2d9464;
}

button.button-link-edit {
  display: inline-flex;
  align-items: center;
  background-color: #36ac76;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 4px;
  font-size: 1.1rem;
  cursor: pointer;
}

button.button-link-add-new-type-2 {
  display: inline-flex;
  align-items: center;
  background-color: #36ac76;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  margin: 8px 4px;
  font-size: 1.1rem;
  cursor: pointer;
}

button.button-link-add-new-type-2:hover {
  background-color: #2d9464;
}

a.button-link-view {
  display: inline-flex;
  align-items: center;
  background-color: #5e5e5e;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 4px;
  font-size: 1.1rem;
  cursor: pointer;
}

a.button-link-view:hover {
  background-color: #444444;
}

button.button-delete {
  display: inline-flex;
  align-items: center;
  background-color: #c0392b;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

button.button-delete:hover {
  background-color: #a93226;
}

a.button-link-danger {
  display: inline-flex;
  align-items: center;
  background-color: #c0392b;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 4px;
  font-size: 1.1rem;
  cursor: pointer;
}

a.button-link-danger:hover {
  background-color: #a93226;
}

a.button-link-add-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #3a7bd5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

a.button-link-add-new:hover {
  background-color: #2f67b8;
}

a.button-link-add-new img {
  width: 18px;
  height: 18px;
}

/* Delivery item blocks */

.delivery-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 20px;
  background-color: #fafafa;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.32);
}

.delivery-item__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #555555;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  margin: 0px 6px 0px 0px;
}

.delivery-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-weight: bold;
  font-size: 1.05rem;
}

.delivery-item__remove {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
}

.delivery-item__remove:hover {
  text-decoration: underline;
}

.delivery-item__divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 16px 0 4px;
}

.delivery-item__items {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.delivery-item__items input[type="number"] {
  width: 120px;
}

.delivery-item__cost {
}

.order-total__divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 20px 0 0;
}

.order-total {
  margin: 16px 0 8px;
}

.order-total__label {
  display: block;
  font-size: 1.1rem;
  color: #444444;
}

.order-total__value {
  display: inline-block;
  font-size: 2rem;
  font-weight: bold;
  color: #1a1a1a;
  margin-top: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  padding: 10px 20px;
  min-width: 240px;
  text-align: left;
}

.delivery-item__cost-value {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  color: #1a1a1a;
  margin-top: 4px;
}

/* Pickup + Dropoff side-by-side layout */

.delivery-locations {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.delivery-location-col {
  flex: 1;
  min-width: 0;
}

.delivery-location-col .location-preview {
  width: 100%;
  box-sizing: border-box;
}

.delivery-location-col input[type="text"],
.delivery-location-col input[type="datetime-local"],
.delivery-location-col textarea,
.delivery-location-col select {
  width: 100%;
  box-sizing: border-box;
}

/* Location blocks */

.location-block {
  margin-bottom: 8px;
}

.location-preview {
  margin-top: 8px;
}

.location-manual {
  margin-top: 4px;
}

.location-back-link {
  display: inline-flex;
  align-items: center;
  background-color: #3a7bd5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 0px 0px 24px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

.location-back-link:hover {
  background-color: #2f67b8;
}

.location-new-link {
  display: inline-block;
  background: none;
  border: none;
  color: #3a7bd5;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin: 0px 0px 12px 9px;
  text-decoration: none;
}

.location-new-link:hover {
  text-decoration: underline;
}

.location-save-option {
  margin-top: 4px;
  font-size: 0.9rem;
}

.save-location-name {
  margin: 18px 0px 0px 0px;
}

.save-location-name input[type="text"] {
  width: 280px;
}

.basic-info-card-1.basic-info-card-1--white {
  background-color: #ffffff;
}

/* button element variant */

button.button-link-add-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #3a7bd5;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 8px 0px;
  font-size: 1.1rem;
  cursor: pointer;
}

button.button-link-add-new:hover {
  background-color: #2f67b8;
}

button.button-link-add-new img {
  width: 18px;
  height: 18px;
}

/* Document modal */

dialog.document-modal {
  border: none;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  width: 480px;
  max-width: 95vw;
}

dialog.document-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.document-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #e0e0e0;
}

.document-modal__header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.document-modal__section {
  padding: 16px 20px;
}

.document-modal__section h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.document-modal__section + .document-modal__section {
  border-top: 1px solid #e0e0e0;
}

.document-modal__file-input {
  display: block;
  margin-bottom: 10px;
}

.document-modal__version {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}

.document-modal__version:last-child {
  border-bottom: none;
}

.document-modal__version-date {
  color: #888;
  font-size: 0.85em;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
  background-color: #e8e8e8;
}
/* Page layout */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.page-layout {
  display: flex;
  height: 100vh;
}

/* Sidebar nav */

.sidebar {
  width: 300px;
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: #eaeaea;
  color: #4b4b4b;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  box-sizing: border-box;
  transition: width 0.25s ease;
  overflow: hidden;
}

/* Admin sidebar overrides (dark theme) */

.sidebar--admin {
  background-color: #f4f4f4ad;
  color: #5b5b5b;
  border-right: solid 2px #4792564d;
}

.sidebar--admin .sidebar__icons {
  border-bottom-color: #cacaca;
}

.sidebar--admin .sidebar__nav a,
.sidebar--admin .sidebar__nav form button {
  color: #7c7c7c;
}

.sidebar--admin .sidebar__nav a:hover,
.sidebar--admin .sidebar__nav form button:hover {
  background-color: #eaeaea;
  color: #7c7c7c;
}

.sidebar--admin .sidebar__nav .sidebar__logout {
  border-top-color: #cacaca;
}

.sidebar--admin .sidebar__icons > img:last-child:hover {
  filter: brightness(0) invert(1);
}

/* Compact sidebar state */

.sidebar--compact {
  width: 80px;
}

.sidebar--compact .sidebar__icons {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar--compact .sidebar__icons > img:last-child {
  height: 16px;
}

.sidebar--compact .sidebar__title {
  display: none;
}

.sidebar--compact .sidebar__nav {
  display: none;
}

.sidebar--compact .sidebar__nav-compact {
  display: flex;
}

/* Compact nav icons */

.sidebar__nav-compact {
  display: none;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  gap: 8px;
}

.sidebar__nav-compact img {
  height: 28px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.sidebar__nav-compact img:hover {
  opacity: 1;
}

.sidebar--admin .sidebar__nav-compact img:hover {
  filter: brightness(0) invert(1);
}

.sidebar--admin .sidebar__nav-compact .sidebar-nav-compact-link img:hover {
  filter: invert(44%) sepia(30%) saturate(600%) hue-rotate(90deg) brightness(88%);
}

.sidebar-nav-compact-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  width: 100%;
  margin-left: 8px;
}

.sidebar-nav-compact-link .sidebar-nav-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.sidebar-nav-compact-link:hover .sidebar-nav-icon:not(svg),
.sidebar-nav-compact-link.sidebar-nav-active .sidebar-nav-icon:not(svg) {
  opacity: 1;
  filter: invert(44%) sepia(30%) saturate(600%) hue-rotate(90deg) brightness(88%);
}

.sidebar-nav-compact-link:hover .sidebar-nav-icon:is(svg),
.sidebar-nav-compact-link.sidebar-nav-active .sidebar-nav-icon:is(svg) {
  opacity: 1;
}

/* Abbreviation badge (replaces placeholder icon in portal sidebars) */

.sidebar__abbrev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 46px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  letter-spacing: -0.5px;
  box-sizing: border-box;
}

.sidebar__abbrev--green {
  background-color: #3a9e6e;
}

.sidebar__abbrev--tangerine {
  background-color: #e07b39;
}

.sidebar__icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 16px 16px;
  border-bottom: 1px solid #cccccc;
  margin-bottom: 0;
}

.sidebar__icons img {
  height: 40px;
  opacity: 0.6;
}

.sidebar__logo-link img {
  opacity: 1;
}

.sidebar__logo-link,
.sidebar__logo-link:hover {
  display: flex;
  background: none;
  cursor: pointer;
}

.sidebar__icons > img:last-child {
  height: 20px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.sidebar__icons > img:last-child:hover {
  opacity: 1;
}

.sidebar__toggle-icon img {
  height: 18px;
  opacity: 0.8;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.sidebar--compact .sidebar__toggle-icon {
  margin-top: 6px;
}

.sidebar__toggle-icon:hover img {
  opacity: 1;
  filter: brightness(0.4);
}

.sidebar__title {
  font-weight: bold;
  font-size: 1.1rem;
  padding: 16px 20px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar__nav a,
.sidebar__nav form button {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #4b4b4b;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.sidebar__nav a:hover,
.sidebar__nav form button:hover {
  background-color: #d4d4d4;
  color: #1a1a1a;
}

.sidebar__nav a:hover .sidebar-nav-icon:not(svg),
.sidebar__nav a.sidebar-nav-active .sidebar-nav-icon:not(svg) {
  filter: invert(44%) sepia(30%) saturate(600%) hue-rotate(90deg) brightness(88%);
}

.sidebar__nav a.sidebar-nav-active {
}

/* Users inline SVG active state */
.sidebar-nav-users-link.sidebar-nav-active .users-icon-fill { fill: url(#users-icon-gradient); }
.sidebar-nav-users-link.sidebar-nav-active .users-icon-head { fill: url(#users-icon-gradient-inv); }
.sidebar-nav-users-link.sidebar-nav-active .users-icon-stroke { stroke: #4a9a80; }
.sidebar-nav-users-link.sidebar-nav-active .users-icon-cutout { fill: #eaeaea; }

/* Inline SVG users icon */
.users-icon-fill { fill: #666666; }
.users-icon-cutout { fill: #f4f4f4; }
.users-icon-stroke { stroke: #666666; fill: none; }

.sidebar-nav-users-link:hover .users-icon-fill { fill: url(#users-icon-gradient); }
.sidebar-nav-users-link:hover .users-icon-head { fill: url(#users-icon-gradient-inv); }
.sidebar-nav-users-link:hover .users-icon-stroke { stroke: #4a9a80; }
.sidebar-nav-users-link:hover .users-icon-cutout { fill: #eaeaea; }

.sidebar-nav-icon {
  width: 26px;
  height: 26px;
  margin: 0px 9px 1px 0px;
  vertical-align: middle;
  flex-shrink: 0;
}

.sidebar-nav-icon--sm {
  width: 20px;
  height: 20px;
}

.basic-info-card-1--vendor-types p {
  font-weight: 600;
  margin: 20px 4px;
}

.sidebar__section-label {
  padding: 28px 20px 4px 20px;
  font-size: 0.78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
}

.sidebar__nav .sidebar__logout {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #cccccc;
}

/* Main content area */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.main-content__body {
  flex: 1;
  padding: 32px 32px 200px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: auto;
  overflow-anchor: none;
}

/* Login page */

.login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20vh;
  box-sizing: border-box;
}

/* Info card */

.basic-info-card-1 {
  background-color: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  padding: 16px 20px;
  display: block;
  width: 45%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.login-box {
  width: 360px;
  margin-left: 1%;
}

/* Copy URL field */

.copy-url {
  display: inline-flex;
  align-items: center;
  background-color: #f2f2f2;
  background-image: radial-gradient(ellipse at center, #f2f2f2 40%, #e6e6e6 100%);
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 8px 10px 8px 14px;
  font-size: 1rem;
  color: #444444;
  max-width: 500px;
  box-sizing: border-box;
}

.copy-url__text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: #444444;
}

.copy-url__btn {
  background: none;
  border: none;
  padding: 0 0 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.copy-url__btn img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.copy-url__btn:hover img {
  opacity: 1;
}

.basic-info-card-1 {
  background-color: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  padding: 16px 20px;
  display: block;
  width: 45%;
  box-sizing: border-box;
  margin-bottom: 16px;
}
/* Data table — CSS grid-based table layout */

.data-table {
  display: block;
  margin-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.data-table__header,
.data-table__row {
  display: grid;
}

.data-table--3col .data-table__header,
.data-table--3col .data-table__row {
  grid-template-columns: 1fr 1fr 1fr;
}

.data-table--4col .data-table__header,
.data-table--4col .data-table__row {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.data-table--5col .data-table__header,
.data-table--5col .data-table__row {
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.data-table--6col .data-table__header,
.data-table--6col .data-table__row {
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
}

.data-table--7col .data-table__header,
.data-table--7col .data-table__row {
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}

.data-table__header .data-table__cell {
  font-weight: bold;
  background-color: #f2f2f2;
  border-bottom: 2px solid #d0d0d0;
}

.data-table__row:hover .data-table__cell {
  background-color: #fafafa;
}

a.row-nav-link {
  color: inherit;
  text-decoration: none;
}

.data-table__cell {
  padding: 10px 14px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* =====================================================
   Template Builder
   ===================================================== */

body.template-builder-page .main-content__body {
  background-color: #ebebeb;
  cursor: grab;
  padding-bottom: 32px;
}

body.template-builder-page .main-content__body a,
body.template-builder-page .main-content__body button,
body.template-builder-page .main-content__body input,
body.template-builder-page .main-content__body select,
body.template-builder-page .main-content__body textarea {
  cursor: pointer;
}

.builder-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: sticky;
  left: 0;
}

.builder-header h1 {
  margin: 0;
}

.builder-header__deal-type {
  font-size: 1.3rem;
  opacity: 0.6;
  margin: 8px 0px 0px 2px;
}

/* Zoom Toolbar */

.zoom-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: sticky;
  top: -32px;
  left: 0;
  z-index: 500;
  background-color: #ebebeb;
  box-shadow: -32px 0 0 0 #ebebeb, 32px 0 0 0 #ebebeb;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.zoom-label {
  font-size: 0.82rem;
  color: #666;
  margin-right: 0.2rem;
}

.zoom-btn {
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  color: #444;
}

.zoom-btn:hover {
  background: #f0f0f0;
}

.zoom-btn--active:hover {
  background: #6cbfdf;
  color: #ffffff;
}

.zoom-btn--active {
  background: #6cbfdf;
  color: #ffffff;
  font-weight: 600;
}

.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0 0.25rem;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1aa5da;
  cursor: pointer;
}

.zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1aa5da;
  cursor: pointer;
  border: none;
}

.builder {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 42px;
  gap: 0;
  min-width: min-content;
}

.builder__phases {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.builder__phases-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Phase */

.phase-block {
  width: max-content;
  min-width: 240px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.40);
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
}

.phase-header__drag-handle {
  cursor: grab;
  color: #333333;
  font-size: 1rem;
  user-select: none;
}

.drag-handle {
  cursor: grab;
  color: #333333;
  user-select: none;
  flex-shrink: 0;
  line-height: 1;
  padding: 3px 3px 3px 3px;
  border-radius: 4px;
}

.group-box__header .drag-handle,
.deal-group-box__header .drag-handle {
  font-size: 0.8rem;
}

.task-card__header .drag-handle,
.deal-task-card__header .drag-handle {
  font-size: 0.9rem;
}

.group-task__header .drag-handle,
.deal-group-task__header .drag-handle {
  font-size: 0.75rem;
}

.phase-header__name {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1.4rem;
}

.phase-header__name input[type="text"] {
  font-weight: 600;
  font-size: 1.4rem;
  padding: 0.2rem 0.4rem;
  border: none;
  border-radius: 4px;
}

.phase-header__actions {
  position: relative;
}

.phase-header__actions .dropdown-menu {
  top: 22px;
}

.phase-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.phase-add-row {
  display: flex;
  justify-content: center;
}

.phase-add-item {
  margin-top: 0.75rem;
  position: relative;
  display: inline-block;
  align-self: flex-start;
}

.btn-add-phase {
  padding: 0.4rem 1rem;
  background: #fff;
  border: 1px dashed #888;
  border-radius: 4px;
  cursor: pointer;
  color: #555;
}

.btn-add-phase:hover {
  background: #f0f0f0;
}

.btn-add-item {
  padding: 0.3rem 0.75rem;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-add-item:hover {
  background: #f5f5f5;
}

/* Phase connector */

.phase-connector {
  text-align: center;
  font-size: 2.4rem;
  color: #888;
  padding: 1.2rem 0;
  width: 100%;
}

/* SequenceRow */

.sequence-row {
  display: flex;
  flex-direction: column;
}

.sequence-row__items {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.sequence-row-connector {
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  padding: 0.1rem 0;
}

.sequence-row__add {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-add-parallel {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  border: 1.5px solid #13c660;
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #13c660;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add-parallel:hover {
  background-color: #f1fff7;
}

/* Task Card */

.task-card {
  background: #eeecec;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  min-width: 160px;
  min-height: 100px;
  max-height: max-content;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin: 2px 14px 14px 5px;
}

.task-card__actions {
  position: relative;
}

.task-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.task-card__name {
  font-weight: 500;
  font-size: 0.9rem;
  flex: 1;
}

.task-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.task-card__assignee {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 4px;
  background: #e8e8e8;
  color: #444;
}

.task-card__assignee--admin    { background: #a0aaaf; color: #ffffff; }
.task-card__assignee--client   { background: #48a8ec; color: #ffffff; }
.task-card__assignee--vendor   { background: #ffcf0d; color: #000000; }
.task-card__assignee--lender   { background: #8462b9; color: #ffffff; }

.task-card__doc-required {
  font-size: 0.9rem;
}

.document-required-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0px 0px 12px 0px;
}

.task-card turbo-frame input:not([type="submit"]),
.task-card turbo-frame select {
  background-image: radial-gradient(ellipse at center, #ffffff 40%, #f6f6f6 100%);
}

.edge-btn {
  position: absolute;
  background-color: #dbdbdb;
  color: #555;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}

.edge-btn--right {
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
}

.edge-btn--bottom {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
}

.edge-btn:not(.edge-btn--group):hover {
  background-color: #0cb4f5;
  color: white;
  border-radius: 50%;
}

.edge-btn--group {
  background-color: #0db4f5;
  color: white;
}

.edge-btn--group:hover {
  background-color: #0b97ce;
}

.edge-btn > button {
  background: none;
  border-radius: 50%;
  color: inherit;
  font-size: inherit;
  cursor: inherit;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-btn > button:hover {
  background: none;
  border-color: transparent;
}

/* Group Box */

.group-box {
  border-radius: 6px;
  min-width: 180px;
  flex: 0 0 auto;
  background: #d7d7d7;
  margin: 0px 14px 14px 5px;
  border: solid 2px #c7c7c7;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
}

/* Alternating background colors for nested group levels */
.group-box--depth-1,
.group-box--depth-3,
.group-box--depth-5,
.group-box--depth-7,
.group-box--depth-9 {
  background: #e7e7e7;
}

.group-box--depth-2,
.group-box--depth-4,
.group-box--depth-6,
.group-box--depth-8,
.group-box--depth-10 {
  background: #d7d7d7;
}

.group-box__actions,
.group-task__actions {
  position: relative;
}

.group-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: #efefef;
  border-bottom: 1px solid #ddd;
  border-radius: 4px 4px 0 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.group-box__name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.group-type-icon {
  display: block;
  flex-shrink: 0;
  width: auto;
}

.group-box--parallel .group-type-icon,
.deal-group-box--parallel .group-type-icon {
  height: 12px;
}

.group-box--sequential .group-type-icon,
.deal-group-box--sequential .group-type-icon {
  height: 14px;
}

.group-box > turbo-frame {
  display: block;
  padding: 0.2rem;
}

.group-box > turbo-frame input:not([type="submit"]),
.group-box > turbo-frame select {
  background-image: radial-gradient(ellipse at center, #ffffff 40%, #f6f6f6 100%);
}

.group-box__tasks {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  flex-wrap: wrap;
  min-height: 52px;
  justify-content: center;
}

.group-box--sequential > .group-box__tasks {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
}

/* CSS connector arrows between sequential group children */
.group-box--sequential > .group-box__tasks > * + * {
  position: relative;
  margin-top: 1.6rem;
}

.group-box--sequential > .group-box__tasks > * + *::before {
  content: "↓";
  position: absolute;
  top: -1.9rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #888;
  height: 1.4rem;
  line-height: 1.4rem;
}

.group-box--parallel > .group-box__tasks {
  flex-direction: row;
}

.group-task {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.4rem 0.5rem 0.8rem 0.5rem;
  font-size: 0.85rem;
  width: max-content;
  min-width: 152px;
  height: max-content;
  margin: 3px 0px 0px 0px;
}

.group-task__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.group-task__name {
  font-weight: 500;
  flex: 1;
}

.group-task__meta {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}


/* Dropdown */

.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 60%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 1000;
  min-width: 212px;
  padding: 0.25rem 0;
}

.dropdown-menu--open {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: normal;
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0.25rem 0;
}

.dropdown-menu form {
  margin: 0;
  padding: 0;
}

.dropdown-menu button[type="submit"] {
  background-color: transparent;
  color: #333;
  border-radius: 0;
  padding: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  width: 100%;
  text-align: left;
}

.dropdown-menu button[type="submit"]:hover {
  background-color: #f5f5f5;
  color: #333;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item--danger {
  color: #c0392b;
}

.dropdown-item--danger:hover {
  background: #fef2f2;
}

.dropdown-item--disabled {
  color: #aaa;
  cursor: default;
  pointer-events: none;
}

/* Library Modal */

.library-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.library-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.library-modal {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.58);
  width: 40rem;
  min-height: 46vh;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.library-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.library-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.library-modal__body {
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.library-modal__body h4 {
  margin: 0.5rem 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

.library-modal__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 0.75rem;
}

.library-modal__item-name {
  font-size: 0.9rem;
  flex: 1;
}

/* Icon buttons */

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1;
}

.btn-icon:hover {
  background: rgb(120 205 240);
  color: #ffffff;
}

.btn-menu {
  font-size: 1.1rem;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

html {
  overflow-anchor: none;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

.main-content__body.is-panning {
  cursor: grabbing !important;
  user-select: none;
}

.main-content__body.is-panning * {
  cursor: grabbing !important;
}

input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
}

.drag-ghost {
  opacity: 0.25;
  pointer-events: none;
}
