@import url('./base/theme.css');
@import url('./base/design-system.css');
@import url('./base/layout.css');
@import url('./components/buttons.css');
@import url('./components/cards.css');
@import url('./components/forms.css');
@import url('./components/status.css');
@import url('./components/tables.css');
@import url('./components/auth.css');
@import url('./pages/dashboard.css');
@import url('./pages/leads.css');
@import url('./pages/customers.css');
@import url('./pages/jobs.css');
@import url('./pages/quotes.css');
@import url('./pages/platform.css');
@import url('./pages/styleguide.css');


@import url('pages/properties.css');
@import url('pages/service-types.css');


/* Facility Service CRM screen polish */
.fs-page-header { align-items: flex-start; margin-bottom: 18px; }
.fs-page-header .btn-primary { min-width: 128px; justify-content: center; }
.pg-actions { display: flex; gap: 8px; }
.fs-filter-bar { margin-bottom: 16px; }
.fs-stats-row { margin-bottom: 16px; }
.stat-pill.active { border-color: var(--primary); color: var(--primary); }
.fs-table-card { border-radius: var(--radius); overflow: visible; }
.fs-data-table th { color: var(--text-muted); font-size: 11px; letter-spacing: .4px; text-transform: uppercase; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.soft-pill { background: var(--primary-light); border-radius: 20px; color: var(--primary); display: inline-flex; font-size: 11px; font-weight: 700; padding: 3px 9px; }
.soft-pill.blue { background: #e8f0fe; color: #1a56db; }

.fs-modal .modal-content { border: 0; border-radius: 14px; box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.15)); overflow: hidden; }
.fs-modal .modal-header { border-bottom: 1px solid var(--border); padding: 18px 24px; }
.fs-modal .modal-title { font-size: 16px; font-weight: 800; }
.fs-modal .modal-body { padding: 20px 24px; }
.fs-modal .modal-footer { border-top: 1px solid var(--border); padding: 14px 24px; }
.modal-backdrop.show { opacity: .42; }
.form-row { display: grid; gap: 12px; margin-bottom: 14px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-group label, .form-section-title { color: var(--text-muted); display: block; font-size: 11px; font-weight: 800; letter-spacing: .4px; margin-bottom: 5px; text-transform: uppercase; }
.form-section-title { border-bottom: 1px solid var(--border); margin: 6px 0 12px; padding-bottom: 8px; }

.fs-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.kpi-icon { align-items: center; border-radius: 8px; display: flex; height: 36px; justify-content: center; margin-bottom: 14px; width: 36px; }
.kpi-icon-green { background: var(--primary-light); color: var(--primary); }
.kpi-icon-blue { background: #e0f0f7; color: var(--info); }
.kpi-icon-amber { background: var(--attention-light); color: var(--attention); }
.kpi-icon-purple { background: #f0eafa; color: #7c3aed; }
.kpi-num { font-size: 26px; font-weight: 800; line-height: 1; }
.kpi-lbl { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.kpi-trend { font-size: 11px; font-weight: 700; margin-top: 8px; }
.kpi-trend.up { color: var(--primary); }
.kpi-trend.neutral { color: var(--text-muted); }

.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-bottom: 20px; }
.section-line { align-items: center; display: flex; justify-content: space-between; margin-bottom: 12px; }
.section-line h2, .role-hierarchy-card h2 { font-size: 14px; font-weight: 800; margin: 0; }
.section-line a { color: var(--text-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.customer-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dash-customer-card, .next-jobs-card, .role-hierarchy-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.customer-card-top { align-items: center; display: flex; justify-content: space-between; margin-bottom: 12px; }
.customer-avatar.big { border-radius: 8px; height: 44px; width: 44px; }
.dash-customer-card h3 { font-size: 14px; font-weight: 800; margin: 0 0 2px; }
.dash-customer-card p { color: var(--text-muted); font-size: 12px; margin-bottom: 14px; min-height: 18px; }
.client-stats { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.client-stats div { background: var(--bg); border-radius: var(--radius-sm); padding: 8px 10px; }
.client-stats strong { display: block; font-size: 16px; }
.client-stats span { color: var(--text-muted); display: block; font-size: 10px; }
.next-job-item { align-items: center; border-bottom: 1px solid var(--bg); display: grid; gap: 10px; grid-template-columns: 48px 1fr auto; padding: 12px 0; }
.next-job-item:last-child { border-bottom: 0; }
.next-job-date span { color: var(--info); display: block; font-size: 11px; }
.next-job-date strong { font-size: 20px; }
.next-job-item strong { display: block; font-size: 13px; }
.next-job-item small { color: var(--text-muted); display: block; font-size: 11px; }
.assignee-mini { background: var(--primary-light); border-radius: 18px; color: var(--primary); font-size: 11px; font-weight: 700; padding: 4px 8px; }

.hierarchy { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.h-level { align-items: center; border-radius: var(--radius-sm); display: grid; gap: 10px; grid-template-columns: 10px 1fr 120px; padding: 10px 12px; }
.h-level span { border-radius: 50%; height: 8px; width: 8px; }
.h-level strong { display: block; font-size: 13px; }
.h-level small { color: var(--text-muted); display: block; font-size: 11px; }
.h-level em { color: inherit; font-size: 11px; font-style: normal; font-weight: 700; }
.h-level-0 { background: #f0eafa; border-left: 3px solid #7c3aed; color: #6b3fa0; }
.h-level-1 { background: #e0f0f7; border-left: 3px solid var(--info); color: var(--info); margin-left: 16px; }
.h-level-2 { background: var(--attention-light); border-left: 3px solid var(--attention); color: var(--attention); margin-left: 32px; }
.h-level-3 { background: var(--bg); border-left: 3px solid var(--border); color: var(--text-muted); margin-left: 48px; }
.h-level-0 span { background: #7c3aed; } .h-level-1 span { background: var(--info); } .h-level-2 span { background: var(--attention); } .h-level-3 span { background: var(--border); }

.object-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1080px; }
.object-card, .object-add-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 224px; padding: 18px 20px; }
.object-card-head { align-items: flex-start; display: flex; justify-content: space-between; }
.object-owner { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.object-name { font-size: 14px; font-weight: 800; margin-top: 4px; }
.object-address, .object-contact small { color: var(--text-muted); display: block; font-size: 12px; }
.object-contact { border-top: 1px solid var(--bg); margin-top: 14px; padding-top: 12px; }
.object-contact span { color: var(--text-muted); display: block; font-size: 12px; }
.object-contact strong { display: block; font-size: 13px; }
.object-stats { color: var(--primary); display: flex; font-size: 12px; gap: 16px; margin: 14px 0; }
.object-add-card { align-items: center; background: transparent; border-style: dashed; color: var(--text-muted); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.object-add-card span { font-size: 32px; line-height: 1; }

.service-list-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.service-row, .service-add-row { align-items: center; border-bottom: 1px solid var(--bg); display: grid; gap: 14px; grid-template-columns: 38px 1fr auto auto; padding: 12px 16px; width: 100%; }
.service-row:last-child { border-bottom: 0; }
.service-icon { align-items: center; background: var(--primary-light); border-radius: 8px; color: var(--primary); display: flex; height: 36px; justify-content: center; width: 36px; }
.service-add-row { background: transparent; border: 0; color: var(--text-muted); grid-template-columns: 38px 1fr; text-align: left; }
.service-add-row span { align-items: center; border: 1px dashed var(--border); border-radius: 8px; display: flex; height: 36px; justify-content: center; width: 36px; }

.center-empty { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 420px; text-align: center; }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: 800; }
.empty-sub { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.assignee-chip { align-items: center; background: var(--primary-light); border-radius: 20px; color: var(--primary); display: inline-flex; font-size: 11px; font-weight: 700; gap: 5px; padding: 3px 8px 3px 4px; }
.assignee-chip-av { align-items: center; background: var(--primary); border-radius: 50%; color: white; display: flex; font-size: 8px; font-weight: 800; height: 18px; justify-content: center; width: 18px; }

@media (max-width: 1180px) { .fs-kpi-row, .dashboard-main-grid, .customer-card-grid, .object-grid { grid-template-columns: 1fr 1fr; } .next-jobs-card { grid-column: 1 / -1; } }
@media (max-width: 760px) { .fs-kpi-row, .dashboard-main-grid, .customer-card-grid, .object-grid, .form-row-2, .form-row-3 { grid-template-columns: 1fr; } .h-level { grid-template-columns: 10px 1fr; } .h-level em { display:none; } }

/* Settings */
.settings-page-header { margin-bottom: 18px; }
.settings-layout { align-items: start; display: grid; gap: 20px; grid-template-columns: 200px minmax(0, 1fr); }
.settings-nav-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; padding: 20px 18px; }
.settings-nav-item { border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13px; font-weight: 600; padding: 9px 12px; text-decoration: none; }
.settings-nav-item:hover { background: var(--bg); color: var(--text); }
.settings-nav-item.active { background: var(--primary-light); color: var(--primary); }
.settings-panel-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 210px; padding: 24px 28px; }
.profile-header-block { align-items: center; display: flex; gap: 16px; margin-bottom: 26px; }
.profile-avatar-large { align-items: center; background: var(--primary); border-radius: 50%; color: var(--white); display: flex; font-size: 22px; font-weight: 800; height: 72px; justify-content: center; width: 72px; }
.profile-name-big { color: var(--text); font-size: 18px; font-weight: 800; line-height: 1.2; }
.profile-role-text { color: var(--text-muted); font-size: 13px; margin: 2px 0 8px; }
.settings-section-title { border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 12px; font-weight: 800; letter-spacing: .5px; margin-bottom: 14px; padding-bottom: 9px; text-transform: uppercase; }
.settings-muted { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.settings-alert { background: var(--primary-light); border: 1px solid var(--primary-mid); border-radius: var(--radius-sm); color: var(--primary); font-size: 13px; font-weight: 700; margin-bottom: 16px; padding: 10px 12px; }
.settings-inline-form { margin-bottom: 20px; }
.settings-danger-zone {
  align-items: flex-start;
  background: #fde7e7;
  border: 1px solid #f5b8b8;
  border-radius: var(--radius-sm);
  color: #b42318;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
}
.settings-danger-zone .danger-text {
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}
.settings-danger-zone .btn-danger {
  background: #c9342b;
  border-color: #c9342b;
  color: #fff;
}
.settings-danger-zone .btn-danger:hover {
  background: #a9251d;
  border-color: #a9251d;
}
@media (max-width: 820px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav-card { flex-direction: row; flex-wrap: wrap; } }

/* Settings alignment fixes */
.settings-layout { align-items: stretch; }
.settings-nav-card { align-self: stretch; height: 100%; }
.settings-panel-card form,
.settings-panel-card .form-row,
.settings-panel-card .form-group { min-width: 0; width: 100%; }
.settings-panel-card .form-input,
.settings-panel-card .form-select,
.settings-panel-card input,
.settings-panel-card textarea,
.settings-panel-card select { max-width: none; width: 100%; }
.settings-panel-card .form-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.settings-panel-card .form-actions { align-items: center; display: flex; gap: 8px; }
@media (max-width: 820px) { .settings-nav-card { height: auto; } .settings-panel-card .form-row-2 { grid-template-columns: 1fr; } }

/* Settings page width and stretch refinement */
.settings-layout {
  align-items: stretch;
  grid-template-columns: 200px minmax(0, 1fr);
}
.settings-nav-card {
  align-self: stretch;
  min-height: 100%;
}
.settings-panel-card {
  width: 100%;
}
.settings-panel-card .form-row {
  grid-template-columns: minmax(0, 1fr);
}
.settings-panel-card .form-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-panel-card .form-input,
.settings-panel-card .form-select,
.settings-panel-card input,
.settings-panel-card textarea,
.settings-panel-card select {
  box-sizing: border-box;
  display: block;
  max-width: none;
  width: 100%;
}
@media (max-width: 820px) {
  .settings-layout,
  .settings-panel-card .form-row-2 {
    grid-template-columns: 1fr;
  }
}
.inline-create-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.inline-create-row .btn {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .inline-create-row {
    grid-template-columns: 1fr;
  }
}
.property-address-row {
  grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1fr) minmax(130px, .8fr);
}
.action-dropdown .dropdown-menu {
  min-width: 170px;
}
@media (max-width: 760px) {
  .property-address-row {
    grid-template-columns: 1fr;
  }
}
/* Users */
.users-page-header {
  align-items: center;
}
.users-table-card {
  overflow-x: auto;
}
.users-table td,
.users-table th {
  white-space: nowrap;
}
.users-table td:first-child,
.users-table th:first-child {
  min-width: 260px;
}
.user-avatar {
  border-radius: 8px;
}
.role-pill.role-owner { background: #f0eafa; color: #6b3fa0; }
.role-pill.role-admin { background: #e0f0f7; color: var(--info); }
.role-pill.role-officestaff { background: var(--primary-light); color: var(--primary); }
.role-pill.role-employee { background: var(--bg); color: var(--text-muted); }
.muted-text {
  color: var(--text-muted);
  font-size: 12px;
}
.user-modal .modal-dialog {
  max-width: 580px;
}
.user-modal .modal-footer {
  gap: 8px;
}
@media (max-width: 760px) {
  .users-page-header {
    align-items: flex-start;
  }
  .users-page-header .pg-actions {
    flex-direction: column;
    width: 100%;
  }
  .users-page-header .pg-actions .btn {
    width: 100%;
  }
}

.users-table-card,
.jobs-list-card,
.service-list-card {
  overflow: visible;
}
.users-table-card .dropdown-menu,
.jobs-list-card .dropdown-menu,
.service-list-card .dropdown-menu {
  z-index: 1080;
}

/* Form field stretch and lead/property address clarity */
.form-input,
.form-select,
.form-control,
textarea.form-input,
textarea.form-control {
  box-sizing: border-box;
  display: block;
  max-width: none;
  width: 100%;
}
.lead-modal .modal-dialog {
  max-width: 760px;
}
.lead-modal .form-row,
.property-form .form-row,
.user-modal .form-row {
  width: 100%;
}
.address-note {
  color: var(--text-muted);
  font-size: 12px;
  margin: -6px 0 12px;
}
.property-list-row {
  grid-template-columns: 38px minmax(220px, 1.2fr) minmax(220px, 1.3fr) minmax(160px, .9fr) auto auto;
}
.property-location-text,
.job-location-cell {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.job-location-main {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 1100px) {
  .property-list-row {
    grid-template-columns: 38px 1fr auto;
  }
  .property-list-row .property-contact-column,
  .property-list-row .property-count-column {
    grid-column: 2 / -1;
  }
}

.property-main-grid {
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) minmax(180px, .8fr);
}
.property-type-column {
  min-width: 150px;
}
.property-list-row {
  grid-template-columns: 38px minmax(220px, 1.1fr) minmax(150px, .75fr) minmax(220px, 1fr) minmax(160px, .85fr) auto auto;
}
@media (max-width: 1100px) {
  .property-main-grid,
  .property-list-row {
    grid-template-columns: 1fr;
  }
}

/* Sidebar counts and reports */
.side-count {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 6px;
}
#sidebar.collapsed .side-count { display: none; }
.report-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}
.report-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.report-card h2 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 14px;
}
.report-card-wide { grid-column: 1 / -1; }
.report-row,
.report-job-row {
  align-items: center;
  border-top: 1px solid var(--bg);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}
.report-row:first-of-type,
.report-job-row:first-of-type { border-top: 0; }
.report-row span,
.report-job-row span,
.report-job-row time { color: var(--text-muted); font-size: 12px; }
.report-job-row strong { display: block; font-size: 13px; }
@media (max-width: 1180px) { .report-kpi-grid, .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .report-kpi-grid, .report-grid { grid-template-columns: 1fr; } }

.checklist-template-list, .job-checklist-list { display: grid; gap: 8px; margin-bottom: 16px; }
.checklist-template-row, .job-checklist-row { align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; gap: 10px; grid-template-columns: 1fr auto; padding: 10px 12px; }
.checklist-add-form { border-top: 1px solid var(--border); display: grid; gap: 10px; padding-top: 14px; }
.job-checklist-row { grid-template-columns: 72px 1fr auto; }
.check-toggle { align-items: center; background: white; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); display: inline-flex; font-size: 11px; font-weight: 800; height: 30px; justify-content: center; min-width: 54px; padding: 0 10px; }
.check-toggle.done { background: var(--brand); border-color: var(--brand); color: white; }
.checklist-done { color: var(--text-muted); text-decoration: line-through; }
.job-checklist-row small { color: var(--text-muted); }

.form-row-4 { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.new-job-property-fields { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 12px 0 16px; padding: 12px; }
.employee-assign-dropdown { width: 100%; }
.employee-assign-toggle { align-items: center; background-color: var(--input-bg); color: var(--text); display: flex; justify-content: space-between; text-align: left; width: 100%; }
.employee-assign-toggle::after { margin-left: auto; }
.employee-assign-menu { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 220px; min-width: 100%; overflow-y: auto; padding: 6px; }
.employee-option { align-items: center; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; margin: 0; padding: 8px 10px; white-space: nowrap; }
.employee-option:hover { background: var(--bg); }
.employee-option input { accent-color: var(--brand); }
@media (max-width: 1000px) { .form-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .form-row-4 { grid-template-columns: 1fr; } }

.my-task-list { display: grid; gap: 16px; }
.my-task-card h2 { font-size: 18px; margin: 0 0 4px; }
.my-task-head { align-items: start; display: flex; gap: 16px; justify-content: space-between; }
.my-task-head p, .my-task-description { color: var(--text-muted); margin: 0; }
.my-task-description { margin: 12px 0; }
.checklist-draft-list { display: grid; gap: 8px; margin-bottom: 12px; }
.checklist-draft-row { border-style: dashed; }

.task-checklist-row { grid-template-columns: 34px 1fr auto; }
.task-checkbox-wrap { align-items: center; cursor: pointer; display: inline-flex; height: 24px; justify-content: center; width: 24px; }
.task-checkbox-wrap.disabled { cursor: not-allowed; opacity: .55; }
.task-checkbox { height: 18px; width: 18px; accent-color: var(--brand); cursor: pointer; }
.task-checkbox:disabled { cursor: not-allowed; }

/* My assigned tasks table */
.my-tasks-header {
  align-items: flex-end;
}
.compact-task-stats {
  justify-content: flex-end;
  margin: 0;
}
.my-task-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}
.my-task-row-header,
.my-task-table-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) minmax(220px, 1.5fr) minmax(120px, .78fr) minmax(130px, .82fr) minmax(130px, .82fr) minmax(105px, .7fr) minmax(105px, .7fr) 110px;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
}
.my-task-row-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.my-task-table-row {
  border-bottom: 1px solid var(--border-soft);
}
.my-task-table-row:last-child {
  border-bottom: 0;
}
.my-task-table-row > div,
.my-task-job-cell,
.my-task-customer-cell {
  min-width: 0;
}
.my-task-job-cell,
.my-task-customer-cell {
  display: grid;
  gap: 4px;
}
.my-task-job-cell strong,
.my-task-customer-cell strong {
  color: var(--text);
}
.my-task-job-cell span,
.my-task-customer-cell span {
  color: var(--text-muted);
  line-height: 1.35;
}
.my-task-progress-cell {
  display: grid;
  gap: 4px;
}
.my-task-progress-line {
  align-items: center;
  display: flex;
  gap: 8px;
}
.my-task-progress-bar {
  background: var(--border);
  border-radius: 999px;
  display: inline-flex;
  height: 6px;
  overflow: hidden;
  width: 76px;
}
.my-task-progress-bar span {
  background: var(--brand);
  border-radius: inherit;
  display: block;
  height: 100%;
}
.my-task-table-card .dropdown-menu {
  z-index: 1080;
}
@media (max-width: 1120px) {
  .my-tasks-header {
    align-items: flex-start;
  }
  .compact-task-stats {
    justify-content: flex-start;
  }
  .my-task-row-header {
    display: none;
  }
  .my-task-table-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }
}

.assignment-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
}
.assignment-pending { background: #fff7e6; color: #9a5b00; }
.assignment-accepted { background: var(--primary-light); color: var(--primary); }
.assignment-rejected { background: #fde8e8; color: #c81e1e; }

/* Permission management */
.permission-overview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 0 0 18px;
  padding: 20px;
}
.permission-card-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.permission-card-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}
.permission-card-header p,
.permission-role-card p,
.permission-note span {
  color: var(--text-muted);
  margin: 0;
}
.permission-scale-pill {
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
}
.permission-role-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}
.permission-role-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 14px;
}
.permission-role-card div {
  display: grid;
  gap: 3px;
}
.permission-role-card strong {
  font-size: 14px;
}
.permission-role-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.permission-role-card.owner { border-left-color: #7c3aed; }
.permission-role-card.admin { border-left-color: #2563eb; }
.permission-role-card.office { border-left-color: var(--primary); }
.permission-role-card.lead { border-left-color: #b7791f; }
.permission-role-card.employee { border-left-color: #64748b; }
.permission-matrix-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.permission-matrix {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}
.permission-matrix th,
.permission-matrix td {
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.permission-matrix th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.permission-matrix tr:last-child td {
  border-bottom: 0;
}
.permission-matrix td:first-child {
  font-weight: 800;
}
.permission-matrix td span {
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
}
.permission-note {
  align-items: center;
  background: #fff7e6;
  border: 1px solid #f6d99b;
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
}
.permission-note strong {
  color: #8a5200;
  flex-shrink: 0;
}
@media (max-width: 1180px) {
  .permission-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .permission-card-header,
  .permission-note { align-items: flex-start; flex-direction: column; }
  .permission-role-grid { grid-template-columns: 1fr; }
}

/* Users v2: reference-style Benutzer & Rollen page */
.users-v2 {
  color: #18211f;
  font-size: 14px;
}
.users-v2 .page-title h1 {
  color: #0b1513;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin-bottom: 4px;
}
.users-v2 .page-title p {
  color: #6b7a76;
  font-size: 14px;
}
.users-v2-header {
  align-items: center;
  margin-bottom: 20px;
}
.users-v2-btn {
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 8px 14px;
}
.users-v2-filter {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.users-v2-search {
  background: #ffffff;
  border: 1px solid #e2e8e5;
  border-radius: 6px;
  min-width: 220px;
}
.users-v2-search .search-input {
  color: #18211f;
  font-size: 13px;
}
.users-v2-filter-chip {
  background: #ffffff;
  border: 1px solid #e2e8e5;
  border-radius: 20px;
  color: #6b7a76;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
}
.users-v2-filter-chip.active,
.users-v2-filter-chip:hover {
  background: #e8f4f0;
  border-color: #176b52;
  color: #176b52;
}
.users-v2-table-card {
  background: #ffffff;
  border: 1px solid #e2e8e5;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 28px;
  overflow: visible;
}
.users-v2-table {
  border-collapse: collapse;
  min-width: 1120px;
  width: 100%;
}
.users-v2-table th {
  background: #ffffff;
  border-bottom: 1px solid #e2e8e5;
  color: #6b7a76;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.45px;
  padding: 11px 14px;
  text-transform: uppercase;
}
.users-v2-table td {
  border-bottom: 1px solid #f4f6f5;
  color: #18211f;
  font-size: 13px;
  padding: 14px;
  vertical-align: middle;
}
.users-v2-table tbody tr:hover td {
  background: #fafbfa;
}
.users-v2-table tbody tr:last-child td {
  border-bottom: 0;
}
.users-v2-entity {
  align-items: center;
  display: flex;
  gap: 10px;
}
.users-v2-avatar {
  align-items: center;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  flex: 0 0 34px;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.users-v2-avatar.av-green { background: #176b52; }
.users-v2-avatar.av-blue { background: #2f6f88; }
.users-v2-avatar.av-amber { background: #b7791f; }
.users-v2-name {
  color: #18211f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.users-v2-sub,
.users-v2-muted,
.users-v2-email {
  color: #6b7a76;
  font-size: 12px;
}
.users-v2-role-chip,
.users-v2-level-chip,
.users-v2-count {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 12px;
  white-space: nowrap;
}
.users-v2-role-chip.role-owner {
  background: #f0eafa;
  border: 1px solid #decff7;
  color: #7c3aed;
}
.users-v2-role-chip.role-admin {
  background: #e0f0f7;
  border: 1px solid #c4e1ed;
  color: #2f6f88;
}
.users-v2-role-chip.role-officestaff {
  background: #e8f0fe;
  border: 1px solid #cfe0ff;
  color: #1a56db;
}
.users-v2-role-chip.role-teamlead {
  background: #fef3e2;
  border: 1px solid #f5d8a6;
  color: #b7791f;
}
.users-v2-role-chip.role-employee {
  background: #f3f4f6;
  border: 1px solid #e2e8e5;
  color: #6b7a76;
}
.users-v2-level-chip {
  background: #f4f6f5;
  border: 1px solid #e2e8e5;
  color: #7c3aed;
  min-width: 48px;
  justify-content: center;
}
.users-v2-count {
  background: #e8f0fe;
  color: #1a56db;
  min-width: 28px;
  justify-content: center;
  padding: 5px 9px;
}
.users-v2-status {
  align-items: center;
  color: #18211f;
  display: inline-flex;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}
.users-v2-status-dot {
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}
.users-v2-status-dot.active { background: #176b52; }
.users-v2-status-dot.pending { background: #b7791f; }
.users-v2-action-btn {
  border-radius: 6px;
  color: #18211f;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}
.users-v2-permissions {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-top: 0;
  padding: 0;
}
.users-v2-permission-header {
  align-items: flex-end;
  margin-bottom: 14px;
}
.users-v2-permission-header h2 {
  color: #18211f;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}
.users-v2-permission-header p {
  color: #6b7a76;
  font-size: 13px;
}
.users-v2-permissions .permission-scale-pill {
  background: #e8f4f0;
  border: 1px solid #d0ebe3;
  color: #176b52;
  font-size: 12px;
}
.users-v2-role-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}
.users-v2-role-grid .permission-role-card {
  border-radius: 8px;
  display: block;
  min-height: 122px;
  padding: 16px 18px;
}
.users-v2-role-grid .permission-role-card strong {
  color: #18211f;
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
}
.users-v2-role-grid .permission-role-card span {
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
  padding: 4px 10px;
}
.users-v2-role-grid .permission-role-card p {
  color: #5c6c68;
  font-size: 13px;
  line-height: 1.55;
}
.users-v2-role-grid .permission-role-card.owner { background: #f3ecff; border-color: #dac7fb; border-left-color: #7c3aed; }
.users-v2-role-grid .permission-role-card.owner span { background: #7c3aed; }
.users-v2-role-grid .permission-role-card.admin { background: #eaf7fc; border-color: #bde2ef; border-left-color: #2f6f88; }
.users-v2-role-grid .permission-role-card.admin span { background: #2f6f88; }
.users-v2-role-grid .permission-role-card.office { background: #e8f0fe; border-color: #cfe0ff; border-left-color: #1a56db; }
.users-v2-role-grid .permission-role-card.office span { background: #1a56db; }
.users-v2-role-grid .permission-role-card.lead { background: #fff6e7; border-color: #f2d49a; border-left-color: #b7791f; }
.users-v2-role-grid .permission-role-card.lead span { background: #b7791f; }
.users-v2-role-grid .permission-role-card.employee { background: #ffffff; border-color: #e2e8e5; border-left-color: #6b7a76; }
.users-v2-role-grid .permission-role-card.employee span { background: #6b7a76; }
.users-v2-matrix-wrap {
  background: #ffffff;
  border: 1px solid #e2e8e5;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow-x: auto;
}
.users-v2-matrix {
  min-width: 1120px;
}
.users-v2-matrix th {
  background: #ffffff;
  color: #6b7a76;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.45px;
  padding: 11px 14px;
}
.users-v2-matrix td {
  color: #18211f;
  font-size: 13px;
  padding: 12px 14px;
  vertical-align: middle;
}
.users-v2-matrix td:first-child {
  font-weight: 800;
}
.users-v2-check-cell {
  text-align: center !important;
}
.users-v2-check-cell span.allowed,
.users-v2-check-cell span.denied {
  background: transparent;
  border-radius: 0;
  font-size: 15px;
  min-width: auto;
  padding: 0;
}
.users-v2-check-cell span.allowed { color: #176b52; }
.users-v2-check-cell span.denied { color: #c7d1cd; }
.users-v2-note {
  background: #fff7e6;
  border: 1px solid #f6d99b;
  border-radius: 8px;
  color: #7a4b10;
  font-size: 13px;
  margin-top: 18px;
  padding: 13px 16px;
}
.users-v2-note strong {
  color: #9a5b00;
}
.users-v2-note span {
  color: #7a4b10;
}
@media (max-width: 1320px) {
  .users-v2-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .users-v2-header,
  .users-v2-permission-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .users-v2-header .pg-actions,
  .users-v2-header .pg-actions .btn,
  .users-v2-search {
    width: 100%;
  }
  .users-v2-role-grid { grid-template-columns: 1fr; }
}

/* Users v2 refinement: calmer type and real inline dropdowns */
.users-v2 .page-title h1 {
  font-weight: 700;
}
.users-v2-btn,
.users-v2-filter-chip,
.users-v2-table th,
.users-v2-name,
.users-v2-status,
.users-v2-action-btn,
.users-v2-permission-header h2,
.users-v2-role-grid .permission-role-card strong,
.users-v2-matrix th,
.users-v2-matrix td:first-child {
  font-weight: 600;
}
.users-v2-avatar,
.users-v2-role-chip,
.users-v2-level-chip,
.users-v2-count,
.users-v2-role-grid .permission-role-card span {
  font-weight: 700;
}
.users-v2-table td,
.users-v2-matrix td,
.users-v2-role-grid .permission-role-card p,
.users-v2 .page-title p,
.users-v2-permission-header p {
  font-weight: 400;
}
.users-v2-inline-dropdown .dropdown-menu {
  border-color: #d5e2de;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 170px;
  z-index: 1080;
}
.users-v2-inline-dropdown .dropdown-item {
  color: #18211f;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
}
.users-v2-inline-dropdown .dropdown-item:hover {
  background: #e8f4f0;
  color: #176b52;
}
.users-v2-role-chip.btn,
.users-v2-level-chip.btn {
  border-style: solid;
  border-width: 1px;
  line-height: 1.1;
}
.users-v2-role-chip.btn::after,
.users-v2-level-chip.btn::after {
  margin-left: 8px;
}

/* Global readable type pass based on the v2 reference */
body,
.app-shell,
.page-title p,
.fs-data-table td,
.data-table td,
.form-input,
.form-select,
.btn,
.dropdown-item,
.search-input {
  color: #18211f;
  font-size: 13px;
  font-weight: 400;
}
.page-title h1,
.pg-title,
.center-empty .empty-title {
  color: #0b1513;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.35px;
}
.fs-data-table th,
.data-table th,
.form-group label,
.form-section-title,
.settings-section-title {
  color: #6b7a76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.customer-name-text,
.object-name,
.service-row strong,
.job-title-main,
.next-job-item strong,
.dash-customer-card h3,
.section-line h2,
.role-hierarchy-card h2 {
  color: #18211f;
  font-weight: 600;
}
.kpi-num,
.client-stat-num,
.next-job-date strong {
  font-weight: 700;
}
.kpi-trend,
.soft-pill,
.assignee-chip,
.assignee-mini {
  font-weight: 600;
}

/* Reports v2 */
.reports-v2 {
  color: #18211f;
  font-size: 14px;
}
.reports-v2-header {
  align-items: flex-start;
  margin-bottom: 20px;
}
.reports-v2-header .page-title h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.reports-v2-header .page-title p {
  color: #6b7a76;
  font-size: 14px;
}
.reports-v2-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}
.reports-period-toggle {
  background: #f4f6f5;
  border: 1px solid #e2e8e5;
  border-radius: 8px;
  display: inline-flex;
  overflow: hidden;
}
.reports-period-toggle button {
  background: transparent;
  border: 0;
  border-right: 1px solid #e2e8e5;
  color: #6b7a76;
  font-size: 12px;
  padding: 7px 11px;
}
.reports-period-toggle button:last-child {
  border-right: 0;
}
.reports-period-toggle button.active {
  background: #ffffff;
  color: #176b52;
  font-weight: 700;
}
.reports-export-btn {
  border-radius: 8px;
  font-weight: 600;
  min-height: 34px;
}
.reports-kpi-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}
.reports-kpi-card,
.reports-panel {
  background: #ffffff;
  border: 1px solid #e2e8e5;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.reports-kpi-card {
  padding: 18px 20px;
}
.reports-kpi-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}
.reports-kpi-top > span:first-child {
  color: #6b7a76;
  font-size: 12px;
  font-weight: 700;
}
.reports-kpi-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 16px;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.reports-kpi-card.green .reports-kpi-icon { background: #e8f4f0; color: #176b52; }
.reports-kpi-card.blue .reports-kpi-icon { background: #e0f0f7; color: #2f6f88; }
.reports-kpi-card.amber .reports-kpi-icon { background: #fef3e2; color: #b7791f; }
.reports-kpi-card.red .reports-kpi-icon { background: #fde8e8; color: #d64545; }
.reports-kpi-card.purple .reports-kpi-icon { background: #f0eafa; color: #7c3aed; }
.reports-kpi-card strong {
  color: #0b1513;
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.reports-kpi-card p {
  color: #6b7a76;
  font-size: 12px;
  margin: 0 0 11px;
}
.reports-kpi-card .positive {
  color: #176b52;
  font-weight: 600;
}
.reports-meter,
.reports-pipeline-meter,
.reports-team-meter {
  background: #e2e8e5;
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}
.reports-meter span,
.reports-pipeline-meter span,
.reports-team-meter span {
  border-radius: inherit;
  display: block;
  height: 100%;
}
.reports-kpi-card.green .reports-meter span { background: #176b52; }
.reports-kpi-card.blue .reports-meter span { background: #2f6f88; }
.reports-kpi-card.amber .reports-meter span { background: #b7791f; }
.reports-kpi-card.red .reports-meter span { background: #d64545; }
.reports-kpi-card.purple .reports-meter span { background: #7c3aed; }
.reports-main-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr) minmax(280px, 1fr);
  margin-bottom: 18px;
}
.reports-panel {
  padding: 20px;
}
.reports-panel-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}
.reports-panel h2,
.reports-side-panel h2 {
  color: #0b1513;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
}
.reports-panel p,
.reports-panel-header p {
  color: #6b7a76;
  font-size: 13px;
  margin: 0;
}
.reports-panel-header > span {
  background: #f4f6f5;
  border: 1px solid #e2e8e5;
  border-radius: 999px;
  color: #6b7a76;
  font-size: 12px;
  padding: 6px 10px;
}
.reports-weekly-panel {
  min-height: 294px;
}
.reports-week-chart {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  height: 210px;
  padding: 20px 6px 0;
}
.reports-week-bar {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 100%;
  justify-content: flex-end;
}
.reports-week-columns {
  align-items: flex-end;
  display: flex;
  gap: 5px;
  height: 170px;
  width: 100%;
}
.reports-week-columns span {
  border-radius: 5px 5px 0 0;
  display: block;
  flex: 1;
  min-height: 4px;
}
.reports-week-columns .planned { background: #1a56db; }
.reports-week-columns .completed { background: #176b52; }
.reports-week-bar small {
  color: #6b7a76;
  font-size: 12px;
}
.reports-status-list {
  display: grid;
  gap: 12px;
  margin-top: 120px;
}
.reports-status-row,
.reports-type-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px 1fr auto;
}
.reports-status-row .dot,
.reports-type-row::before {
  border-radius: 50%;
  content: "";
  display: block;
  height: 8px;
  width: 8px;
}
.reports-status-row span:not(.dot),
.reports-type-row span {
  color: #18211f;
  font-size: 13px;
}
.reports-status-row strong,
.reports-type-row strong {
  color: #18211f;
  font-size: 13px;
  font-weight: 700;
}
.reports-pipeline-list {
  display: grid;
  gap: 14px;
}
.reports-pipeline-row > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}
.reports-pipeline-row span {
  color: #6b7a76;
  font-size: 12px;
  font-weight: 700;
}
.reports-pipeline-row strong {
  color: #18211f;
  font-size: 13px;
  font-weight: 700;
}
.reports-bottom-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 260px minmax(0, 1fr);
}
.reports-side-panel {
  min-height: 386px;
}
.reports-team-row {
  margin-top: 14px;
}
.reports-team-head {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 34px 1fr auto;
  margin-bottom: 8px;
}
.reports-avatar,
.reports-assignee b {
  align-items: center;
  background: #176b52;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.reports-team-head strong {
  color: #18211f;
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.reports-team-head small {
  color: #6b7a76;
  display: block;
  font-size: 12px;
}
.reports-team-head b {
  color: #176b52;
  font-size: 13px;
}
.reports-team-meter span { background: #176b52; }
.reports-side-divider {
  border-top: 1px solid #e2e8e5;
  margin: 18px 0;
}
.reports-type-row {
  grid-template-columns: 8px 1fr auto;
  margin-top: 10px;
}
.reports-type-row::before { background: #2f6f88; }
.reports-jobs-panel {
  overflow: hidden;
  padding: 0;
}
.reports-jobs-panel .reports-panel-header {
  margin: 0;
  padding: 20px 20px 14px;
}
.reports-jobs-panel a {
  color: #6b7a76;
  font-size: 13px;
  text-decoration: none;
}
.reports-jobs-table {
  border-collapse: collapse;
  width: 100%;
}
.reports-jobs-table th {
  border-top: 1px solid #e2e8e5;
  border-bottom: 1px solid #e2e8e5;
  color: #6b7a76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 11px 14px;
  text-align: left;
  text-transform: uppercase;
}
.reports-jobs-table td {
  border-bottom: 1px solid #f4f6f5;
  color: #18211f;
  font-size: 13px;
  padding: 13px 14px;
  vertical-align: middle;
}
.reports-jobs-table tr:last-child td {
  border-bottom: 0;
}
.reports-jobs-table td strong {
  color: #18211f;
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.reports-jobs-table td span {
  color: #6b7a76;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}
.reports-muted {
  color: #6b7a76;
  font-style: italic;
}
.reports-assignee {
  align-items: center;
  background: #e8f4f0;
  border-radius: 999px;
  color: #176b52 !important;
  display: inline-flex !important;
  font-size: 12px !important;
  font-weight: 600;
  gap: 5px;
  margin: 0 5px 4px 0 !important;
  padding: 3px 9px 3px 4px;
}
.reports-assignee b {
  font-size: 8px;
  height: 18px;
  width: 18px;
}
@media (max-width: 1300px) {
  .reports-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-main-grid { grid-template-columns: 1fr; }
  .reports-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .reports-v2-header,
  .reports-v2-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .reports-kpi-row { grid-template-columns: 1fr; }
  .reports-week-chart { gap: 8px; overflow-x: auto; }
  .reports-jobs-panel { overflow-x: auto; }
  .reports-jobs-table { min-width: 860px; }
}

.dashboard-activity-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
  padding: 18px 20px;
}

.dashboard-activity-list {
  display: grid;
  gap: 10px;
}

.dashboard-activity-item {
  align-items: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 12px;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  min-height: 46px;
  padding: 10px 0;
}

.dashboard-activity-item:last-child {
  border-bottom: 0;
}

.dashboard-activity-item strong {
  color: #10231f;
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.dashboard-activity-item small {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dashboard-activity-item em {
  background: #eef7f3;
  border-radius: 999px;
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  padding: 4px 9px;
}

.activity-type-dot {
  background: var(--primary);
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.activity-customer { background: #147a5a; }
.activity-property { background: #2f7894; }
.activity-lead { background: #c58a18; }
.activity-job { background: #2563eb; }
.activity-servicetype { background: #7c3aed; }
.activity-report { background: #dc2626; }

@media (max-width: 720px) {
  .dashboard-activity-item {
    align-items: start;
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .dashboard-activity-item em {
    grid-column: 2;
    justify-self: start;
  }
}

/* Dashboard v2 */
.dashboard-v2 { display: grid; gap: 18px; }
.dashboard-v2-header { margin-bottom: 0; }
.dashboard-v2-kpis { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-v2-kpi { align-items: center; background: #fff; border: 1px solid #e2e8e5; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; gap: 14px; min-height: 90px; padding: 16px 18px; }
.dashboard-v2-kpi strong { color: #0b1513; display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.6px; line-height: 1; }
.dashboard-v2-kpi span:not(.dash-icon) { color: #5d6d68; display: block; font-size: 12px; margin-top: 4px; }
.dashboard-v2-kpi em { color: #6b7a76; display: block; font-size: 11px; font-style: normal; font-weight: 600; margin-top: 6px; }
.dashboard-v2-kpi em.positive { color: #176b52; }
.dashboard-v2-kpi em.warning { color: #b7791f; }
.dashboard-v2-kpi em.danger { color: #c0392b; }
.dashboard-v2-kpi em.purple { color: #7c3aed; }
.dash-icon { align-items: center; border-radius: 8px; display: inline-flex; flex-shrink: 0; height: 36px; justify-content: center; width: 36px; }
.dash-icon-green { background: #e8f4f0; color: #176b52; }
.dash-icon-blue { background: #e0f0f7; color: #2f6f88; }
.dash-icon-amber { background: #fef3e2; color: #b7791f; }
.dash-icon-purple { background: #f0eafa; color: #7c3aed; }
.dash-icon-red { background: #fde8e8; color: #d64545; }
.dashboard-v2-top-grid { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr) 300px; }
.dashboard-v2-bottom-grid { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1fr) minmax(300px, .95fr); }
.card-panel, .dashboard-v2-customer-card, .quick-actions-card { background: #fff; border: 1px solid #e2e8e5; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dashboard-v2-customer-list { display: grid; gap: 12px; }
.dashboard-v2-customer-card { padding: 16px; }
.dashboard-v2-customer-card h3 { color: #10231f; font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.dashboard-v2-customer-card p { color: #6b7a76; font-size: 12px; margin: 0 0 12px; }
.dashboard-v2-week, .team-load-card, .activity-card, .pipeline-card, .services-card, .quick-actions-card { padding: 16px; }
.week-plan-list { display: grid; gap: 10px; }
.week-plan-day { display: grid; gap: 12px; grid-template-columns: 44px minmax(0, 1fr); }
.week-date { color: #0f2d24; text-align: center; }
.week-date span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.week-date strong { display: block; font-size: 18px; line-height: 1.1; }
.week-jobs { display: grid; gap: 8px; }
.week-empty { align-items: center; color: #6b7a76; display: flex; font-size: 13px; font-style: italic; min-height: 42px; }
.week-job-item { align-items: center; border-radius: 6px; border-left: 3px solid #2563eb; display: flex; justify-content: space-between; min-height: 48px; padding: 9px 12px; }
.week-job-item strong { color: #10231f; display: block; font-size: 13px; font-weight: 700; }
.week-job-item small { color: #53645f; display: block; font-size: 11px; margin-top: 2px; }
.week-job-item span { color: #176b52; font-size: 11px; font-weight: 700; }
.week-job-item.tone-blue { background: #e8f0fe; border-color: #2563eb; }
.week-job-item.tone-amber { background: #fef3e2; border-color: #b7791f; }
.week-job-item.tone-green { background: #e8f4f0; border-color: #176b52; }
.week-job-item.tone-red { background: #fde8e8; border-color: #d64545; }
.dashboard-v2-side-stack { display: grid; gap: 16px; }
.team-load-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 34px minmax(0, 1fr) auto; margin-bottom: 12px; }
.team-avatar { align-items: center; background: #176b52; border-radius: 50%; color: #fff; display: flex; font-size: 11px; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.team-load-main strong { color: #10231f; display: block; font-size: 12px; font-weight: 700; }
.team-load-main small { color: #6b7a76; display: block; font-size: 11px; }
.team-load-main span { background: #e2e8e5; border-radius: 999px; display: block; height: 5px; margin-top: 7px; overflow: hidden; }
.team-load-main i { background: #176b52; border-radius: inherit; display: block; height: 100%; }
.team-load-row em { color: #176b52; font-style: normal; font-weight: 700; }
.team-alert { background: #fde8e8; border-radius: 6px; color: #c0392b; display: block; font-size: 12px; font-weight: 700; padding: 10px 12px; text-decoration: none; }
.activity-feed-compact { display: grid; gap: 0; }
.activity-feed-compact article { border-bottom: 1px solid #f0f3f1; display: grid; gap: 10px; grid-template-columns: 8px minmax(0, 1fr); padding: 10px 0; }
.activity-feed-compact article:last-child { border-bottom: 0; }
.activity-feed-compact strong { color: #10231f; display: block; font-size: 12px; font-weight: 650; line-height: 1.4; }
.activity-feed-compact small { color: #6b7a76; display: block; font-size: 11px; margin-top: 2px; }
.pipeline-card footer { border-top: 1px solid #e2e8e5; display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; }
.pipeline-card footer span, .pipeline-card footer strong { font-size: 12px; }
.pipeline-card footer strong { color: #176b52; }
.pipeline-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr 80px 24px; margin: 10px 0; }
.pipeline-row span { align-items: center; color: #10231f; display: flex; font-size: 13px; gap: 8px; }
.pipeline-row i { border-radius: 50%; display: inline-block; height: 9px; width: 9px; }
.pipeline-row b { background: #176b52; border-radius: 999px; display: block; height: 5px; justify-self: end; }
.pipeline-row strong { font-size: 12px; text-align: right; }
.dot-green { background: #176b52; } .dot-blue { background: #2563eb; } .dot-amber { background: #b7791f; } .dot-red { background: #c0392b; }
.pipeline-row .dot-blue + b, .pipeline-row b.dot-blue { background: #2563eb; }
.service-mini-row { align-items: center; border-bottom: 1px solid #f0f3f1; display: grid; gap: 12px; grid-template-columns: 38px minmax(0,1fr) auto; padding: 10px 0; }
.service-mini-row:last-child { border-bottom: 0; }
.service-mini-row strong { color: #10231f; display: block; font-size: 13px; font-weight: 700; }
.service-mini-row small { color: #6b7a76; display: block; font-size: 11px; margin-top: 2px; }
.quick-action-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.quick-action-grid a { background: #fff; border: 1px solid #e2e8e5; border-radius: 8px; color: #10231f; display: grid; gap: 12px; min-height: 82px; padding: 14px; text-decoration: none; }
.quick-action-grid a:hover { border-color: #176b52; box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.quick-action-grid strong { font-size: 13px; font-weight: 700; }
@media (max-width: 1320px) { .dashboard-v2-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } .dashboard-v2-top-grid, .dashboard-v2-bottom-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .dashboard-v2-kpis { grid-template-columns: 1fr; } .quick-action-grid { grid-template-columns: 1fr; } .week-plan-day { grid-template-columns: 36px minmax(0, 1fr); } }
.pipeline-row b.bar-green { background: #176b52; }
.pipeline-row b.bar-blue { background: #2563eb; }
.pipeline-row b.bar-amber { background: #b7791f; }
.pipeline-row b.bar-red { background: #c0392b; }

/* Entity detail drawer */
.users-clickable-row { cursor: pointer; }
.users-clickable-row:hover td { background: #f3f8f6 !important; }
.entity-drawer-backdrop { background: rgba(15, 23, 20, 0.38); inset: 0; opacity: 0; pointer-events: none; position: fixed; transition: opacity .18s ease; z-index: 1090; }
.entity-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.entity-detail-drawer { background: #ffffff; border-left: 1px solid #e2e8e5; bottom: 0; box-shadow: none; display: flex; flex-direction: column; max-width: 680px; pointer-events: none; position: fixed; right: 0; top: 0; transform: translateX(calc(100% + 48px)); transition: transform .22s ease, box-shadow .22s ease; width: min(680px, 100vw); z-index: 1091; }
.entity-detail-drawer.open { box-shadow: -14px 0 34px rgba(0,0,0,.16); pointer-events: auto; transform: translateX(0); }
.entity-drawer-topbar { align-items: center; border-bottom: 1px solid #e2e8e5; display: grid; gap: 12px; grid-template-columns: auto 1fr auto; min-height: 54px; padding: 10px 14px 10px 22px; }
.entity-drawer-topbar > span { color: #6b7a76; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.drawer-back-btn { background: transparent; border: 0; color: #6b7a76; font: inherit; font-size: 13px; padding: 6px 0; }
.drawer-back-btn:hover { color: #176b52; }
.drawer-top-actions { align-items: center; display: flex; gap: 8px; }
.drawer-top-actions form { margin: 0; }
.entity-drawer-body { overflow-y: auto; padding: 24px; }
.drawer-user-hero { align-items: center; display: flex; gap: 16px; margin-bottom: 22px; }
.drawer-avatar { border-radius: 10px; flex: 0 0 54px; height: 54px; width: 54px; }
.drawer-user-hero h2 { color: #10231f; font-size: 22px; font-weight: 750; letter-spacing: -.35px; line-height: 1.1; margin: 0; }
.drawer-user-hero p { color: #6b7a76; font-size: 13px; margin: 4px 0 8px; }
.drawer-chip-row { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.drawer-stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; }
.drawer-stat-grid article { background: #f4f6f5; border-radius: 8px; padding: 16px 12px; text-align: center; }
.drawer-stat-grid strong { color: #176b52; display: block; font-size: 24px; font-weight: 750; line-height: 1; }
.drawer-stat-grid span { color: #6b7a76; display: block; font-size: 11px; margin-top: 8px; }
.drawer-section { border-top: 1px solid #e2e8e5; padding: 22px 0; }
.drawer-section h3, .drawer-section-line h3 { color: #6b7a76; font-size: 12px; font-weight: 800; letter-spacing: .5px; margin: 0 0 14px; text-transform: uppercase; }
.drawer-section-line { align-items: center; display: flex; justify-content: space-between; margin-bottom: 12px; }
.drawer-section-line h3 { margin: 0; }
.drawer-profile-grid { display: grid; gap: 18px 28px; grid-template-columns: 1fr 1fr; }
.drawer-profile-grid span { color: #6b7a76; display: block; font-size: 12px; margin-bottom: 5px; }
.drawer-profile-grid strong { color: #10231f; display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.drawer-job-list { display: grid; gap: 8px; }
.drawer-job-row { align-items: center; border: 1px solid #e2e8e5; border-radius: 8px; color: #10231f; display: grid; gap: 12px; grid-template-columns: 38px minmax(0, 1fr) auto; min-height: 58px; padding: 10px 12px; text-decoration: none; }
.drawer-job-row:hover { background: #f8fbfa; border-color: #d0ebe3; color: #10231f; }
.drawer-job-row strong { display: block; font-size: 13px; font-weight: 700; }
.drawer-job-row small { color: #6b7a76; display: block; font-size: 11px; margin-top: 2px; }
.drawer-job-row em { background: #e8f0fe; border-radius: 999px; color: #1a56db; font-size: 11px; font-style: normal; font-weight: 700; padding: 4px 9px; }
.drawer-activity-list { display: grid; gap: 12px; }
.drawer-activity-list article { display: grid; gap: 12px; grid-template-columns: 10px minmax(0, 1fr); }
.drawer-activity-list strong { color: #10231f; display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.drawer-activity-list small { color: #6b7a76; display: block; font-size: 11px; margin-top: 3px; }
.drawer-empty { color: #6b7a76; font-size: 13px; margin: 0; }
.drawer-danger-zone { background: #fde8e8; border: 1px solid #f5c6cb; border-radius: 8px; margin-top: 8px; padding: 14px; }
@media (max-width: 760px) {
  .entity-detail-drawer {
    border-left: 0;
    max-width: none;
    width: 100vw;
  }

  .entity-drawer-topbar {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .drawer-top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .drawer-top-actions .btn,
  .drawer-action-row .btn {
    justify-content: center;
    min-height: 38px;
  }

  .entity-drawer-body {
    padding: 18px 14px 28px;
  }

  .drawer-user-hero,
  .drawer-entity-hero {
    align-items: flex-start;
  }

  .drawer-user-hero h2,
  .drawer-entity-hero h2 {
    font-size: 19px;
  }

  .drawer-stat-grid,
  .drawer-profile-grid {
    grid-template-columns: 1fr;
  }

  .drawer-section-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .drawer-job-row,
  .drawer-checklist-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .drawer-job-row em,
  .drawer-checklist-row small {
    grid-column: 2;
    justify-self: start;
  }

  .modal-dialog {
    margin: 10px;
  }

  .fs-modal .modal-header,
  .fs-modal .modal-body,
  .fs-modal .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .fs-modal .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .fs-modal .modal-footer .btn {
    justify-content: center;
    width: 100%;
  }
}

.entity-clickable-row,
.entity-clickable-card {
  cursor: pointer;
}
.entity-clickable-row:hover,
.entity-clickable-card:hover {
  background: #f3f8f6 !important;
}
.entity-clickable-row:hover td {
  background: #f3f8f6 !important;
}
.drawer-entity-hero {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.drawer-entity-icon {
  align-items: center;
  background: #e8f4f0;
  border-radius: 10px;
  color: #176b52;
  display: flex;
  flex: 0 0 54px;
  font-size: 18px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  width: 54px;
}
.drawer-entity-hero h2 {
  color: #10231f;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.35px;
  line-height: 1.1;
  margin: 0;
}
.drawer-entity-hero p {
  color: #6b7a76;
  font-size: 13px;
  margin: 4px 0 8px;
}
.drawer-description {
  background: #f4f6f5;
  border: 1px solid #e2e8e5;
  border-radius: 8px;
  color: #10231f;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
}
.drawer-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.drawer-checklist-row {
  align-items: center;
  background: #f4f6f5;
  border: 1px solid #e2e8e5;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  margin-bottom: 8px;
  padding: 10px 12px;
}
.drawer-checklist-row span:first-child {
  align-items: center;
  border: 1px solid #9aaba6;
  border-radius: 4px;
  display: inline-flex;
  height: 16px;
  justify-content: center;
  width: 16px;
}
.drawer-checklist-row.done span:first-child {
  background: #176b52;
  border-color: #176b52;
  color: #fff;
}
.drawer-checklist-row strong {
  font-size: 13px;
  font-weight: 600;
}
.drawer-checklist-row small {
  color: #6b7a76;
  font-size: 11px;
}



.employee-dashboard .dashboard-v2-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.employee-task-panel {
  padding: 16px;
}
.employee-task-table {
  display: grid;
  gap: 0;
}
.employee-task-header,
.employee-task-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1.35fr) minmax(220px, 1.2fr) minmax(130px, .75fr) minmax(110px, .65fr) minmax(130px, .75fr) 90px;
  padding: 13px 14px;
}
.employee-task-header {
  background: #f4f6f5;
  border-bottom: 1px solid #e2e8e5;
  color: #6b7a76;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.employee-task-row {
  border-bottom: 1px solid #eef2f0;
}
.employee-task-row:last-child {
  border-bottom: 0;
}
.employee-task-row strong {
  color: #10231f;
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.employee-task-row span,
.employee-task-row small {
  color: #6b7a76;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.employee-task-row .status-badge,
.employee-task-row .assignment-status {
  display: inline-flex;
  margin: 0 6px 5px 0;
}
@media (max-width: 1100px) {
  .employee-dashboard .dashboard-v2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-task-header { display: none; }
  .employee-task-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .employee-dashboard .dashboard-v2-kpis { grid-template-columns: 1fr; }
}

.activity-timeline-card {
  background: #fff;
  border: 1px solid #e2e8e5;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-top: 18px;
  padding: 18px 20px;
}
.activity-note-form {
  border-bottom: 1px solid #e2e8e5;
  margin-bottom: 16px;
  padding-bottom: 16px;
}
.activity-note-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.activity-note-row textarea {
  min-height: 82px;
}
.activity-timeline-list {
  display: grid;
  gap: 12px;
}
.activity-timeline-item {
  display: grid;
  gap: 12px;
  grid-template-columns: 10px minmax(0, 1fr);
}
.activity-timeline-item strong {
  color: #10231f;
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.activity-timeline-item small {
  color: #6b7a76;
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
@media (max-width: 720px) {
  .activity-note-row { grid-template-columns: 1fr; }
}

.notification-trigger { position: relative; }
.notification-count { align-items: center; background: #c2410c; border: 2px solid #fff; border-radius: 999px; color: #fff; display: inline-flex; font-size: 10px; font-weight: 800; height: 18px; justify-content: center; min-width: 18px; padding: 0 4px; position: absolute; right: -6px; top: -7px; }
.live-notification-menu { min-width: 360px; padding: 0; }
.notification-menu-header { align-items: center; border-bottom: 1px solid #e2e8e5; display: flex; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.notification-menu-header small { color: #6b7a76; font-size: 12px; }
.notification-link-button { background: transparent; border: 0; color: #176b52; font-size: 12px; font-weight: 700; padding: 0; }
.notification-list { display: grid; max-height: 380px; overflow-y: auto; }
.notification-menu-item { align-items: start; border-bottom: 1px solid #eef2ef; display: grid; gap: 10px; grid-template-columns: 10px minmax(0, 1fr) auto; padding: 12px 16px; }
.notification-menu-item.is-read { opacity: .62; }
.notification-menu-item a { color: inherit; display: grid; gap: 3px; text-decoration: none; }
.notification-menu-item strong { color: #10231f; font-size: 13px; font-weight: 750; line-height: 1.3; }
.notification-menu-item span { color: #52635f; font-size: 12px; line-height: 1.35; }
.notification-menu-item small { color: #7d8d89; font-size: 11px; }
.notification-menu-item form { margin: 0; }
.notification-menu-item button { align-items: center; background: #e7f4ef; border: 1px solid #cfe6dd; border-radius: 999px; color: #176b52; display: inline-flex; font-size: 11px; font-weight: 800; height: 24px; justify-content: center; width: 24px; }
.notification-kind-dot { align-self: start; border-radius: 999px; height: 8px; margin-top: 5px; width: 8px; }
.notification-info, .notification-job { background: #2c7891; }
.notification-warning { background: #c47a16; }
.notification-success { background: #176b52; }
.notification-view-all { justify-content: center; }
.notification-page-list { display: grid; gap: 0; overflow: hidden; }
.notification-page-row { align-items: start; border-bottom: 1px solid #eef2ef; display: grid; gap: 14px; grid-template-columns: 10px minmax(0, 1fr) auto; padding: 18px 20px; }
.notification-page-row:last-child { border-bottom: 0; }
.notification-page-row.is-read { opacity: .62; }
.notification-page-row strong { color: #10231f; display: block; font-size: 15px; font-weight: 750; }
.notification-page-row p { color: #52635f; margin: 4px 0; }
.notification-page-row small { color: #7d8d89; }
.notification-page-actions { align-items: center; display: flex; gap: 8px; }
@media (max-width: 700px) { .live-notification-menu { min-width: min(92vw, 360px); } .notification-page-row { grid-template-columns: 10px 1fr; } .notification-page-actions { grid-column: 2; justify-content: flex-start; } }

/* Phone-first refinements for dense CRM screens */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .fs-page-header,
  .page-header {
    align-items: stretch;
    gap: 12px;
  }

  .fs-page-header .btn,
  .page-header .btn,
  .pg-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .filter-bar,
  .fs-filter-bar,
  .stats-row,
  .fs-stats-row {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .search-input-wrap {
    flex: 1 1 100%;
    width: 100%;
  }

  .filter-chip,
  .stat-pill,
  .fchip {
    flex: 0 0 auto;
    min-height: 36px;
  }

  .customer-list-card,
  .fs-table-card,
  .data-card,
  .table-responsive {
    overflow: visible;
  }

  .customer-list-card table.data-table,
  .customer-list-card table.fs-data-table,
  .users-v2-table-card table,
  .fs-table-card table.data-table {
    min-width: 0;
    width: 100%;
  }

  .customer-list-card .data-table thead,
  .users-v2-table thead {
    display: none;
  }

  .customer-list-card .data-table,
  .customer-list-card .data-table tbody,
  .customer-list-card .data-table tr,
  .customer-list-card .data-table td,
  .users-v2-table,
  .users-v2-table tbody,
  .users-v2-table tr,
  .users-v2-table td {
    display: block;
    width: 100%;
  }

  .customer-list-card .data-table tbody,
  .users-v2-table tbody {
    display: grid;
    gap: 10px;
  }

  .customer-list-card .data-table tr,
  .users-v2-table tr {
    background: #fff;
    border: 1px solid #dfe8e4;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(16, 35, 31, .06);
    overflow: visible;
    padding: 12px;
  }

  .customer-list-card .data-table td,
  .users-v2-table td {
    border: 0;
    padding: 6px 0;
  }

  .customer-list-card .data-table td:empty,
  .users-v2-table td:empty {
    display: none;
  }

  .customer-info,
  .users-v2-entity {
    align-items: flex-start;
    gap: 10px;
  }

  .customer-name-text,
  .users-v2-name {
    font-size: 14px;
    line-height: 1.25;
  }

  .contact-cell,
  .notes-cell,
  .users-v2-email {
    overflow-wrap: anywhere;
  }

  .notes-cell {
    max-width: none;
  }

  .action-dropdown,
  .table-actions {
    display: flex;
    justify-content: flex-start;
    width: 100%;
  }

  .action-dropdown > .btn,
  .table-actions > .btn {
    min-width: 112px;
  }

  .service-list-card {
    border-radius: 10px;
    overflow: visible;
  }

  .service-row,
  .service-add-row {
    align-items: start;
    border-bottom: 1px solid #edf2ef;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .service-pricing-summary,
  .service-row > .status-badge,
  .service-row > .dropdown,
  .service-row > .action-dropdown {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .service-row > .status-badge {
    margin-top: 4px;
    min-width: 86px;
  }

  .service-row > .dropdown,
  .service-row > .action-dropdown {
    margin-top: 6px;
  }

  .entity-drawer-backdrop.open {
    background: rgba(15, 23, 20, .42);
  }

  .entity-detail-drawer {
    border-left: 0;
    box-shadow: none;
    left: 0;
    max-width: none;
    right: auto;
    width: 100dvw;
  }

  .entity-detail-drawer.open {
    box-shadow: none;
  }

  .entity-drawer-topbar {
    align-items: stretch;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .entity-drawer-topbar > span {
    order: 1;
  }

  .drawer-back-btn {
    align-self: flex-start;
    order: 0;
  }

  .drawer-top-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    order: 2;
    width: 100%;
  }

  .drawer-top-actions .btn,
  .drawer-top-actions form,
  .drawer-top-actions form .btn {
    width: 100%;
  }

  .entity-drawer-body {
    padding: 16px 14px 28px;
  }

  .drawer-entity-hero,
  .drawer-user-hero {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 48px minmax(0, 1fr);
    margin-bottom: 18px;
  }

  .drawer-entity-icon,
  .drawer-avatar {
    flex-basis: 48px;
    height: 48px;
    width: 48px;
  }

  .drawer-entity-hero h2,
  .drawer-user-hero h2 {
    font-size: 18px;
    letter-spacing: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .drawer-chip-row {
    gap: 6px;
  }

  .drawer-stat-grid {
    gap: 8px;
    grid-template-columns: 1fr;
    margin-bottom: 18px;
  }

  .drawer-stat-grid article {
    padding: 14px 10px;
  }

  .drawer-profile-grid {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .drawer-section {
    padding: 18px 0;
  }

  .drawer-job-row,
  .drawer-checklist-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }
}

/* ── Toolbar + search (workspace tables) ── */
.fs-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fs-search-wrap { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; height: 36px; min-width: 220px; }
.fs-search-input { border: 0; outline: none; font-size: 13px; color: var(--text); background: transparent; width: 100%; }
.fs-search-input::placeholder { color: var(--text-muted); }

/* ── Action dropdown (workspace rows — escapes overflow via JS fixed positioning) ── */
.req-action-wrap { position: relative; display: inline-block; }
.req-action-btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.req-dropdown { display: none; min-width: 170px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 5px; z-index: 9999; }
.req-dropdown.open { display: block; }
.req-dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; border-radius: 7px; color: var(--text); cursor: pointer; font-size: 13px; padding: 8px 10px; text-align: left; }
.req-dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.req-dropdown-item svg { flex-shrink: 0; }
.req-dropdown-danger { color: #dc2626; }
.req-dropdown-danger:hover { background: #fee2e2; color: #dc2626; }

@media (max-width: 640px) {
  .fs-search-wrap { min-width: 0; flex: 1; }
  .fs-toolbar { flex-direction: column; align-items: stretch; }
}

/* ── Support Ticket Thread ────────────────────────── */
.ticket-detail-layout {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 20px;
  align-items: start;
}
.ticket-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  min-height: 180px;
}
.ticket-thread-empty {
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}
.ticket-msg-row {
  display: flex;
  flex-direction: column;
}
.ticket-msg-row.from-platform { align-items: flex-end; }
.ticket-msg-row.from-tenant   { align-items: flex-start; }

.ticket-msg {
  max-width: 78%;
  padding: 10px 14px 8px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}
.ticket-msg-platform {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-bottom-right-radius: 4px;
}
.ticket-msg-tenant {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}
.ticket-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.ticket-msg-platform .ticket-msg-header { color: #1d4ed8; }
.ticket-msg-tenant   .ticket-msg-header { color: #374151; }
.ticket-msg-time { font-weight: 400; color: #9ca3af; margin-left: auto; }
.ticket-msg-body { color: #111827; white-space: pre-wrap; }
.ticket-msg-platform .ticket-msg-body { color: #1e3a8a; }

.ticket-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.ticket-avatar-support { background: #dbeafe; color: #1d4ed8; }
.ticket-avatar-tenant  { background: #e5e7eb; color: #374151; }

.ticket-reply-box { padding: 16px; border-top: 1px solid #f3f4f6; }

.ticket-info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.ticket-info-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: #9ca3af; margin-bottom: 2px; margin-top: 12px;
}
.ticket-info-label:first-child { margin-top: 0; }
.ticket-info-val {
  font-size: 13px; color: #111827; font-weight: 500;
}
.ticket-info-desc {
  font-size: 13px; color: #374151; line-height: 1.5;
  background: #f9fafb; border-radius: 8px; padding: 10px 12px;
  margin-top: 4px; white-space: pre-wrap;
}

@media (max-width: 768px) {
  .ticket-detail-layout { grid-template-columns: 1fr; }
  .ticket-msg { max-width: 92%; }
}

/* ── Job Photos ── */
.photo-upload-row { margin: 12px 0 16px; }
.photo-upload-form { display: flex; flex-direction: column; gap: 6px; }
.photo-upload-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-group { margin-top: 16px; }
.photo-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin-bottom: 8px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-thumb { position: relative; width: 120px; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; background: #f9fafb; cursor: pointer; }
.photo-thumb img { width: 120px; height: 90px; object-fit: cover; display: block; }
.photo-thumb-meta { padding: 4px 6px; font-size: 10px; color: #6b7280; line-height: 1.4; }
.photo-thumb-meta span { display: block; }
.photo-delete-btn { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.photo-thumb:hover .photo-delete-btn { opacity: 1; }

/* ── Request photo thumbnail strip (table column) ── */
.req-photo-strip { display: flex; align-items: center; gap: 4px; }
.req-photo-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; border: 1px solid #e5e7eb; cursor: pointer; transition: opacity .15s, transform .15s; }
.req-photo-thumb:hover { opacity: .85; transform: scale(1.08); }
.req-photo-more { font-size: 11px; font-weight: 600; color: #6b7280; background: #f3f4f6; border-radius: 4px; padding: 2px 5px; white-space: nowrap; }
.job-photo-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; cursor: pointer; display: block; }
@media (min-width: 901px) {
  .req-photo-thumb { width: 64px; height: 48px; border-radius: 6px; }
  .photo-thumb { width: 140px; }
  .photo-thumb img { width: 140px; height: 105px; }
}

/* ── Lightbox (workspace) ── */
@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; animation: lightboxFadeIn 320ms ease; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-inner img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: -36px; right: 0; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.lightbox-caption { color: #d1d5db; font-size: 13px; text-align: center; }

/* ── Responsive: hide non-essential columns on phones ── */
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }

  /* Filter/stat pill bars: wrap cleanly */
  .filter-bar,
  .fs-filter-bar,
  .stat-pills {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Tables fit width — no min-width, no horizontal scroll */
  .fs-table-card,
  .customer-list-card,
  .table-card,
  .data-table-wrap,
  .quote-table-card,
  .my-task-table-card {
    overflow: visible;
  }

  /* Job list grid: show only title+date+status cells, hide the rest */
  .job-col-service,
  .job-col-team,
  .job-col-location,
  .job-col-checklist,
  .job-col-assigned {
    display: none !important;
  }

  /* MyTasks grid collapses already at 1120px — just ensure no min-width */
  .my-task-row-header,
  .my-task-table-row {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  /* Quote calculator: stack area inputs */
  .calc-area-grid,
  .calc-live-summary {
    grid-template-columns: 1fr !important;
  }
  /* Jobs/Edit form rows */
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}
