:root {
  --sidebar: #172033;
  --sidebar-active: #2f80ed;
  --bg: #f5f7fb;
  --line: #d9e0ea;
  --text: #1f2937;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #fff;
  grid-column: 1;
  grid-row: 1;
  padding: 20px 16px;
  width: 240px;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 28px;
}

.sidebar .nav-link {
  color: #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background: var(--sidebar-active);
  color: #fff;
}

.sidebar-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-leaf {
  font-weight: 700;
}

.sidebar-group {
  border-top: 1px solid rgb(255 255 255 / 8%);
  padding-top: 6px;
}

button.sidebar-group-toggle,
.sidebar button.sidebar-group-toggle,
.sidebar .sidebar-group-toggle {
  align-items: center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 6px !important;
  border-style: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  color: #cbd5e1 !important;
  cursor: pointer;
  display: flex !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  justify-content: space-between !important;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 !important;
  outline: 0;
  padding: 10px 12px !important;
  text-align: left !important;
  width: 100% !important;
}

button.sidebar-group-toggle::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.sidebar-group-toggle:focus,
.sidebar-group-toggle:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #cbd5e1 !important;
  outline: 0 !important;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle.open {
  background: rgb(255 255 255 / 8%) !important;
  color: #fff !important;
}

.sidebar-chevron {
  color: inherit;
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
  margin-left: 10px;
}

.sidebar-chevron::before {
  content: "▸";
}

.sidebar-group-toggle.open .sidebar-chevron::before {
  content: "▾";
}

.sidebar-submenu {
  display: none;
  margin-top: 4px;
  padding-bottom: 4px;
}

.sidebar-submenu.show {
  display: block;
}

.sidebar .sidebar-child {
  font-size: 13px;
  margin-left: 10px;
  padding: 8px 10px 8px 18px;
  position: relative;
}

.sidebar .sidebar-child.active {
  background: var(--sidebar-active);
  color: #fff;
}

.sidebar .sidebar-child::before {
  background: rgb(255 255 255 / 18%);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 7px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
}

.content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pwa-install-hint {
  display: none;
}

.mobile-topbar,
.sidebar-overlay {
  display: none;
}

.system-name {
  color: #667085;
  font-size: 13px;
  margin-bottom: 4px;
}

h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}

h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-grid-wide {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.metric,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: #667085;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 28px;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.top-actions,
.action-wrap,
.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-form {
  display: flex;
  gap: 8px;
  width: min(560px, 100%);
}

.schedule-month-toolbar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  margin-bottom: 14px;
}

.schedule-view-tabs,
.schedule-month-picker,
.schedule-month-actions,
.schedule-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-month-picker {
  justify-content: center;
}

.schedule-date-nav {
  align-items: center;
}

.schedule-date-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 4px;
  white-space: nowrap;
}

.schedule-date-picker-input {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  color: #0f172a;
  justify-self: start;
  min-height: 31px;
  padding: 4px 8px;
  width: auto;
  min-width: 138px;
}

.schedule-month-picker .form-select {
  width: auto;
  min-width: 104px;
}

.schedule-month-actions {
  justify-content: flex-end;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
  gap: 8px;
}

.schedule-inspector-bar,
.schedule-inspector-filter {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 10px;
}

.schedule-inspector-label,
.schedule-inspector-filter-label {
  color: #334155;
  font-weight: 700;
  margin-right: 2px;
  white-space: nowrap;
}

.schedule-inspector-chips,
.schedule-inspector-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inspector-chip {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inspector-chip:hover {
  border-color: #60a5fa;
}

.inspector-chip.is-active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 700;
}

.filter-bar,
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filter-bar {
  align-items: end;
}

.grid-full {
  grid-column: 1 / -1;
}

.login-body {
  align-items: center;
  background: #eef3f8;
  display: flex;
  min-height: 100vh;
  justify-content: center;
}

.login-wrap {
  width: min(420px, calc(100vw - 32px));
}

.login-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  color: #667085;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.empty {
  color: #667085;
  text-align: center;
  padding: 28px !important;
}

.form-panel {
  max-width: 980px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0;
}

.info-grid div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.info-grid .wide {
  grid-column: 1 / -1;
}

.info-grid dt {
  color: #667085;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-grid dd {
  margin: 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.status-grid span {
  color: #667085;
  display: block;
  margin-bottom: 8px;
}

.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.readonly-like,
.form-select.readonly-like:disabled {
    background-color: #f2f4f7;
    color: #667085;
    cursor: not-allowed;
}

.assistant-worker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}

.assistant-worker-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
    background: #f4f8ff;
    color: #1f3f7a;
    font-size: 0.875rem;
    line-height: 1.2;
}

.assistant-worker-chip-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
    font-size: 0.75rem;
}

.work-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.work-maintenance {
  background: #ecfdf3;
  color: #027a48;
}

.work-performance {
  background: #eef4ff;
  color: #175cd3;
}

.work-emergency {
  background: #fef3f2;
  color: #b42318;
}

.work-construction {
  background: #fff7e6;
  color: #b54708;
}

.work-etc {
  background: #f2f4f7;
  color: #344054;
}

.tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wide-panel {
  overflow-x: auto;
}

.matrix-table {
  min-width: 1180px;
}

.matrix-table th {
  white-space: nowrap;
}

.matrix-table th.selected-month {
  background: #dbeafe;
  color: #0d6efd;
  font-weight: 800;
}

.matrix-cell {
  min-width: 130px;
  white-space: normal;
}

.matrix-cell.replacement {
  background: #eef4ff;
  font-weight: 700;
}

.matrix-cell.completed {
  background: #ecfdf3;
}

.matrix-cell.scheduled,
.matrix-cell.in_progress {
  background: #fff7e6;
}

.matrix-cell.cancelled {
  background: #fef3f2;
}

.status-scheduled {
  background: #eef4ff;
  color: #175cd3;
}

.status-in_progress {
  background: #fff7e6;
  color: #b54708;
}

.status-completed {
  background: #ecfdf3;
  color: #027a48;
}

.status-postponed {
  background: #f4f3ff;
  color: #5925dc;
}

.status-cancelled {
  background: #fef3f2;
  color: #b42318;
}

.calendar-month {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.calendar-weekhead,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekhead div {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: #667085;
  font-weight: 800;
  padding: 10px;
  text-align: center;
}

.calendar-month .calendar-weekhead .calendar-weekday-sun,
.calendar-weekday-sun {
  color: #dc3545 !important;
}

.calendar-month .calendar-weekhead .calendar-weekday-sat,
.calendar-weekday-sat {
  color: #0d6efd !important;
}

.calendar-day {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  border-left: 0;
  border-right: 1px solid #e5e7eb;
  border-top: 0;
  color: var(--text);
  cursor: pointer;
  min-height: 138px;
  padding: 8px;
  position: relative;
  vertical-align: top;
}

.calendar-day:nth-child(7) {
  border-right: 0;
}

.calendar-day:hover {
  background: #f8fbff;
}

.calendar-month .calendar-day.is-sunday,
.calendar-day.is-sunday {
  background-color: #fff8f8 !important;
}

.calendar-month .calendar-day.is-saturday,
.calendar-day.is-saturday {
  background-color: #f8fbff !important;
}

.calendar-month .calendar-day.is-sunday:hover,
.calendar-day.is-sunday:hover {
  background-color: #fff2f2 !important;
}

.calendar-month .calendar-day.is-saturday:hover,
.calendar-day.is-saturday:hover {
  background-color: #f1f7ff !important;
}

.calendar-day.muted {
  background: #fcfcfd;
  color: #98a2b3;
}

.calendar-month .calendar-day.muted.is-sunday,
.calendar-day.muted.is-sunday {
  background-color: #fffafa !important;
}

.calendar-month .calendar-day.muted.is-saturday,
.calendar-day.muted.is-saturday {
  background-color: #fafcff !important;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px rgba(47, 128, 237, 0.45);
}

.calendar-day:focus {
  outline: 0;
}

.calendar-day:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(47, 128, 237, 0.32);
  outline: 0;
}

.day-number {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 6px;
  outline: 0 !important;
  padding: 0;
}

.calendar-month .calendar-day.is-sunday .day-number,
.calendar-day.is-sunday .day-number {
  color: #dc3545 !important;
}

.calendar-month .calendar-day.is-saturday .day-number,
.calendar-day.is-saturday .day-number {
  color: #0d6efd !important;
}

.calendar-month .calendar-day.muted.is-sunday .day-number,
.calendar-month .calendar-day.muted.is-saturday .day-number,
.calendar-day.muted.is-sunday .day-number,
.calendar-day.muted.is-saturday .day-number {
  opacity: 0.55;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.calendar-item {
  background: #f8fafc;
  border-left: 3px solid #98a2b3;
  border-radius: 4px;
  color: #344054;
  display: block;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  padding: 2px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-trip-event {
  background: #fde2e2;
  border-left-color: #f43f5e !important;
  color: #9f1239;
  font-weight: 600;
}

.calendar-trip-event.is-single {
  border-radius: 6px;
}

.calendar-trip-event.is-start {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-trip-event.is-middle {
  border-radius: 0;
}

.calendar-trip-event.is-end {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.calendar-item.is-trip-linked {
  background: #f8fafc;
  border-left-color: #f43f5e !important;
  color: #be123c;
  font-weight: 600;
}

.schedule-modal-table tr.schedule-modal-trip-row td {
  background: #fff7f7;
}

.schedule-modal-table tr.schedule-modal-trip-row .schedule-modal-trip-title {
  color: #be123c;
  font-weight: 700;
}

.schedule-modal-table tr.is-trip-linked-row td {
  background: #fff8f8;
}

.schedule-modal-table tr.is-trip-linked-row .schedule-modal-detail-link {
  color: #be123c;
  font-weight: 600;
}

.trip-related-box {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 12px;
}

.schedule-modal-table {
  min-width: 980px;
}

.schedule-modal-table td:last-child {
  white-space: nowrap;
}

.schedule-bulk-panel {
  margin-top: 18px;
}

.schedule-bulk-filter,
.schedule-bulk-actions {
  max-width: 100%;
}

.schedule-bulk-filter-panel {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 120px minmax(190px, 1.4fr) 150px 108px 116px 130px 150px auto;
}

.schedule-bulk-action-panel {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
  width: 100%;
}

.schedule-bulk-left-actions {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
}

.schedule-bulk-apply-group {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: max-content;
}

.schedule-bulk-right-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

.schedule-bulk-filter .form-label,
.schedule-bulk-actions .form-label {
  font-size: 12px;
  margin-bottom: 3px;
}

.schedule-bulk-filter .filter-field,
.schedule-bulk-actions .bulk-apply-work-type {
  min-width: 0;
}

.schedule-bulk-filter .form-select,
.schedule-bulk-filter .form-control {
  width: 100%;
}

.schedule-bulk-actions .bulk-apply-work-type {
  max-width: 220px;
  min-width: 180px;
  width: 220px;
}

.schedule-bulk-apply-group .form-select {
  max-width: 210px;
  min-width: 150px;
  width: 210px;
}

.schedule-bulk-apply-group input[type="date"] {
  max-width: 155px;
  min-width: 145px;
  width: 155px;
}

.schedule-bulk-apply-group .btn {
  min-width: 72px;
  white-space: nowrap;
}

.schedule-bulk-apply-group .bulk-apply-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .schedule-bulk-filter-panel {
    grid-template-columns: 120px minmax(190px, 1.2fr) 150px 104px 112px 130px;
  }

  .schedule-bulk-filter-panel .filter-work-type,
  .schedule-bulk-filter-panel .filter-actions {
    grid-column: auto;
  }

  .schedule-bulk-action-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .schedule-bulk-left-actions,
  .schedule-bulk-right-actions {
    flex-wrap: wrap;
  }

  .schedule-bulk-right-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 992px) {
  .schedule-bulk-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .pwa-install-hint {
    display: block;
    font-size: 12px;
    margin-bottom: 12px;
  }

  .schedule-bulk-filter-panel {
    grid-template-columns: 1fr;
  }

  .schedule-bulk-action-panel,
  .schedule-bulk-left-actions,
  .schedule-bulk-apply-group,
  .schedule-bulk-right-actions,
  .schedule-bulk-actions .bulk-apply-work-type {
    width: 100%;
  }

  .schedule-bulk-apply-group .form-select {
    max-width: none;
    min-width: 0;
  }

  .schedule-bulk-apply-group input[type="date"] {
    max-width: none;
    min-width: 0;
  }

  .schedule-bulk-right-actions {
    justify-content: flex-start;
  }
}

.schedule-bulk-table {
  min-width: 1160px;
}

.schedule-bulk-table th,
.schedule-bulk-table td {
  vertical-align: middle;
}

.schedule-bulk-table .btn-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.schedule-bulk-table .btn-link:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.schedule-bulk-table .bulk-row-work-type {
  min-width: 120px;
}

.schedule-bulk-table .bulk-row-date-input {
  min-width: 150px;
}

.status-left-scheduled {
  border-left-color: #2f80ed;
}

.status-left-in_progress {
  border-left-color: #f79009;
}

.status-left-completed {
  border-left-color: #12b76a;
}

.status-left-postponed {
  border-left-color: #7a5af8;
}

.status-left-cancelled {
  border-left-color: #f04438;
}

.plan-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
  white-space: nowrap;
}

.plan-missing {
  background: #fff4cc;
  color: #8a5a00;
}

.plan-scheduled {
  background: #d8e9ff;
  color: #1455a0;
}

.plan-completed {
  background: #d7f8df;
  color: #087443;
}

.plan-replacement {
  background: #ccfbef;
  color: #0e7766;
}

.plan-combined {
  background: #ffe1ef;
  color: #a11055;
}

.yearly-plan-table td,
.yearly-plan-table th {
  text-align: center;
  vertical-align: middle;
}

.yearly-plan-table td:first-child,
.yearly-plan-table th:first-child {
  min-width: 160px;
  text-align: left;
}

.yearly-plan-table .performance-plan-head,
.yearly-plan-table .performance-plan-cell {
  background: #f8fbff;
}

.yearly-plan-table .performance-plan-head {
  color: #175cd3;
  min-width: 118px;
}

.work-combined,
.status-badge-combined {
  background: #ffe1ef;
  color: #a11055;
}

.more-count {
  color: #667085;
  display: block;
  font-size: 12px;
}

.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.day-panel .schedule-table th:nth-child(1),
.day-panel .schedule-table td:nth-child(1) {
  width: 120px;
}

.memo-text {
  margin: 0;
  white-space: pre-wrap;
}

.schedule-filter-panel {
  border: 0;
}

.schedule-filter-panel > summary {
  display: none;
}

.mobile-month-schedule-list,
.schedule-mobile-card-list {
  display: none;
}

.mobile-month-day {
  border-top: 1px solid #e4e7ec;
  padding: 12px 0;
}

.mobile-month-day:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.mobile-month-day h3 {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 8px;
}

.schedule-mobile-card {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.schedule-mobile-card.is-trip,
.schedule-mobile-card.is-trip-linked {
  background: #fff7f8;
  border-color: #fecdd3;
}

.schedule-mobile-card-top,
.schedule-mobile-card-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-mobile-card-footer {
  color: #64748b;
  font-size: 12px;
}

.schedule-mobile-card-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.schedule-mobile-card-title:hover {
  color: #0d6efd;
}

.schedule-mobile-card-meta {
  color: #475569;
  display: grid;
  gap: 3px;
  font-size: 13px;
}

.work-log-grid,
.work-log-body-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.work-log-weekly-card {
  grid-column: 1 / -1;
}

.work-log-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.work-log-detail-cell {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.work-log-detail-cell span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.work-log-detail-cell strong {
  color: #0f172a;
  font-size: 14px;
}

.work-log-approval-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.work-log-approval-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  min-width: 560px;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
}

.work-log-approval-box {
  appearance: none;
  background: #fff;
  border: 0;
  border-left: 1px solid #d0d5dd;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 0;
  text-align: center;
}

.work-log-approval-box:first-child {
  border-left: 0;
}

.work-log-approval-box.is-drafter {
  background: #f8fafc;
}

.work-log-approval-select {
  cursor: pointer;
}

.work-log-approval-select:hover {
  background: #f8fbff;
}

.work-log-approval-role {
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 6px;
}

.work-log-approval-name {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.25;
  min-height: 34px;
  padding: 8px 6px 4px;
}

.work-log-approval-box small {
  color: #98a2b3;
  font-size: 12px;
  padding: 0 6px 8px;
}

.work-log-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
}

.work-log-card h3 {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.work-log-item {
  border-top: 1px solid #e9ecef;
  margin-top: 12px;
  padding-top: 12px;
}

.work-log-item:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.work-log-item-card {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  margin-top: 10px;
  padding: 12px;
}

.work-log-item-card:first-of-type {
  margin-top: 0;
}

.work-log-item-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

.work-log-trip-badge {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  padding: 7px 10px;
}

.work-log-readonly-block {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  margin-top: 8px;
  padding: 10px 12px;
}

.work-log-readonly-block.is-panel {
  min-height: 220px;
}

.work-log-readonly-block span {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.work-log-readonly-block p {
  margin: 0;
  white-space: pre-wrap;
}

.work-log-compact-textarea {
  min-height: 58px;
}

.work-log-panel-textarea {
  min-height: 260px;
}

.work-log-weekly-textarea {
  min-height: 120px;
}

.work-log-title-readonly[readonly] {
  background: #f1f5f9;
}

.work-log-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-log-attachments a {
  text-decoration: none;
}

.work-log-attachment-chip {
  border: 1px solid #dee2e6;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px 10px;
}

.pre-wrap {
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-month-toolbar {
    grid-template-columns: 1fr;
  }

  .schedule-month-picker,
  .schedule-view-tabs,
  .schedule-month-actions {
    justify-content: flex-start;
  }

  .filter-bar,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  h1 {
    font-size: 21px;
    line-height: 1.2;
  }

  h2 {
    font-size: 17px;
  }

  .mobile-topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e4e7ec;
    box-shadow: 0 2px 10px rgb(15 23 42 / 6%);
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 1030;
  }

  .mobile-menu-button {
    align-items: center;
    appearance: none;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #0f172a;
    display: inline-flex;
    font-size: 18px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 38px;
  }

  .mobile-topbar-title {
    color: #0f172a;
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-logout-link {
    color: #475569;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
  }

  .sidebar-overlay {
    background: rgb(15 23 42 / 45%);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 1040;
  }

.sidebar-overlay[hidden] {
  display: none;
}

  .layout {
    display: block;
    min-height: calc(100vh - 48px);
  }

  .sidebar {
    box-shadow: 16px 0 32px rgb(15 23 42 / 20%);
    grid-column: auto;
    grid-row: auto;
    height: 100vh;
    left: 0;
    max-width: 86vw;
    overflow-y: auto;
    padding: 18px 14px;
    position: fixed !important;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    width: 280px;
    z-index: 1050;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .content {
    grid-column: auto;
    grid-row: auto;
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    background: transparent;
    gap: 8px;
    margin-bottom: 10px;
  }

  .system-name {
    display: none;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .text-muted {
    font-size: 11px;
    line-height: 1.2;
  }

  .topbar .top-actions a[href="/logout"] {
    display: none;
  }

  .top-actions .btn,
  .favorite-placeholder {
    font-size: 12px;
    min-height: 30px;
    padding: 4px 7px;
  }

  .panel,
  .metric {
    border-radius: 8px;
    padding: 10px;
  }

  .btn {
    min-height: 34px;
  }

  .schedule-month-toolbar {
    gap: 8px;
    grid-template-columns: 1fr;
    margin-bottom: 10px;
  }

  .schedule-view-tabs {
    background: #eef2f7;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 3px;
    width: 100%;
  }

  .schedule-view-tabs .btn {
    border-radius: 8px;
    font-size: 13px;
    min-height: 32px;
    padding: 6px 8px;
  }

  .schedule-month-picker,
  .schedule-date-nav {
    display: grid;
    gap: 6px;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    width: 100%;
  }

  .schedule-month-picker .form-select {
    flex: 1 1 110px;
    font-size: 13px;
    min-height: 34px;
    min-width: 0;
  }

  .schedule-month-picker .btn,
  .schedule-date-nav .btn,
  .schedule-month-actions .btn {
    font-size: 13px;
    min-height: 34px;
    padding: 6px 9px;
  }

  .schedule-date-title {
    font-size: 15px;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .schedule-month-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .schedule-month-actions .btn {
    width: 100%;
  }

  .schedule-filter-panel {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
  }

  .schedule-filter-panel > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    gap: 8px;
    justify-content: space-between;
    list-style: none;
    padding: 10px 12px;
  }

  .schedule-filter-panel > summary::-webkit-details-marker {
    display: none;
  }

  .schedule-filter-panel > summary::after {
    color: #64748b;
    content: "▼";
    font-size: 11px;
  }

  .schedule-filter-panel[open] > summary {
    border-bottom: 1px solid #e4e7ec;
  }

  .schedule-filter-panel[open] > summary::after {
    content: "▲";
  }

  .schedule-filter-summary {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
  }

  .schedule-filter-panel .filter-grid {
    gap: 8px;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .filter-grid .form-control,
  .filter-grid .form-select {
    font-size: 14px;
    min-height: 36px;
    width: 100%;
  }

  .schedule-filter-actions {
    width: 100%;
  }

  .schedule-filter-actions .btn {
    flex: 1 1 auto;
  }

  .schedule-inspector-bar,
  .schedule-inspector-filter {
    align-items: flex-start;
    display: block;
    min-width: 0;
  }

  .schedule-inspector-label,
  .schedule-inspector-filter-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .schedule-inspector-chips,
  .schedule-inspector-chip-list {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .inspector-chip {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 5px 9px;
    white-space: nowrap;
  }

  .calendar-month {
    display: none;
  }

  .mobile-month-schedule-list {
    display: block;
  }

  .mobile-month-schedule-list .panel-head {
    margin-bottom: 6px;
  }

  .mobile-month-day {
    padding: 10px 0;
  }

  .mobile-month-day h3 {
    font-size: 14px;
    margin-bottom: 7px;
  }

  .schedule-table-wrap {
    display: none;
  }

  .schedule-mobile-card-list,
  .schedule-mobile-card-list.is-visible {
    display: grid;
    gap: 10px;
  }

  .schedule-mobile-card {
    gap: 6px;
    padding: 9px;
  }

  .schedule-mobile-card-title {
    font-size: 14px;
  }

  .schedule-mobile-card-meta {
    font-size: 12px;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .day-panel {
    padding: 12px;
  }

  .panel > table,
  .panel > .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 12px;
  }

  .panel-head,
  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .info-grid,
  .status-grid,
  .filter-grid,
  .filter-bar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
  }

  .calendar-weekhead,
  .calendar-week {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: auto;
    padding: 8px;
  }
}


.company-map-filter-panel {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  margin-top: 12px;
  padding: 0;
}

.company-map-filter-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.company-map-filter-panel summary::-webkit-details-marker {
  display: none;
}

.company-map-filter-panel summary::after {
  color: #64748b;
  content: "▼";
  font-size: 11px;
}

.company-map-filter-panel[open] summary {
  border-bottom: 1px solid #e4e7ec;
}

.company-map-filter-panel[open] summary::after {
  content: "▲";
}

.company-map-filter-summary {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

.company-map-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 12px;
}

.company-map-filter .form-label {
  font-size: 12px;
  margin-bottom: 4px;
}

.company-map-filter-actions {
  display: flex;
  gap: 6px;
}

.company-map-layout {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  margin-top: 14px;
}

.company-map-panel-box {
  min-width: 0;
}

.company-map-canvas {
  border: 1px solid #d7dce5;
  border-radius: 8px;
  display: block;
  height: 460px;
  min-height: 420px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.company-map-canvas .leaflet-container {
  height: 100%;
  width: 100%;
}

#companyMap.leaflet-container {
  background: #ddd;
  height: 460px;
  min-height: 420px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

#companyMap .leaflet-pane,
#companyMap .leaflet-map-pane,
#companyMap .leaflet-tile-pane,
#companyMap .leaflet-overlay-pane,
#companyMap .leaflet-shadow-pane,
#companyMap .leaflet-marker-pane,
#companyMap .leaflet-tooltip-pane,
#companyMap .leaflet-popup-pane {
  left: 0;
  position: absolute;
  top: 0;
}

#companyMap .leaflet-tile-container {
  left: 0;
  position: absolute;
  top: 0;
}

#companyMap .leaflet-overlay-pane {
  z-index: 400;
}

#companyMap .leaflet-marker-pane {
  z-index: 600;
}

#companyMap .leaflet-popup-pane {
  z-index: 700;
}

#companyMap .leaflet-popup-content-wrapper {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

#companyMap .leaflet-popup-content {
  margin: 12px;
}

#companyMap .leaflet-popup-tip {
  background: #fff;
  border: 1px solid #d0d5dd;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

#companyMap .leaflet-tooltip {
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

#companyMap svg.leaflet-zoom-animated,
#companyMap svg.leaflet-zoom-hide {
  height: auto;
  max-height: none;
  max-width: none;
  overflow: visible;
  position: absolute;
  width: auto;
}

#companyMap .leaflet-interactive {
  cursor: pointer;
  pointer-events: auto;
}

#companyMap.is-picking-coordinate,
#companyMap.is-picking-coordinate .leaflet-container {
  cursor: crosshair;
}

#companyMap img.leaflet-tile {
  border: 0 !important;
  box-sizing: content-box !important;
  height: 256px !important;
  margin: 0 !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  width: 256px !important;
}

#companyMap .leaflet-marker-icon,
#companyMap .leaflet-marker-shadow {
  max-height: none !important;
  max-width: none !important;
}

.company-map-list-panel {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: 460px;
  min-height: 420px;
  min-width: 0;
  overflow: hidden;
}

.company-map-list-header {
  align-items: stretch;
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  padding: 10px 12px;
}

.company-map-list-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.company-map-list-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.company-map-list-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 12px;
}

.company-map-list-card {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px;
}

.company-map-list-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.company-map-focus-link {
  background: transparent;
  border: 0;
  color: #0d6efd;
  cursor: pointer;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.company-map-focus-link:hover,
.company-map-focus-link:focus {
  color: #0a58ca;
  text-decoration: underline;
}

.company-map-focus-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
}

.company-map-card-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.company-map-card-toggle:hover,
.company-map-card-toggle:focus {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.company-map-list-detail {
  border-top: 1px solid #edf1f7;
  margin-top: 8px;
  padding-top: 8px;
}

.company-map-list-meta,
.company-map-list-address,
.company-map-list-contact {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.company-map-list-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.company-map-list-contact {
  color: #1f2937;
  font-weight: 600;
}

.company-map-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.company-map-missing {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px 12px;
}

.company-map-missing summary {
  cursor: pointer;
  font-weight: 700;
}

.company-map-error-detail {
  max-width: 360px;
}

.company-map-error-detail summary {
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.company-map-error-detail div {
  color: #991b1b;
  font-size: 12px;
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.company-map-missing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.company-map-popup {
  color: #1f2937;
  line-height: 1.35;
  min-width: 220px;
  overflow-wrap: anywhere;
}

.company-map-popup-title {
  color: #0f172a;
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
}

.company-map-popup-meta {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.company-map-popup-address,
.company-map-popup-contact {
  color: #334155;
  font-size: 12px;
  margin-top: 4px;
}

.company-map-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.company-map-popup-btn {
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
  text-decoration: none;
  white-space: nowrap;
}

.company-map-popup-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.company-category-pill {
  background: color-mix(in srgb, var(--category-color, #667085) 16%, white);
  border-radius: 999px;
  color: var(--category-color, #667085);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

@media (max-width: 1100px) {
  .company-map-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .company-map-layout {
    grid-template-columns: 1fr;
  }

  .company-map-list-panel {
    max-height: none;
    min-height: 0;
  }

  .company-map-list-body {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .company-map-filter {
    grid-template-columns: 1fr;
  }

  .company-map-filter-actions {
    justify-content: flex-start;
  }

  .company-map-canvas {
    height: 340px;
    min-height: 320px;
  }

  #companyMap.leaflet-container {
    height: 340px;
    min-height: 320px;
  }

  .company-map-list-actions .btn,
  .company-map-missing-actions .btn {
    align-items: center;
    display: inline-flex;
    min-height: 34px;
  }
}

@media (max-width: 576px) {
  .company-map-layout {
    gap: 12px;
  }

  .company-map-canvas,
  #companyMap.leaflet-container {
    height: 300px;
    min-height: 300px;
  }

  .company-map-list-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .company-map-focus-link {
    max-width: 100%;
    white-space: normal;
  }

  .company-map-list-actions,
  .company-map-missing-actions,
  .company-map-popup-actions {
    gap: 8px;
  }

  .company-map-list-actions .btn,
  .company-map-missing-actions .btn,
  .company-map-popup-btn {
    min-height: 36px;
  }

  .company-map-popup {
    min-width: 200px;
  }

  #companyMap .leaflet-popup-content {
    margin: 10px;
    max-width: 240px;
  }

  .company-map-missing .table-responsive {
    overflow-x: auto;
  }

  .company-map-missing table {
    min-width: 760px;
  }
}

@media (max-width: 768px) {
  .work-log-grid,
  .work-log-body-layout,
  .work-log-detail-grid {
    grid-template-columns: 1fr;
  }

  .work-log-weekly-card {
    grid-column: auto;
  }

  .work-log-approval-line {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
}


.inspection-photo-panel .panel-head {
  align-items: flex-start;
}

.inspection-photo-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 180px) 1fr;
  margin-bottom: 14px;
}

.inspection-photo-summary > div {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}

.inspection-photo-summary span {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.inspection-photo-summary strong {
  color: #111827;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.inspection-photo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.inspection-photo-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.inspection-photo-preview {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  display: flex;
  justify-content: center;
}

.inspection-photo-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.inspection-photo-preview-unavailable {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.inspection-photo-file-icon {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.inspection-photo-body {
  padding: 10px;
}

.inspection-photo-name {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-photo-folder {
  color: #475569;
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-photo-meta {
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}

.inspection-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .inspection-photo-summary {
    grid-template-columns: 1fr;
  }

  .inspection-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .inspection-photo-grid {
    grid-template-columns: 1fr;
  }
}


.calendar-item.calendar-work-event,
.schedule-mobile-card.is-work {
    background: #ecfdf3;
    color: #047857;
    border-left-color: #10b981;
}

.work-schedule-box {
    background: #f8fffb;
    border-color: #b7ebc6;
}
