body { min-height: 100vh; }
.navbar .nav-tabs .nav-link { border: 0; }
.app-shell-header {
  background: #0f2747;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.app-shell-bar {
  min-height: 68px;
  gap: 1rem;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.app-brand:hover,
.app-brand:focus {
  color: #fff;
}
.app-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
}
.app-nav-groups .dropdown-menu {
  min-width: 14rem;
}
.nav-group-button {
  min-width: 8.5rem;
  color: rgba(255, 255, 255, 0.92);
  border: 0;
  background: transparent;
  font-weight: 600;
}
.nav-group-button:hover,
.nav-group-button:focus,
.nav-group-button.show {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.app-header-actions {
  margin-left: auto;
}
.app-header-icon-btn,
.app-profile-btn {
  background: transparent;
  border: 0;
  color: #fff;
}
.app-header-icon-btn:hover,
.app-profile-btn:hover,
.app-profile-btn.show {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.app-header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}
.app-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
}
.app-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0a530;
  color: #10243f;
  font-weight: 700;
}
.app-profile-name {
  font-weight: 600;
}
.dropdown-item.active,
.dropdown-item:active {
  background: var(--bs-primary);
  color: #fff;
}
#employeeList { max-height: 76vh; overflow-y: auto; }
#lvMasterList, #lvDocList { max-height: 40vh; overflow-y: auto; }
#taskList, #doneTaskList { max-height: 60vh; overflow-y: auto; }
.project-row { cursor: pointer; }
[data-bs-theme='light'],
[data-bs-theme='dark'] {
  --calendar-private-bg: #fff3cd;
  --calendar-private-border: #f3d48a;
  --calendar-private-text: #6b4f16;
}

[data-bs-theme='dark'] .card,
[data-bs-theme='dark'] .list-group-item,
[data-bs-theme='dark'] .calendar-day { border-color: #495057; }

.employee-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

#overviewCalendar .calendar-weekdays,
#employeeCalendar .calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 8px;
  font-weight: 600;
  opacity: 0.85;
}

#overviewCalendar .calendar-grid,
#employeeCalendar .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

#overviewCalendar .calendar-day,
#employeeCalendar .calendar-day {
  min-height: 130px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 8px;
  background: var(--bs-body-bg);
}

#overviewCalendar .calendar-day.empty,
#employeeCalendar .calendar-day.empty {
  border: 0;
  background: transparent;
}

.calendar-date {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-event {
  color: white;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  line-height: 1.25;
}

.calendar-event-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-event-top > span {
  flex: 1 1 auto;
  min-width: 0;
}

.calendar-event-check {
  line-height: 1;
  padding: 0 4px;
}

.calendar-event.clickable {
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.calendar-event.clickable:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--bs-body-bg);
}

.calendar-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
}

[data-bs-theme='dark'] .calendar-legend-color {
  border-color: rgba(255,255,255,0.35);
}

.calendar-legend-color.planned {
  border: 1px dashed var(--bs-body-color);
  background: transparent;
}

.calendar-legend-color.private {
  background: var(--calendar-private-bg);
  border-color: var(--calendar-private-border);
}

.calendar-event.planned {
  border: 1px dashed rgba(255,255,255,0.7);
}

.calendar-event.private {
  color: var(--calendar-private-text);
}

.calendar-event.private .calendar-event-check {
  background: rgba(255,255,255,0.85);
  border-color: var(--calendar-private-border);
}

.calendar-event.private.planned {
  border-style: dashed !important;
}

.employee-app-body {
  background:
    radial-gradient(circle at top right, rgba(31, 111, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f9 100%);
}

.employee-login-card {
  border: 0;
  border-radius: 20px;
}

.employee-app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #1f6feb 0%, #0f3f8f 100%);
}

.employee-app-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.employee-app-title {
  margin: 4px 0 2px 0;
  font-size: 1.55rem;
}

.employee-app-subtitle {
  opacity: 0.9;
}

.employee-app-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#employeeMonthLabel {
  font-size: 1.1rem;
}

.employee-time-filter {
  max-width: 180px;
}

.employee-time-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
}

.employee-trip-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
}

#employeeCalendar {
  overflow-x: auto;
}

.employee-calendar-grid {
  min-width: 720px;
}

.employee-calendar-grid .calendar-day {
  min-height: 140px;
}

#employeeCalendar .calendar-event {
  color: var(--bs-body-color);
  background: rgba(31, 111, 235, 0.12);
  border: 1px solid rgba(31, 111, 235, 0.18);
}

#employeeCalendar .employee-calendar-event {
  width: 100%;
  text-align: left;
}

#employeeCalendar .calendar-event.private {
  background: var(--calendar-private-bg);
  border-color: var(--calendar-private-border);
}

#employeeCalendar .calendar-event.done {
  color: #fff;
}

#employeeCalendar .calendar-event small {
  display: block;
  margin-top: 2px;
  opacity: 0.85;
}

#employeeCalendar .calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--bs-primary);
}

@media (max-width: 767.98px) {
  .employee-app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-app-toolbar {
    align-items: stretch;
  }

  .employee-app-toolbar > * {
    width: 100%;
  }

  .employee-app-toolbar .btn-group {
    width: 100%;
  }

  .employee-app-toolbar .btn-group > .btn {
    flex: 1 1 auto;
  }
}
#overviewCalendar .calendar-grid.week-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

#overviewCalendar .calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--bs-primary);
}

.calendar-event.done {
  background: var(--bs-success) !important;
  text-decoration: none;
}

.employee-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.employee-row-meta {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.planning-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
}

.planning-board-main {
  min-width: 0;
}

.planning-board-sidebar {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  background: rgba(var(--bs-secondary-rgb), 0.04);
  align-self: start;
}

.planning-board-table th,
.planning-board-table td {
  min-width: 140px;
  vertical-align: top;
}

.planning-board-sticky-col {
  min-width: 210px;
  background: var(--bs-tertiary-bg);
}

.planning-board-cell {
  min-height: 110px;
  display: grid;
  gap: 0.5rem;
}

.planning-task-card,
.planning-unassigned-card {
  width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  padding: 0.65rem 0.75rem;
  text-align: left;
  display: grid;
  gap: 0.2rem;
}

.planning-task-card strong,
.planning-unassigned-card strong {
  font-size: 0.85rem;
}

.planning-task-card:hover,
.planning-unassigned-card:hover {
  border-color: var(--bs-primary);
}

.planning-cell-empty {
  min-height: 1.5rem;
}

.project-list-shell,
.project-detail-shell {
  display: grid;
  gap: 1rem;
}

.project-list-topbar,
.project-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-page-title {
  font-size: clamp(1.9rem, 2.4vw, 2.7rem);
  font-weight: 800;
  color: #10243f;
}

.project-list-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-search-wrap {
  position: relative;
  min-width: 280px;
}

.project-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
}

.project-search-wrap .form-control {
  padding-left: 2.5rem;
  border-radius: 0.9rem;
  min-height: 48px;
}

.project-new-btn {
  border-radius: 0.9rem;
  min-height: 48px;
  padding-inline: 1.1rem;
}

.project-trial-banner {
  border: 2px solid #72b8ff;
  background: #e9f4ff;
  color: #17324f;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-trial-banner a {
  color: #0b59c7;
  font-weight: 600;
  text-decoration: none;
}

.project-status-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.project-status-chip {
  border: 0;
  background: #edf1f7;
  color: #617086;
  border-radius: 0.9rem;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.project-status-chip.active {
  background: #dbe8ff;
  color: #10243f;
}

.project-list-card,
.project-detail-card {
  border: 2px solid #172333;
  border-radius: 0.95rem;
  background: #fff;
  overflow: hidden;
  padding: 1rem;
}

.project-list-card {
  padding: 0;
}

.project-table thead th {
  font-weight: 800;
  color: #0f2747;
  border-bottom-width: 2px;
  white-space: nowrap;
}

.project-table tbody td {
  vertical-align: middle;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.project-link {
  color: #0f2747;
  text-decoration: underline;
  font-weight: 700;
}

.project-appointments-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #556275;
  color: #fff;
  background: #7f8793;
  border-radius: 0.7rem;
  padding: 0.2rem 0.55rem;
  font-weight: 700;
}

.project-address-cell {
  max-width: 220px;
}

.project-assignee-cluster {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.project-assignee-pill {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10243f;
  font-weight: 800;
  border: 1px solid #172333;
}

.project-list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-page-size {
  width: 84px;
  border-radius: 0.75rem;
}

.project-export-btn {
  text-decoration: none;
  color: #0f2747;
  font-weight: 700;
}

.project-back-btn,
.project-back-btn:hover {
  text-decoration: none;
  color: #0f2747;
  font-size: 1.25rem;
}

.project-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f2747;
}

.project-info-grid,
.project-overview-grid {
  display: grid;
  gap: 0.7rem;
}

.project-info-row,
.project-overview-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.3rem;
  border-top: 1px dashed #d7deea;
}

.project-info-row:first-child,
.project-overview-row:first-child {
  border-top: 0;
}

.project-task-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.project-task-filter {
  max-width: 220px;
  border-radius: 0.9rem;
}

.project-task-stack {
  display: grid;
  gap: 0.9rem;
}

.project-task-card {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(180px, 1fr) minmax(120px, 0.7fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #d9e2f0;
  border-radius: 0.9rem;
}

.project-task-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.8rem;
  background: #dbe8ff;
  color: #0f2747;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-task-col {
  color: #24364e;
}

.project-task-main {
  min-width: 0;
}

.project-task-actions {
  justify-self: end;
}

.project-detail-meta {
  text-align: right;
  color: #46576f;
  font-size: 0.92rem;
  font-weight: 600;
}

#genericModal .modal-dialog.modal-task-editor {
  max-width: min(1180px, 96vw);
}

.task-editor-form {
  display: grid;
  gap: 1rem;
}

.task-editor-card {
  border: 2px solid #172333;
  border-radius: 0.95rem;
  padding: 1.15rem;
  background: #fff;
}

.task-editor-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f2747;
  margin-bottom: 1rem;
}

.task-project-meta-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  background: #f7f9fc;
}

.task-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.lv-collapse-toggle {
  min-width: 108px;
}

.lv-master-sections .border {
  background: rgba(var(--bs-secondary-rgb), 0.04);
}

.lv-item-meta {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
}

#genericModal .modal-dialog.modal-lv-wide {
  max-width: min(1480px, 96vw);
}

.lv-category-collapse > summary {
  cursor: pointer;
  list-style: none;
  background: rgba(var(--bs-primary-rgb), 0.12);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
}

.lv-category-collapse > summary::-webkit-details-marker {
  display: none;
}

.lv-category-collapse[open] > summary {
  background: rgba(var(--bs-primary-rgb), 0.18);
}

.lv-item-editor-row {
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color) !important;
}

.lv-item-editor-row .form-label.small {
  font-weight: 600;
}

.lv-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.lv-item-title-wrap:hover {
  background: rgba(var(--bs-primary-rgb), 0.08);
  border-color: rgba(var(--bs-primary-rgb), 0.25);
}

.lv-item-title {
  font-weight: 400;
  line-height: 1.2;
}

.lv-item-title-wrap .form-check-input {
  margin: 0;
  cursor: pointer;
}

.lv-yearround-col .form-check {
  min-height: 31px;
  display: flex;
  align-items: center;
}

.calendar-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.calendar-year-month {
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 8px;
}

.calendar-year-month-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.calendar-year-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-year-day {
  min-height: 24px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.calendar-year-day.today {
  background: rgba(var(--bs-primary-rgb), 0.2);
}

.calendar-year-day.empty {
  opacity: 0;
}

.calendar-year-count {
  position: absolute;
  top: -4px;
  right: -2px;
  background: var(--bs-primary);
  color: #fff;
  border-radius: 10px;
  min-width: 14px;
  height: 14px;
  font-size: 0.6rem;
  line-height: 14px;
  text-align: center;
  padding: 0 2px;
}

.offer-shell {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
}

.offer-workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  min-height: 68vh;
  align-items: start;
}

.offer-workspace.offer-config-mode {
  grid-template-columns: 1fr;
}

.offer-workspace.offer-config-mode .offer-module-menu {
  display: none;
}

.offer-module-menu {
  background: transparent;
  border-right: 0;
  padding: 0.75rem 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.offer-main {
  padding: 1.2rem;
}

.offer-nav-card {
  max-height: 80vh;
}

#offerCategorySidebar {
  max-height: calc(68vh - 86px);
  overflow-y: auto;
  flex: 1;
}

.offer-sidebar-list {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.offer-category-item,
.offer-subcategory-item {
  cursor: pointer;
}

.offer-browse-card {
  border-radius: 10px;
}

.offer-subcategory-item {
  padding-left: 2rem;
  font-size: 0.92rem;
}

.offer-subcategory-collapse summary {
  cursor: pointer;
  list-style: none;
}

.offer-subcategory-collapse summary::-webkit-details-marker {
  display: none;
}

.offer-config-list {
  max-height: 42vh;
  overflow-y: auto;
}

.offer-config-entry {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.offer-config-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  align-items: start;
}

.offer-config-sidebar {
  display: grid;
  gap: 0.5rem;
  position: sticky;
  top: 0.5rem;
}

.offer-config-sidebar .btn.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.offer-module-menu .btn.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.offer-config-content .card {
  border-radius: 10px;
}

@media (max-width: 991px) {
  .app-shell-bar {
    align-items: stretch;
  }

  .app-brand {
    margin-right: auto;
  }

  .app-nav-groups {
    width: 100%;
    order: 3;
  }

  .app-header-actions {
    margin-left: 0;
  }

  .planning-board-layout {
    grid-template-columns: 1fr;
  }

  .project-task-card {
    grid-template-columns: 1fr;
  }

  .project-info-row,
  .project-overview-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .offer-workspace {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .offer-module-menu {
    border-right: 0;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 0.75rem;
  }

  .offer-config-layout {
    grid-template-columns: 1fr;
  }

  .offer-config-sidebar {
    position: static;
  }
}
